From cbb7cfc941a4142ead8d52933442cf39f49525d5 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Wed, 26 Jul 2023 10:12:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E9=BB=98=E8=AE=A4=E5=8A=A0=E8=BD=BD=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=8C=89=E9=80=89=E6=8B=A9=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=EF=BC=8C=E5=AF=B9=E6=8E=A5Detailed=20Infomation=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spectrumAnalysis/beta-gamma-analysis.vue | 277 +++++++++--------- .../components/Modals/LoadFromDBModal.vue | 2 +- .../BetaGammaDetailedInfomation.vue | 114 +++++++ src/views/spectrumAnalysis/index.vue | 23 +- 4 files changed, 274 insertions(+), 142 deletions(-) create mode 100644 src/views/spectrumAnalysis/components/SubOperators/BetaGammaDetailedInfomation.vue diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 7522132..fa05643 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -1,133 +1,136 @@ @@ -138,8 +141,8 @@ 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 BetaGammaDetailedInfomation from './components/SubOperators/BetaGammaDetailedInfomation.vue' import BetaGammaQcFlags from './components/SubOperators/BetaGammaQcFlags.vue' -import DetailedInfomation from './components/SubOperators/DetailedInfomation.vue' import PopOverWithIcon from './components/SubOperators/PopOverWithIcon.vue' import Spectra from './components/SubOperators/Spectra.vue' @@ -150,11 +153,11 @@ export default { ResultDisplay, BetaGammaSpectrumChart, ComparisonModal, - DetailedInfomation, PopOverWithIcon, Spectra, - BetaGammaQcFlags + BetaGammaQcFlags, + BetaGammaDetailedInfomation }, props: { sample: { @@ -168,6 +171,10 @@ export default { spectraVisible: false, spectraType: 'sample', + isLoading: false, + + spectrumData: {}, // Detailed Infomation 信息 + resultDisplay: [], histogramDataList: [], @@ -191,15 +198,21 @@ export default { this.spectraType = 'sample' const { dbName, sampleId } = this.sample - const { success, result, message } = await getAction('/spectrumAnalysis/getDBSpectrumChart', { - dbName, - sampleId - }) - if (success) { - this.sampleDetail = result - this.changeChartByType('sample') - } else { - this.$message.error(message) + try { + this.isLoading = true + const { success, result, message } = await getAction('/spectrumAnalysis/getDBSpectrumChart', { + dbName, + sampleId + }) + if (success) { + this.sampleDetail = result + this.changeChartByType('sample') + this.isLoading = false + } else { + this.$message.error(message) + } + } catch (error) { + console.error(error) } }, @@ -228,6 +241,8 @@ export default { DetBgBtn // QC Flags 相关 } = this.sampleDetail[type] + this.spectrumData = spectrumData + this.histogramDataList = histogramDataList this.histogramDataDList = histogramDataDList this.boundaryList = Boundary diff --git a/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue b/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue index 0b82737..76e8ede 100644 --- a/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue @@ -107,7 +107,7 @@ export default { this.disableMixinCreated = true return { queryParam: { - menuTypes: undefined, + menuTypes: 'G,B', startDate: moment() .add(-7, 'd') .format('YYYY-MM-DD'), diff --git a/src/views/spectrumAnalysis/components/SubOperators/BetaGammaDetailedInfomation.vue b/src/views/spectrumAnalysis/components/SubOperators/BetaGammaDetailedInfomation.vue new file mode 100644 index 0000000..e92133a --- /dev/null +++ b/src/views/spectrumAnalysis/components/SubOperators/BetaGammaDetailedInfomation.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index 4ae9c92..3bf5345 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -30,7 +30,10 @@
- + +
+ Please Select a Sample +
@@ -298,7 +301,7 @@ export default { betaGammaCommentsModalVisible: false, // beta-gamma Comments isBetaGammaCommentsAdd: false, // beta-gamma comments 是否新增 - betaGammaEnergyCalibrationModalVisible: true, // beta-gamma 的 Energy Calibration 弹窗 + betaGammaEnergyCalibrationModalVisible: false, // beta-gamma 的 Energy Calibration 弹窗 betaGammaSpectrumModalVisible: false, // beta-gamma spectrum 弹窗 betaGammaSampleInfomationModalVisible: false, // beta-gamma sample infomation 弹窗 @@ -307,14 +310,6 @@ export default { statisticsParamerHistoryModalVisible: false // beta-gamma Statistics Paramer History 弹窗 } }, - created() { - // 测试 - this.loadSelectedSample({ - dbName: 'auto', - sampleType: 'B', - sampleId: 426120 - }) - }, methods: { // 从数据库加载-选择完成 handleLoadSampleFromDB(sampleList) { @@ -335,6 +330,7 @@ export default { // 清理全部 handleCleanAll() { this.sampleList = [] + this.sampleData = {} }, // 保存结果到文件, 服务端生成文件,前端下载 @@ -970,4 +966,11 @@ export default { } } } + +.empty { + padding-top: 100px; + font-size: 20px; + font-weight: bold; + text-align: center; +}