From 62ca472c62a04420ad7d261b8f1db28963668622 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 29 Aug 2023 19:54:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=B9=E6=8E=A5Energy=20Calibration?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E3=80=81Nuclide=20Library=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=92=8CConfig=20User=20Library=E5=BC=B9=E7=AA=97=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=E5=92=8C=E9=83=A8=E5=88=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomTable/index.vue | 3 + src/mixins/ModalMixin.js | 11 +- src/utils/chartHelper.js | 29 ++ .../components/FitPeaksAndBaselineModal.vue | 15 +- .../AnalyzeInteractiveToolModal/index.vue | 40 +- .../Modals/ConfigUserLibraryModal.vue | 108 +++-- .../Modals/EnergyCalibrationModal.vue | 130 ++++-- .../components/Modals/LoadFromDBModal.vue | 3 + .../components/Modals/NuclideLibraryModal.vue | 391 +++++++++++------- src/views/spectrumAnalysis/gamma-analysis.vue | 31 +- src/views/spectrumAnalysis/index.vue | 8 +- 11 files changed, 512 insertions(+), 257 deletions(-) diff --git a/src/components/CustomTable/index.vue b/src/components/CustomTable/index.vue index b6921f6..99734cb 100644 --- a/src/components/CustomTable/index.vue +++ b/src/components/CustomTable/index.vue @@ -97,6 +97,9 @@ export default { } this.$emit('rowClick', record, index) + }, + dblclick: () => { + this.$emit('rowDblClick', record, index) } } } diff --git a/src/mixins/ModalMixin.js b/src/mixins/ModalMixin.js index def5dd3..8fac17e 100644 --- a/src/mixins/ModalMixin.js +++ b/src/mixins/ModalMixin.js @@ -4,15 +4,20 @@ export default { type: Boolean } }, + data() { + return { + isLoading: false + } + }, computed: { visible: { get() { - if (this.value && this.beforeModalOpen && typeof this.beforeModalOpen == 'function') { - this.beforeModalOpen() - } return this.value }, set(val) { + if (val && this.beforeModalOpen && typeof this.beforeModalOpen == 'function') { + this.beforeModalOpen() + } this.$emit('input', val) } } diff --git a/src/utils/chartHelper.js b/src/utils/chartHelper.js index 511846b..d60b6cf 100644 --- a/src/utils/chartHelper.js +++ b/src/utils/chartHelper.js @@ -59,4 +59,33 @@ export function splitAxis(max, min, cnt, maxBoundaryGap = 1.1) { interval, max: _max } +} + +/** + * 构建线形series + * @param {*} name + * @param {*} data + * @param {*} color + * @param {*} extra + * @returns + */ +export function buildLineSeries(name, data, color, extra = {}) { + return { + name, + type: 'line', + data, + itemStyle: { + color + }, + lineStyle: { + width: 1 + }, + symbol: 'none', + symbolSize: 1, + emphasis: { + disabled: true + }, + animation: false, + ...extra + } } \ No newline at end of file diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue index 371ba15..f2b2774 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue @@ -112,20 +112,7 @@ export default { data() { this.columns = columns return { - list: [ - { - peak: 'peak', - nuclide: 'nuclide', - energy: 'energy', - netAreaInput: 'netAreaInput', - fwhmInput: 'fwhmInput', - Step: 'Step', - bwGamma: 'bwGamma', - netAreaCheckbox: false, - centroid: false, - fwhmCheckbox: false - } - ] + list: [] } }, methods: { diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index ae37649..da79052 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -46,13 +46,13 @@