处理遗留的数据格式问题

This commit is contained in:
任珮宇 2023-11-09 14:56:54 +08:00
parent a8b4d34536
commit dd993b4ac8

View File

@ -141,10 +141,10 @@ export default {
postAction('/spectrumAnalysis/ReAnalyse', params).then((res) => {
if (res.success) {
res.result.XeData.forEach((item) => {
item.conc = item.conc.toFixed(6)
item.concErr = item.concErr.toFixed(6)
item.lc = item.lc.toFixed(6)
item.mdc = item.mdc.toFixed(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))
})
this.$emit('sendXeData', res.result.XeData)
this.$message.success('Analyse Success!')