fix: 文件名解析问题
This commit is contained in:
parent
6512330880
commit
e97469038b
|
@ -1,4 +1,4 @@
|
||||||
import BigNumber from "bignumber.js"
|
import BigNumber from 'bignumber.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHD 类型
|
* PHD 类型
|
||||||
|
@ -20,7 +20,7 @@ export const isSample = dataType => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getSampleTypeIdentify = dataType => {
|
export const getSampleTypeIdentify = dataType => {
|
||||||
if(isSample(dataType)) {
|
if (isSample(dataType)) {
|
||||||
return 'S'
|
return 'S'
|
||||||
} else {
|
} else {
|
||||||
switch (dataType) {
|
switch (dataType) {
|
||||||
|
@ -92,8 +92,9 @@ export class PHDParser {
|
||||||
this.fileType = headerInfoLine1[2]
|
this.fileType = headerInfoLine1[2]
|
||||||
this.qualify = headerInfoLine1[4]
|
this.qualify = headerInfoLine1[4]
|
||||||
|
|
||||||
const liveTime = parseFloat(this.getBlockStr('Acquisition', 0, 3))
|
let liveTime = parseFloat(this.getBlockStr('Acquisition', 0, 3))
|
||||||
this.liveTime = BigNumber(liveTime).toPrecision(6)
|
liveTime = BigNumber(liveTime).toPrecision(6)
|
||||||
|
this.liveTime = liveTime.endsWith('.0') ? parseInt(liveTime) : parseFloat(liveTime)
|
||||||
|
|
||||||
// 如果解析的是sample 文件,则解析相关联的文件
|
// 如果解析的是sample 文件,则解析相关联的文件
|
||||||
if (this.isSample) {
|
if (this.isSample) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user