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 @@