From c18ec9bb10b389ae551a1626ec791d4ae115c276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 2 Nov 2023 11:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B0=E5=80=BC=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/index.vue | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index 82f12fc..0653424 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -433,10 +433,10 @@ export default { }, getStationName(arg, val, flag) { arg.forEach((item) => { - item.conc = Number(item.conc).toPrecision(6) - item.concErr = Number(item.concErr).toPrecision(6) - item.lc = Number(item.lc).toPrecision(6) - item.mdc = Number(item.mdc).toPrecision(6) + item.conc = parseFloat(Number(item.conc).toPrecision(6)) + item.concErr = parseFloat(Number(item.concErr).toPrecision(6)) + item.lc = parseFloat(Number(item.lc).toPrecision(6)) + item.mdc = parseFloat(Number(item.mdc).toPrecision(6)) }) this.resultDisplayFlag = arg this.params_toDB.stationName = val @@ -725,10 +725,10 @@ export default { this.analyseCurrentSpectrumData = res.result this.resultDisplayFlag = res.result.XeData this.resultDisplayFlag.forEach((item) => { - item.conc = item.conc.toPrecision(6) - item.concErr = item.concErr.toPrecision(6) - item.lc = item.lc.toPrecision(6) - item.mdc = item.mdc.toPrecision(6) + item.conc = parseFloat(item.conc.toPrecision(6)) + item.concErr = parseFloat(item.concErr.toPrecision(6)) + item.lc = parseFloat(item.lc.toPrecision(6)) + item.mdc = parseFloat(item.mdc.toPrecision(6)) }) } else { this.$message.warning(res.message) @@ -750,10 +750,10 @@ export default { this.analyseCurrentSpectrumData = res.result this.resultDisplayFlag = res.result.XeData this.resultDisplayFlag.forEach((item) => { - item.conc = item.conc.toPrecision(6) - item.concErr = item.concErr.toPrecision(6) - item.lc = item.lc.toPrecision(6) - item.mdc = item.mdc.toPrecision(6) + item.conc = parseFloat(item.conc.toPrecision(6)) + item.concErr = parseFloat(item.concErr.toPrecision(6)) + item.lc = parseFloat(item.lc.toPrecision(6)) + item.mdc = parseFloat(item.mdc.toPrecision(6)) }) } else { this.$message.warning(res.message)