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() }, }, ],