处理本地文件 分析之后,然后切换谱之后 右下角的分析结果也被清空了的问题

This commit is contained in:
任珮宇 2023-10-18 13:58:02 +08:00
parent 0efe3364d5
commit fe748ee4ce

View File

@ -352,7 +352,7 @@ export default {
this.betaProjectedData = betaProjectedData this.betaProjectedData = betaProjectedData
this.betaEnergyData = betaEnergyData this.betaEnergyData = betaEnergyData
this.resultDisplay = XeData this.resultDisplay = this.resultDisplay.length > 0 ? this.resultDisplay : XeData
this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode, savedAnalysisResult) this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode, savedAnalysisResult)
@ -436,6 +436,7 @@ export default {
watch: { watch: {
sample: { sample: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.resultDisplay = []
if (newVal.sampleId) { if (newVal.sampleId) {
this.getSampleDetail() this.getSampleDetail()
} else { } else {
@ -447,8 +448,8 @@ export default {
}, },
analyseCurrentSpectrum: { analyseCurrentSpectrum: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.currResultDisplay = newVal.XeData // this.currResultDisplay = newVal.XeData
this.resultDisplay = newVal.XeData this.resultDisplay = newVal.XeData || []
}, },
immediate: true, immediate: true,
deep: true, deep: true,