diff --git a/package.json b/package.json index baa5348..05f4358 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@toast-ui/editor": "^2.1.2", "ant-design-vue": "^1.7.2", "axios": "^0.18.0", + "bignumber.js": "^9.1.2", "china-area-data": "^5.0.1", "clipboard": "^2.0.4", "codemirror": "^5.46.0", @@ -131,4 +132,4 @@ "last 2 versions", "not ie <= 10" ] -} \ No newline at end of file +} diff --git a/src/utils/phdHelper.js b/src/utils/phdHelper.js index df5a33e..567c14e 100644 --- a/src/utils/phdHelper.js +++ b/src/utils/phdHelper.js @@ -1,3 +1,5 @@ +import BigNumber from "bignumber.js" + /** * PHD 类型 */ @@ -91,7 +93,7 @@ export class PHDParser { this.qualify = headerInfoLine1[4] const liveTime = parseFloat(this.getBlockStr('Acquisition', 0, 3)) - this.liveTime = parseFloat(liveTime.toPrecision(6)) + this.liveTime = BigNumber(liveTime).toPrecision(6) // 如果解析的是sample 文件,则解析相关联的文件 if (this.isSample) {