fix: beta 下的energy calibration,选了AllSpectrum后,重新分析,把备选列表中相同台站的本地缓存清空,当XeData为空时,不应用

This commit is contained in:
Xu Zhimeng 2023-11-15 15:09:36 +08:00
parent 06d3e99725
commit e7f4656fef
2 changed files with 19 additions and 2 deletions

View File

@ -152,11 +152,26 @@ export default {
this.isReanlyze = true
this.handleExit()
this.$bus.$emit('ReAnalyses', res.result)
if (this.newCalibrationIsAppliedTo == 'AllSpectrum') {
this.clearSameStationCache(
matchedSampleList.filter((item) => item.inputFileName !== this.newSampleData.inputFileName)
)
}
} else {
this.$message.warning(res.message)
}
})
},
//
clearSameStationCache(sampleList) {
sampleList.forEach(({ inputFileName }) => {
this.$store.commit('REMOVE_SAMPLE_DATA', inputFileName)
this.$ls.remove('calibration-gamma:' + inputFileName)
})
},
handleExit() {
this.gammaEnergyValid = this.isReanlyze
console.log('exit>>>this.isReanlyze>>>' + this.isReanlyze)

View File

@ -471,8 +471,10 @@ export default {
this.params_toDB.checkDet = val.checkDet
},
getXeData(val) {
this.$set(this.analyseCurrentSpectrumData, 'XeData', val)
this.resultDisplayFlag = val
if(val && val.length) {
this.$set(this.analyseCurrentSpectrumData, 'XeData', val)
this.resultDisplayFlag = val
}
},
// formDB sampleData
getFiles(val) {