From 8fb0089be1dd29ea9b8d06c26e41c3f7a6adfa25 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 11 Jul 2023 19:35:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0Interactive=20Tool?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=B8=AD=E7=9A=84=E9=83=A8=E5=88=86=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E5=BC=B9=E7=AA=97=EF=BC=8C=E5=AF=B9=E6=8E=A5=E6=A0=B7?= =?UTF-8?q?=E6=9C=AC=E7=B1=BB=E5=9E=8B=E4=B8=BAbeta-gamma=E7=9A=84?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spectrumAnalysis/beta-gamma-analysis.vue | 247 +- .../components/BetaGammaSpectrumChart.vue | 34 +- .../Modals/AnalyzeInteractiveToolModal.vue | 273 -- .../components/CommentModal.vue | 48 + .../components/FitPeaksAndBaselineModal.vue | 162 + .../components/NuclideReviewChart.vue | 43 + .../components/NuclideReviewModal.vue | 360 ++ .../AnalyzeInteractiveToolModal/index.vue | 459 ++ .../components/Modals/LoadFromDBModal.vue | 14 +- .../components/SpectraListInMenu.vue | 22 +- .../components/SpectrumLineChart.vue | 32 +- .../SubOperators/ButtonWithSwitchIcon.vue | 21 +- src/views/spectrumAnalysis/data.json | 4195 ----------------- src/views/spectrumAnalysis/gamma-analysis.vue | 86 +- src/views/spectrumAnalysis/index.vue | 194 +- 15 files changed, 1463 insertions(+), 4727 deletions(-) delete mode 100644 src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal.vue create mode 100644 src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/CommentModal.vue create mode 100644 src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue create mode 100644 src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue create mode 100644 src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue create mode 100644 src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue delete mode 100644 src/views/spectrumAnalysis/data.json diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 34a5ceb..3e9a077 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -1,80 +1,120 @@ @@ -84,8 +124,10 @@ import BetaGammaSpectrumChart from './components/BetaGammaSpectrumChart.vue' import ComparisonModal from './components/Modals/ComparisonModal.vue' import ResultDisplay from './components/ResultDisplay.vue' import SpectrumLineChart from './components/SpectrumLineChart.vue' - -import twoDData from './data.json' +import DetailedInfomation from './components/SubOperators/DetailedInfomation.vue' +import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue' +import QcFlags from './components/SubOperators/QcFlags.vue' +import Spectra from './components/SubOperators/Spectra.vue' export default { components: { @@ -93,10 +135,23 @@ export default { SpectrumLineChart, ResultDisplay, BetaGammaSpectrumChart, - ComparisonModal + ComparisonModal, + DetailedInfomation, + + PopOverWithIcon, + QcFlags, + Spectra + }, + props: { + data: { + type: Object + } }, data() { return { + spectraVisible: false, + spectraType: 'Sample Data', + resultDisplay: [ { id: 1, @@ -127,13 +182,16 @@ export default { mdc: '0.03464' } ], - twoDData: {}, + histogramDataList: [], + + gammaOriginalData: [], + betaOriginalData: [], + betaProjectedData: [], + gammaProjectedData: [], + comparisonModalVisible: false } }, - created() { - this.getData() - }, methods: { resize() { this.$refs.betaGammaChartRef && this.$refs.betaGammaChartRef.resize() @@ -143,11 +201,6 @@ export default { this.$refs.lineChart4Ref && this.$refs.lineChart4Ref.resize() }, - async getData() { - await 0 - this.twoDData = twoDData - }, - // 鼠标在左侧2d图表上移动时 handlePositionChange([xAxis, yAxis]) { // Gamma Spectrum,根据bata-gamma的gamma channel的值(y轴)进行定位 @@ -186,6 +239,32 @@ export default { this.$refs.betaGammaChartRef.setRange(x1, x2, type) } + }, + watch: { + data: { + handler(newVal) { + const { + betaOriginalData, + betaProjectedData, + gammaOriginalData, + gammaProjectedData, + histogramDataList, // 左侧 Beta-Gamma Spectrum: Sample 图表 + spectrumData + } = newVal + + + console.log('%c [ spectrumData ]-246', 'font-size:13px; background:pink; color:#bf2c9f;', spectrumData) + + this.histogramDataList = histogramDataList + + this.gammaOriginalData = gammaOriginalData + this.betaOriginalData = betaOriginalData + + this.betaProjectedData = betaProjectedData + this.gammaProjectedData = gammaProjectedData + }, + immediate: true + } } } @@ -193,8 +272,12 @@ export default { diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/CommentModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/CommentModal.vue new file mode 100644 index 0000000..da97f6e --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/CommentModal.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue new file mode 100644 index 0000000..371ba15 --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue new file mode 100644 index 0000000..881c0d2 --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue @@ -0,0 +1,43 @@ + + diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue new file mode 100644 index 0000000..da705c1 --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue @@ -0,0 +1,360 @@ + + + + + diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue new file mode 100644 index 0000000..e84bfbe --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -0,0 +1,459 @@ + + + + + diff --git a/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue b/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue index f93e8d6..6be16e6 100644 --- a/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue @@ -26,7 +26,7 @@ From Auto DB From Interactive DB - Load + Load @@ -107,7 +107,7 @@ export default { this.disableMixinCreated = true return { queryParam: { - menuTypes: [], + menuTypes: undefined, startDate: moment() .add(-7, 'd') .format('YYYY-MM-DD'), @@ -121,8 +121,7 @@ export default { detectorList: [], url: { list: '/spectrumAnalysis/getDBSpectrumList' - }, - isLoadingSample: false // 正在加载样例 + } } }, methods: { @@ -185,14 +184,9 @@ export default { this.$message.warn('Please Select Databases To Load') return } - - console.log('%c [ ]-190', 'font-size:13px; background:pink; color:#bf2c9f;', this.selectionRows) - this.isLoadingSample = true - const res = await '' - console.log('%c [ res ]-156', 'font-size:13px; background:pink; color:#bf2c9f;', res) this.selectedRowKeys = [] - this.isLoadingSample = false this.visible = false + this.$emit('loadSample', this.selectionRows) }, // 获取台站和探测器列表 diff --git a/src/views/spectrumAnalysis/components/SpectraListInMenu.vue b/src/views/spectrumAnalysis/components/SpectraListInMenu.vue index ae86d3e..29bbd00 100644 --- a/src/views/spectrumAnalysis/components/SpectraListInMenu.vue +++ b/src/views/spectrumAnalysis/components/SpectraListInMenu.vue @@ -1,10 +1,10 @@