diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index 7fab745..67d85dc 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -167,7 +167,7 @@ const checkResultData = reactive([]) const popoverWidth: ComputedRef = 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,11 +513,16 @@ const stringToFixed = (str: string): string => { if (str == null || str == undefined) { return '/' } else { - let result = Number(str).toFixed(fixed) - if (result === "-0.0000") { - return result.replace(/-/g, "") + let num = Number(str) + if (isNaN(num)) { + return '/' + }else{ + let result = num.toFixed(fixed) + if (result === "-0.0000") { + return result.replace(/-/g, "") + } + return result } - return result } }