fix: 修复toPrecision精度问题

This commit is contained in:
Xu Zhimeng 2023-11-13 15:56:44 +08:00
parent 2b8d41a5ce
commit d6a234bac5
2 changed files with 5 additions and 2 deletions

View File

@ -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"
]
}
}

View File

@ -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) {