diff --git a/src/views/spectrumAnalysis/clearSampleCache.js b/src/views/spectrumAnalysis/clearSampleCache.js index 4b15b10..d73971b 100644 --- a/src/views/spectrumAnalysis/clearSampleCache.js +++ b/src/views/spectrumAnalysis/clearSampleCache.js @@ -4,19 +4,19 @@ import Vue from 'vue' /** * 发起请求清理后端对sample的缓存 - * @param {Array} sampleList + * @param {Array} 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}`) - }) -} \ No newline at end of file +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}`) + }) +} diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue index 4f4ab43..a895bd4 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue @@ -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 )