fix:解决beta谱在calibration分析后应用all,其他谱没有缓存calibration参数问题
This commit is contained in:
parent
5797dfc529
commit
006ae8fc22
|
@ -17,6 +17,7 @@ export const clearSampleCache = sampleList => {
|
|||
}
|
||||
deleteAction(url, params)
|
||||
store.commit('REMOVE_SAMPLE_DATA', fileName)
|
||||
Vue.ls.remove(`calibration-gamma:${fileName}`)
|
||||
Vue.ls.remove(`CALIBRATION_GAMMA_${fileName}`)
|
||||
Vue.ls.remove(`CALIBRATION_BETA_${fileName}`)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -655,8 +655,8 @@ export default {
|
|||
|
||||
// 如果点击过reanalyze则渲染之前fitting的数据,如果没点Reanalyze,数据会在窗口关闭时删掉 20231101:xiao
|
||||
// todo 现在能谱数据没有缓存,刷新页面时也会获取到fitting的数据
|
||||
if(this.getCache("calibration-beta:"+this.newSampleData.inputFileName)) {
|
||||
this.setFirringResult(this.getCache("calibration-beta:"+this.newSampleData.inputFileName))
|
||||
if(this.getCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName)) {
|
||||
this.setFirringResult(this.getCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -877,7 +877,7 @@ export default {
|
|||
|
||||
// 点击Reset Button 重置
|
||||
handleReset() {
|
||||
this.removeCache("calibration-beta:"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||
this.removeCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
||||
this.list = []
|
||||
this.newE2C = []
|
||||
|
@ -914,7 +914,7 @@ export default {
|
|||
this.betaIsFitting = true
|
||||
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
||||
|
||||
this.setCache("calibration-beta:"+this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||
this.setCache("CALIBRATION_BETA_"+this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||
|
||||
this.setFirringResult(result)
|
||||
|
||||
|
|
|
@ -532,8 +532,8 @@ export default {
|
|||
|
||||
// 如果点击过reanalyze则渲染之前fitting的数据,如果没点Reanalyze,数据会在窗口关闭时删掉 20231101:xiao
|
||||
// todo 现在能谱数据没有缓存,刷新页面时也会获取到fitting的数据
|
||||
if(this.getCache("calibration-gamma:"+this.newSampleData.inputFileName)) {
|
||||
this.setFirringResult(this.getCache("calibration-gamma:"+this.newSampleData.inputFileName))
|
||||
if(this.getCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName)) {
|
||||
this.setFirringResult(this.getCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -657,7 +657,7 @@ export default {
|
|||
|
||||
// 点击Reset Button 重置
|
||||
handleReset() {
|
||||
this.$ls.remove("calibration-gamma:"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||
this.$ls.remove("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName) // 删除fitting之后缓存的数据 20231101:xiao
|
||||
this.newCalibrationFuncModel = cloneDeep(newCalibrationFuncModel)
|
||||
this.list = []
|
||||
this.newE2C = []
|
||||
|
@ -693,7 +693,7 @@ export default {
|
|||
this.gammaIsFitting = false
|
||||
this.$emit('isFitting', true) // 点击reAnalyze按钮,将isFirstFitting改为true 20231101:xiao
|
||||
|
||||
this.setCache("calibration-gamma:"+this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||
this.setCache("CALIBRATION_GAMMA_"+this.newSampleData.inputFileName, result) // 缓存数据,如果点击ReAnalyze需要回显数据 20231101:xiao
|
||||
|
||||
this.setFirringResult(result)
|
||||
|
||||
|
|
|
@ -154,9 +154,11 @@ export default {
|
|||
this.$bus.$emit('ReAnalyses', res.result)
|
||||
|
||||
if (this.newCalibrationIsAppliedTo == 'AllSpectrum') {
|
||||
this.clearSameStationCache(
|
||||
matchedSampleList.filter((item) => item.inputFileName !== this.newSampleData.inputFileName)
|
||||
let sameStation = matchedSampleList.filter(
|
||||
(item) => item.inputFileName !== this.newSampleData.inputFileName
|
||||
)
|
||||
this.clearSameStationCache(sameStation)
|
||||
this.setSameStationCalibarationCache(sameStation)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
|
@ -167,16 +169,41 @@ export default {
|
|||
// 清理相同台站的缓存
|
||||
clearSameStationCache(sampleList) {
|
||||
sampleList.forEach(({ inputFileName }) => {
|
||||
console.log('inputFileName>>' + inputFileName)
|
||||
this.$store.commit('REMOVE_SAMPLE_DATA', inputFileName)
|
||||
this.$ls.remove('calibration-gamma:' + inputFileName)
|
||||
})
|
||||
},
|
||||
// 相同台站能谱缓存一样的Calibration数据 20231115:xiao
|
||||
setSameStationCalibarationCache(sampleList) {
|
||||
sampleList.forEach(({ inputFileName }) => {
|
||||
console.log('inputFileName:' + inputFileName)
|
||||
// 根据tab页缓存对应数据
|
||||
if (this.currTab === 'gamma') {
|
||||
this.$ls.set(
|
||||
'CALIBRATION_GAMMA_' + inputFileName,
|
||||
this.$ls.get('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName)
|
||||
)
|
||||
}
|
||||
if (this.currTab === 'beta') {
|
||||
this.$ls.set(
|
||||
'CALIBRATION_BETA_' + inputFileName,
|
||||
this.$ls.get('CALIBRATION_BETA_' + this.newSampleData.inputFileName)
|
||||
)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleExit() {
|
||||
console.log('this.currTab>>>' + this.currTab)
|
||||
this.gammaEnergyValid = this.isReanlyze
|
||||
console.log('exit>>>this.isReanlyze>>>' + this.isReanlyze)
|
||||
if (!this.isReanlyze && this.$ls.get('calibration-gamma:' + this.newSampleData.inputFileName)) {
|
||||
this.$ls.remove('calibration-gamma:' + this.newSampleData.inputFileName) // 如果没有点击ReANalyze,删除fitting之后缓存的数据 20231101:xiao
|
||||
if (!this.isReanlyze) {
|
||||
// 如果没有点击ReANalyze,删除fitting之后缓存的数据 20231101:xiao
|
||||
if (this.currTab === 'gamma') {
|
||||
this.$ls.remove('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName)
|
||||
}
|
||||
if (this.currTab === 'beta') {
|
||||
this.$ls.remove('CALIBRATION_BETA_' + this.newSampleData.inputFileName)
|
||||
}
|
||||
}
|
||||
this.visible = false
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user