From 7d2510e8a6bfbd9078327cddbecdded8d13b0d16 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 7 Nov 2023 17:02:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9BGLogViewer=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modals/BetaGammaModals/BGLogViewer.vue | 13 +++++++++++-- src/views/spectrumAnalysis/index.vue | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue index c306158..f16bb6d 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BGLogViewer.vue @@ -25,7 +25,7 @@ export default { async getDetail() { try { this.isLoading = true - const { dbName, sampleId, sampleFileName, gasFileName, detFileName, qcFileName } = this.newSampleData + const { dbName, sampleId, inputFileName: sampleFileName, gasFileName, detFileName, qcFileName } = this.newSampleData const result = await getAction('/spectrumAnalysis/viewBGLogViewer', { dbName, sampleId, @@ -34,7 +34,16 @@ export default { detFileName, qcFileName, }) - this.content = result + if(typeof result == 'string') { + this.content = result + } else { + const { success, result, message } = res + if (success) { + this.content = result + } else { + this.$message.error(message) + } + } } catch (error) { console.error(error) } finally { diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index 5aa9e07..2789556 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -1300,7 +1300,9 @@ export default { title: 'BG log viewer', show: this.isBetaGamma, handler: () => { - this.bgLogViewerVisible = true + if(this.params_toDB.savedAnalysisResult) { + this.bgLogViewerVisible = true + } }, }, {