谐波次数切换时,原始数据显示为T项NaN问题
This commit is contained in:
@@ -167,7 +167,7 @@ const checkResultData = reactive<CheckData.CheckResult[]>([])
|
||||
|
||||
const popoverWidth: ComputedRef<string> = computed(() => {
|
||||
// return `${940 - (currentScriptTypeName.value.length + 7) * 14 - (harmNumList.length || checkList.length ? 160 : 0)}px`
|
||||
return `${940 - (currentScriptTypeName.value.length + 7) * 14 - (checkList.length ? 230 : 0)}px`
|
||||
return `${940 - (currentScriptTypeName.value.length + 7) * 14 - (checkList.length ? 220 : 0)}px`
|
||||
})
|
||||
|
||||
// 原始数据表格数据
|
||||
@@ -486,7 +486,7 @@ const formatHarmNum = (num: string) => {
|
||||
}
|
||||
|
||||
const setRawData = (data: CheckData.RawDataItem[]) => {
|
||||
console.log("原始数据", data)
|
||||
|
||||
data.forEach((item: CheckData.RawDataItem) => {
|
||||
item.dataA = stringToFixed(item.dataA)
|
||||
item.dataB = stringToFixed(item.dataB)
|
||||
@@ -494,6 +494,7 @@ const setRawData = (data: CheckData.RawDataItem[]) => {
|
||||
item.dataT = stringToFixed(item.dataT)
|
||||
})
|
||||
Object.assign(rawTableData, data)
|
||||
console.log("原始数据", rawTableData)
|
||||
}
|
||||
|
||||
const numberToFixed = (num: number): string => {
|
||||
@@ -512,12 +513,17 @@ const stringToFixed = (str: string): string => {
|
||||
if (str == null || str == undefined) {
|
||||
return '/'
|
||||
} else {
|
||||
let result = Number(str).toFixed(fixed)
|
||||
let num = Number(str)
|
||||
if (isNaN(num)) {
|
||||
return '/'
|
||||
}else{
|
||||
let result = num.toFixed(fixed)
|
||||
if (result === "-0.0000") {
|
||||
return result.replace(/-/g, "")
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getError = (num1: number, num2: number): string => {
|
||||
|
||||
Reference in New Issue
Block a user