fix: 文件名解析问题

This commit is contained in:
Xu Zhimeng 2023-11-14 09:18:38 +08:00
parent 6512330880
commit e97469038b

View File

@ -1,4 +1,4 @@
import BigNumber from "bignumber.js"
import BigNumber from 'bignumber.js'
/**
* PHD 类型
@ -20,7 +20,7 @@ export const isSample = dataType => {
}
export const getSampleTypeIdentify = dataType => {
if(isSample(dataType)) {
if (isSample(dataType)) {
return 'S'
} else {
switch (dataType) {
@ -92,8 +92,9 @@ export class PHDParser {
this.fileType = headerInfoLine1[2]
this.qualify = headerInfoLine1[4]
const liveTime = parseFloat(this.getBlockStr('Acquisition', 0, 3))
this.liveTime = BigNumber(liveTime).toPrecision(6)
let liveTime = parseFloat(this.getBlockStr('Acquisition', 0, 3))
liveTime = BigNumber(liveTime).toPrecision(6)
this.liveTime = liveTime.endsWith('.0') ? parseInt(liveTime) : parseFloat(liveTime)
// 如果解析的是sample 文件,则解析相关联的文件
if (this.isSample) {