fix: 修复手动分析Beta谱时,右下角Result Display不显示问题,及在从手动分析后的谱切换到数据库中的谱,Result Display值不变的问题

This commit is contained in:
Xu Zhimeng 2024-03-13 18:50:59 +08:00
parent f3c989afc3
commit f6a7547aff

View File

@ -134,6 +134,7 @@ import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue'
import Spectra from './components/SubOperators/Spectra.vue' import Spectra from './components/SubOperators/Spectra.vue'
import CustomSelect from '@/components/CustomSelect/index.vue' import CustomSelect from '@/components/CustomSelect/index.vue'
import axios from 'axios' import axios from 'axios'
import { cloneDeep } from 'lodash'
const StatisticsType = { const StatisticsType = {
'Collection Time': 'Colloc_Time', 'Collection Time': 'Colloc_Time',
@ -225,7 +226,6 @@ export default {
statisticModalVisible: false, // Qc Flags statisticModalVisible: false, // Qc Flags
statisticsType: StatisticsType['Collection Time'], statisticsType: StatisticsType['Collection Time'],
currSample: {}, currSample: {},
copyXeData: null,
qcFlagsVisible: false, qcFlagsVisible: false,
} }
}, },
@ -452,12 +452,7 @@ export default {
console.log('this.resultDisplaythis.resultDisplay', this.resultDisplay) console.log('this.resultDisplaythis.resultDisplay', this.resultDisplay)
this.resultDisplay = this.copyXeData this.resultDisplay = XeData
? this.copyXeData
: this.resultDisplay.length > 0
? this.resultDisplay
: XeData
this.sortResultDisplay() this.sortResultDisplay()
this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode, savedAnalysisResult) this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode, savedAnalysisResult)
@ -561,8 +556,6 @@ export default {
item.mdc = parseFloat(item.mdc.toPrecision(6)) item.mdc = parseFloat(item.mdc.toPrecision(6))
}) })
this.$emit('reAnalyCurr', true, res.result.XeData) this.$emit('reAnalyCurr', true, res.result.XeData)
this.copyXeData = res.result.XeData
this.handleReAnalyse(res.result) this.handleReAnalyse(res.result)
} }
} else { } else {
@ -683,7 +676,7 @@ export default {
analyseCurrentSpectrum: { analyseCurrentSpectrum: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
// this.currResultDisplay = newVal.XeData // this.currResultDisplay = newVal.XeData
this.resultDisplay = newVal.XeData || [] this.resultDisplay = cloneDeep(newVal.XeData) || []
this.sortResultDisplay() this.sortResultDisplay()
this.$store.commit('UPDATE_SAMPLE_DATA', { this.$store.commit('UPDATE_SAMPLE_DATA', {
inputFileName: this.sample.inputFileName, inputFileName: this.sample.inputFileName,