fix: 修复beta清理缓存的调用在load from file时传的文件名不正确问题,getGammaGated接口增加文件名参数

This commit is contained in:
Xu Zhimeng 2023-11-07 14:30:42 +08:00
parent 30d6f111d3
commit da9257e81b
2 changed files with 17 additions and 16 deletions

View File

@ -4,19 +4,19 @@ import Vue from 'vue'
/**
* 发起请求清理后端对sample的缓存
* @param {Array<any>} sampleList
* @param {Array<any>} sampleList
*/
export const clearSampleCache = (sampleList) => {
sampleList.forEach(sample => {
const { inputFileName: fileName, sampleFileName, qcFileName } = sample
let url = '/gamma/delPHDCache',
params = { fileName }
if (sample.sampleType == 'B') {
url = '/spectrumAnalysis/deleteSpectrumCacheData'
params = { sampleFileName , qcFileName }
}
deleteAction(url, params)
store.commit('REMOVE_SAMPLE_DATA', fileName)
Vue.ls.remove(`calibration-gamma:${fileName}`)
})
}
export const clearSampleCache = sampleList => {
sampleList.forEach(sample => {
const { inputFileName: fileName } = sample
let url = '/gamma/delPHDCache',
params = { fileName }
if (sample.sampleType == 'B') {
url = '/spectrumAnalysis/deleteSpectrumCacheData'
params = { sampleFileName: fileName }
}
deleteAction(url, params)
store.commit('REMOVE_SAMPLE_DATA', fileName)
Vue.ls.remove(`calibration-gamma:${fileName}`)
})
}

View File

@ -696,7 +696,7 @@ export default {
this.cancelLastRequest()
const cancelToken = this.createCancelToken()
this.isLoadingGammaGated = true
const { sampleId, qcFileName } = this.newSampleData
const { sampleId, qcFileName, inputFileName: sampleFileName } = this.newSampleData
const {
success,
result: { data },
@ -709,6 +709,7 @@ export default {
chartHeight: this.gammaEnergy.length,
channelWidth: this.gammaChannelWidth,
qcFileName,
sampleFileName
},
cancelToken
)