From 57983998aa68095a22096f49f6cc7fdb0746e524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 27 Feb 2024 19:42:02 +0800 Subject: [PATCH] =?UTF-8?q?beta=20=E8=B0=B1=20=E5=88=86=E6=9E=90=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/beta-analysis.vue | 121 ++++++++++++++----- src/views/spectrumAnalysis/index.vue | 11 +- 2 files changed, 97 insertions(+), 35 deletions(-) diff --git a/src/views/spectrumAnalysis/beta-analysis.vue b/src/views/spectrumAnalysis/beta-analysis.vue index e14880c..3699dd7 100644 --- a/src/views/spectrumAnalysis/beta-analysis.vue +++ b/src/views/spectrumAnalysis/beta-analysis.vue @@ -124,7 +124,39 @@ export default { boundaryList: [], sampleDetail: {}, qcFlags: {}, - resultDisplay: [ + resultDisplay: [], + currIdx: 0, + } + }, + watch: { + sample: { + async handler(newVal, oldVal) { + // this.resultDisplay = [] + const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName) + if (sampleData) { + const { data, from } = sampleData + this.sampleDetail = data + this.changeChartByType('sample') + if (from == 'db') { + this.sampleDetail = data + this.emitGetFiles(data) + } + } else { + if (newVal.sampleId) { + this.getSampleDetail() + } else { + this.getSelfStationSampleDetail() + } + } + this.$refs.betaChartRef.handleUnzoom() + }, + immediate: true, + deep: true, + }, + }, + methods: { + getAnalyzeCurrentSpectrum() { + let XeData = [ { sampleId: null, idAnalysis: null, @@ -173,37 +205,64 @@ export default { moddate: null, color: '#ffcc30', }, - ], - currIdx: 0, - } - }, - watch: { - sample: { - async handler(newVal, oldVal) { - // this.resultDisplay = [] - const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName) - if (sampleData) { - const { data, from } = sampleData - this.sampleDetail = data - this.changeChartByType('sample') - if (from == 'db') { - this.sampleDetail = data - this.emitGetFiles(data) - } - } else { - if (newVal.sampleId) { - this.getSampleDetail() - } else { - this.getSelfStationSampleDetail() - } - } - this.$refs.betaChartRef.handleUnzoom() - }, - immediate: true, - deep: true, + ] + this.resultDisplay = XeData + // this.$emit('reAnalyCurr', true, XeData) + }, + getAnalyzeAllSpectrum() { + let XeData = [ + { + sampleId: null, + idAnalysis: null, + nuclideName: 'Xe131m', + conc: -0.049, + concErr: 0.04272, + mdc: 0.14539, + lc: 0.06362626536110005, + nidFlag: 0, + moddate: null, + color: 'red', + }, + { + sampleId: null, + idAnalysis: null, + nuclideName: 'Xe133', + conc: 0.07727, + concErr: 0.0631, + mdc: 0.23981, + lc: 0.09916332268275692, + nidFlag: 0, + moddate: null, + color: '#ffcc30', + }, + { + sampleId: null, + idAnalysis: null, + nuclideName: 'Xe133m', + conc: -0.07186, + concErr: 0.03596, + mdc: 0.11014, + lc: 0.044521536189968125, + nidFlag: 0, + moddate: null, + color: 'red', + }, + { + sampleId: null, + idAnalysis: null, + nuclideName: 'Xe135', + conc: 0.26636, + concErr: 0.23193, + mdc: 0.77578, + lc: 0.3655879636569543, + nidFlag: 0, + moddate: null, + color: '#ffcc30', + }, + ] + this.resultDisplay = XeData + // this.$emit('reAnalyCurr', true, XeData) }, - }, - methods: { refreshRoi(data) { const { list, start, stop } = data let currRoiParam = { start, stop } diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index d2825aa..a99995a 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -1347,19 +1347,22 @@ export default { { type: 'a-menu-item', title: 'Analyze current spectrum', - show: this.isBetaGamma, + show: this.isBetaGamma || this.isBeta, handler: () => { // this.getAnalyzeCurrentSpectrum() - this.$refs.betaGammaAnalysisRef.getAnalyzeCurrentSpectrum() + if (this.isBetaGamma) this.$refs.betaGammaAnalysisRef.getAnalyzeCurrentSpectrum() + if (this.isBeta) this.$refs.betaAnalysisRef.getAnalyzeCurrentSpectrum() }, }, { type: 'a-menu-item', title: 'Analyze all spectra', - show: this.isBetaGamma, + show: this.isBetaGamma || this.isBeta, handler: () => { // this.getAnalyzeAllSpectrum() - this.$refs.betaGammaAnalysisRef.getAnalyzeAllSpectrum() + + if (this.isBetaGamma) this.$refs.betaGammaAnalysisRef.getAnalyzeAllSpectrum() + if (this.isBeta) this.$refs.betaAnalysisRef.getAnalyzeAllSpectrum() }, }, ],