From da9257e81bafc0dbb29a0143fac77f51d2a9bbde Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 7 Nov 2023 14:30:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbeta=E6=B8=85=E7=90=86?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=9A=84=E8=B0=83=E7=94=A8=E5=9C=A8load=20fr?= =?UTF-8?q?om=20file=E6=97=B6=E4=BC=A0=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98=EF=BC=8CgetGammaG?= =?UTF-8?q?ated=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spectrumAnalysis/clearSampleCache.js | 30 +++++++++---------- .../components/BetaDetectorCalibration.vue | 3 +- 2 files changed, 17 insertions(+), 16 deletions(-) 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 )