From d0a75dabc58c6d01ef2719af848a3ed4334244b3 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Wed, 31 Jul 2024 14:09:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=BB=BA=E5=8F=B0?= =?UTF-8?q?=E7=AB=99=E4=B8=AD=E5=AD=98=E5=9C=A8=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-analysis.vue | 35 +++- .../spectrumAnalysis/clearSampleCache.js | 2 + .../components/BetaGammaSpectrum.vue | 2 +- .../Modals/SelfStation/BetaModal.vue | 171 ++++++++++++++++++ .../SelfStation/CalibrationModal/index.vue | 12 +- .../Modals/SelfStation/GammaModal.vue | 171 ++++++++++++++++++ .../components/ResultDisplay-Beta.vue | 9 +- .../RoiLimits/components/RoiLimitItem.vue | 19 +- .../components/SpectrumLineChart.vue | 5 +- 9 files changed, 402 insertions(+), 24 deletions(-) create mode 100644 src/views/spectrumAnalysis/components/Modals/SelfStation/BetaModal.vue create mode 100644 src/views/spectrumAnalysis/components/Modals/SelfStation/GammaModal.vue diff --git a/src/views/spectrumAnalysis/beta-analysis.vue b/src/views/spectrumAnalysis/beta-analysis.vue index 5673589..7ef947d 100644 --- a/src/views/spectrumAnalysis/beta-analysis.vue +++ b/src/views/spectrumAnalysis/beta-analysis.vue @@ -52,6 +52,7 @@ :boundary="boundaryList" :isLoading.sync="isLoading" @boundaryChange="handleBoundaryChange" + @open-modal="handleOpenModal" /> @@ -59,7 +60,7 @@
- + + + + + + + +
@@ -100,6 +108,8 @@ import store from '@/store/' import { getAction, postAction, putAction } from '../../api/manage' import { addSampleData, getSampleData, updateSampleData } from '@/utils/SampleStore' import { cloneDeep } from 'lodash' +import GammaModal from './components/Modals/SelfStation/GammaModal.vue' +import BetaModal from './components/Modals/SelfStation/BetaModal.vue' const SampleType = [ { @@ -131,6 +141,8 @@ export default { BetaGammaSpectrum, RoiLimits, RoiParam, + GammaModal, + BetaModal, }, props: { sample: { @@ -450,7 +462,12 @@ export default { return } - if (val == 'sample') this.currSpectrum = 'Sample' + if (val == 'sample') { + this.currSpectrum = 'Sample' + this.ROIAnalyzeLists = this.sampleDetail.ROIAnalyzeLists + } else { + this.ROIAnalyzeLists = [] + } if (val == 'detBg') this.currSpectrum = 'Det' this.roiParamList = cloneDeep(InitialRoiParamList) this.boundaryList = [] @@ -563,6 +580,20 @@ export default { data: this.ROIAnalyzeLists, }) }, + + // 打开Gamma或Beta弹窗 + handleOpenModal(index) { + const currSampleDetail = this.sampleDetail[this.spectraType] + if (!currSampleDetail) { + this.$message.warning(`No ${this.spectraType} spectrum file!`) + return + } + if (index == 0) { + this.$refs.gammaModalRef.open(currSampleDetail.gSpectrum, currSampleDetail.gammaEnergyData) + } else if (index == 1) { + this.$refs.betaModalRef.open(currSampleDetail.bSpectrum, currSampleDetail.betaEnergyData) + } + }, }, } diff --git a/src/views/spectrumAnalysis/clearSampleCache.js b/src/views/spectrumAnalysis/clearSampleCache.js index 9a79cd6..3316720 100644 --- a/src/views/spectrumAnalysis/clearSampleCache.js +++ b/src/views/spectrumAnalysis/clearSampleCache.js @@ -23,5 +23,7 @@ export const clearSampleCache = sampleList => { removeSampleData(fileName) Vue.ls.remove(`CALIBRATION_GAMMA_${fileName}`) Vue.ls.remove(`CALIBRATION_BETA_${fileName}`) + Vue.ls.remove(`SELF_STATION_CALIBRATION_GAMMA_${fileName}`) + Vue.ls.remove(`SELF_STATION_CALIBRATION_BETA_${fileName}`) }) } diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue index d93c9c3..a208ab2 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue @@ -361,7 +361,7 @@ export default { // 弹出gamma或beta弹窗 handleChange(index) { - console.log('%c [ 弹窗 ]-582', 'font-size:13px; background:pink; color:#bf2c9f;', index) + this.$emit('open-modal', index) }, // 点击unzoom handleUnzoom() { diff --git a/src/views/spectrumAnalysis/components/Modals/SelfStation/BetaModal.vue b/src/views/spectrumAnalysis/components/Modals/SelfStation/BetaModal.vue new file mode 100644 index 0000000..87e494b --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/SelfStation/BetaModal.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/src/views/spectrumAnalysis/components/Modals/SelfStation/CalibrationModal/index.vue b/src/views/spectrumAnalysis/components/Modals/SelfStation/CalibrationModal/index.vue index 3c782e3..86b92ec 100644 --- a/src/views/spectrumAnalysis/components/Modals/SelfStation/CalibrationModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/SelfStation/CalibrationModal/index.vue @@ -191,14 +191,14 @@ export default { // 根据tab页缓存对应数据 if (this.currTab === 'gamma') { this.$ls.set( - 'CALIBRATION_GAMMA_' + inputFileName, - this.$ls.get('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName) + 'SELF_STATION_CALIBRATION_GAMMA_' + inputFileName, + this.$ls.get('SELF_STATION_CALIBRATION_GAMMA_' + this.newSampleData.inputFileName) ) } if (this.currTab === 'beta') { this.$ls.set( - 'CALIBRATION_BETA_' + inputFileName, - this.$ls.get('CALIBRATION_BETA_' + this.newSampleData.inputFileName) + 'SELF_STATION_CALIBRATION_BETA_' + inputFileName, + this.$ls.get('SELF_STATION_CALIBRATION_BETA_' + this.newSampleData.inputFileName) ) } }) @@ -211,8 +211,8 @@ export default { // 如果没有点击ReANalyze,删除fitting之后缓存的数据 20231101:xiao // 1. Beta数据依赖于Gamma // 2. 点击reanalyze,如果beta有数据也要缓存 - this.$ls.remove('CALIBRATION_GAMMA_' + this.newSampleData.inputFileName) - this.$ls.remove('CALIBRATION_BETA_' + this.newSampleData.inputFileName) + this.$ls.remove('SELF_STATION_CALIBRATION_GAMMA_' + this.newSampleData.inputFileName) + this.$ls.remove('SELF_STATION_CALIBRATION_BETA_' + this.newSampleData.inputFileName) } this.visible = false }, diff --git a/src/views/spectrumAnalysis/components/Modals/SelfStation/GammaModal.vue b/src/views/spectrumAnalysis/components/Modals/SelfStation/GammaModal.vue new file mode 100644 index 0000000..7747678 --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/SelfStation/GammaModal.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/src/views/spectrumAnalysis/components/ResultDisplay-Beta.vue b/src/views/spectrumAnalysis/components/ResultDisplay-Beta.vue index 0086612..354eee5 100644 --- a/src/views/spectrumAnalysis/components/ResultDisplay-Beta.vue +++ b/src/views/spectrumAnalysis/components/ResultDisplay-Beta.vue @@ -54,7 +54,7 @@ const columns = [ scopedSlots: { customRender: 'flag', }, - width: 37, + width: 40, }, { title: 'Isotope', @@ -68,7 +68,7 @@ const columns = [ scopedSlots: { customRender: 'concentration', }, - width: 108, + width: 128, }, { title: 'Uncertainty', @@ -76,7 +76,7 @@ const columns = [ scopedSlots: { customRender: 'uncertainty', }, - width: 108, + width: 118, }, { title: 'MDC[mBq/m3]', @@ -152,8 +152,7 @@ export default { .ant-table-thead > tr th { color: #00e9fe; font-family: MicrosoftYaHei; - font-size: 14px; - padding: 4px 4px; + font-size: 16px; background-color: transparent !important; &:first-child { diff --git a/src/views/spectrumAnalysis/components/RoiLimits/components/RoiLimitItem.vue b/src/views/spectrumAnalysis/components/RoiLimits/components/RoiLimitItem.vue index 4ca196f..6a3bd47 100644 --- a/src/views/spectrumAnalysis/components/RoiLimits/components/RoiLimitItem.vue +++ b/src/views/spectrumAnalysis/components/RoiLimits/components/RoiLimitItem.vue @@ -11,7 +11,7 @@ -
+
{ + if (index !== 0) { + seriesItem.data = [] + } + }) } }, immediate: true, @@ -525,7 +532,7 @@ export default { } } - &-content { + &__content { flex: 1; overflow: hidden; } diff --git a/src/views/spectrumAnalysis/components/SpectrumLineChart.vue b/src/views/spectrumAnalysis/components/SpectrumLineChart.vue index a059043..db8b521 100644 --- a/src/views/spectrumAnalysis/components/SpectrumLineChart.vue +++ b/src/views/spectrumAnalysis/components/SpectrumLineChart.vue @@ -56,8 +56,6 @@ const initialOption = { axisLabel: { color: '#ade6ee' }, - name: '', - nameLocation: 'center', nameTextStyle: { fontSize: 14, color: '#5b9cba' @@ -135,7 +133,6 @@ export default { data() { const option = cloneDeep(initialOption) option.series.itemStyle.color = this.color - option.xAxis.name = this.title + ' Channel' return { option, @@ -301,7 +298,7 @@ export default { display: flex; margin-top: 7px; margin-bottom: 8px; - height: calc(100% - 35px); + height: calc(100% - 47px); .left-title { writing-mode: vertical-rl;