From f1af8cc8b99f7928e17a9c75f1a2d8237e56e6d1 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Thu, 9 Nov 2023 16:39:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ReAnalyse=E5=90=8E=E7=9F=A9=E5=BD=A2?= =?UTF-8?q?=E6=A1=86=E6=9C=AA=E5=8F=98=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/beta-gamma-analysis.vue | 14 ++++++++++++++ .../BetaGammaEnergyCalibrationModal/index.vue | 1 + 2 files changed, 15 insertions(+) diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 09946fe..7153206 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -224,10 +224,24 @@ export default { currSample: {}, } }, + created() { + this.$bus.$on('ReAnalyse', this.redrawRect) + }, destroyed() { this.cancelLastRequest() + this.$bus.$off('ReAnalyse', this.redrawRect) }, methods: { + // 重新绘制矩形框 + redrawRect(result) { + const keys = ['SampleBoundary', 'GasBoundary', 'DetBoundary', 'QCBoundary'] + SampleType.forEach((item, index) => { + const value = result[keys[index]] + this.sampleDetail[item.value].Boundary = value || [] + this.changeChartByType(this.spectraType) + }) + }, + handleGetFlag(val, obj) { this.resultDisplay.forEach((item) => { if (item.nuclideName === obj.nuclideName) { diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue index 3061830..11886d3 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue @@ -150,6 +150,7 @@ export default { this.$message.success('Analyse Success!') this.isReanlyze = true this.handleExit() + this.$bus.$emit('ReAnalyse', res.result) } else { this.$message.warning(res.message) }