From b4782e98df8aa05c6cb2d90d8e5423be817183fa Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Fri, 13 Oct 2023 10:33:46 +0800 Subject: [PATCH 01/22] =?UTF-8?q?fix:=20=E4=BB=8E=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AB=AF=E5=8A=A0=E8=BD=BD=E8=B0=B1=E5=8F=91=E7=94=9F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=97=B6=EF=BC=8C=E5=85=B3=E9=97=ADloading=EF=BC=9B?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dreprocessing=E6=9C=AA=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=97=B6=E4=B9=9F=E4=BA=8B=E5=85=88=E6=B8=85=E9=99=A4=E4=BA=86?= =?UTF-8?q?series=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/gamma-analysis.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue index 43aa8c4..c13c2ec 100644 --- a/src/views/spectrumAnalysis/gamma-analysis.vue +++ b/src/views/spectrumAnalysis/gamma-analysis.vue @@ -306,9 +306,11 @@ export default { this.dataProsess(result, 'db') } else { this.$message.error(message) + this.isLoading = false } } catch (error) { console.error(error) + this.isLoading = false } }, @@ -334,9 +336,11 @@ export default { this.dataProsess(result, 'file') } else { this.$message.error(message) + this.isLoading = false } } catch (error) { console.error(error) + this.isLoading = false } }, @@ -1216,11 +1220,10 @@ export default { try { this.isLoading = true - this.handleResetState() - const { inputFileName: fileName } = this.sample const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileName}`) if (success) { + this.handleResetState() result.DetailedInformation = this.detailedInfomation this.dataProsess(result) } else { From d37106f05fca3a52701ad92bd0899ddc08d4e27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Fri, 13 Oct 2023 11:48:04 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=20=E8=B0=83=E6=95=B4=E5=90=8E=E7=AB=AFbe?= =?UTF-8?q?ta=20loadFromFile=20=E5=92=8C=20loadFromDB=E7=9A=84=20XeData?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/beta-gamma-analysis.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 7d5f098..7fb98b8 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -323,7 +323,6 @@ export default { histogramDataDList, // 左侧 Beta-Gamma Spectrum: Sample 图表的3D部分 Boundary, // 左侧2d图表的矩形 - XeData, // 右下角Result Display spectrumData, AcqTimeBtn, // QC Flags 相关 @@ -333,6 +332,9 @@ export default { GasBgBtn, // QC Flags 相关 DetBgBtn, // QC Flags 相关 } = this.sampleDetail[this.spectraType] + const { + XeData, // 右下角Result Display + } = this.sampleDetail this.spectrumData = spectrumData From 7cc143bbd45867e4cdd6980425b7930f93bf9be3 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Fri, 13 Oct 2023 19:07:38 +0800 Subject: [PATCH 03/22] =?UTF-8?q?WIP:=20=E4=BF=AE=E6=94=B9Insert=E5=92=8CF?= =?UTF-8?q?it=20Peak=E6=8E=A5=E5=8F=A3=E5=92=8C=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0BaseLine=E7=9A=84Accept=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FitPeaksAndBaselineModal.vue | 95 ++++++++++++------- .../AnalyzeInteractiveToolModal/index.vue | 69 ++++++++++---- 2 files changed, 110 insertions(+), 54 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue index 73502a1..ca12c50 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/FitPeaksAndBaselineModal.vue @@ -6,16 +6,29 @@ Fixed - +
- + Peaks - Cancel + Cancel
@@ -25,6 +38,7 @@ import { getAction, postAction } from '@/api/manage' import ModalMixin from '@/mixins/ModalMixin' import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin' +import { cloneDeep } from 'lodash' const columns = [ { @@ -116,8 +130,14 @@ const columns = [ export default { mixins: [ModalMixin, SampleDataMixin], props: { - curChan: { + channel_1: { type: Number + }, + channel_2: { + type: Number + }, + isInsertPeak: { + type: Boolean } }, data() { @@ -129,18 +149,20 @@ export default { } }, methods: { - // 接收 - async handlePeaks() { + async handlePeaks(accept) { try { this.isAcceptting = true const { inputFileName: fileName } = this.sampleData const { success, result, message } = await postAction('/gamma/acceptResults', { fileName, - accept: true + accept, + oldPeaks: this.oldPeaks, + newPeak: this.newPeaks, + flag: this.isInsertPeak ? 'insert' : 'fit' }) if (success) { this.visible = false - this.$emit('result', result) + this.$emit(accept ? 'result' : 'cancel', result) } else { this.$message.error(message) } @@ -151,46 +173,51 @@ export default { } }, - // 取消 - async handleCancel() { - try { - this.isCanceling = true - const { inputFileName: fileName } = this.sampleData - const { success, result, message } = await postAction('/gamma/acceptResults', { - fileName, - accept: false, - oldPeak: this.oldPeaks - }) - if (success) { - this.visible = false - this.$emit('cancel', result) - } else { - this.$message.error(message) + // 值变化 + handleInput(record, index) { + const find = this.newPeaks.find(item => item.index == record.lab) + if (find) { + const table2NewPeakMap = { + energy: 'energy', + netArea: 'area', + fwhm: 'fwhm' } - } catch (error) { - console.error(error) - } finally { - this.isCanceling = false + + find[table2NewPeakMap[index]] = record[index] } }, async getData() { + const { sampleId, inputFileName: fileName } = this.sampleData try { + let url = '/gamma/fitPeak' + let params = { + left: this.channel_1, + right: this.channel_2, + fileName + } + + // 如果是Insert Peak + if (this.isInsertPeak) { + url = '/gamma/insertPeak' + params = { + sampleId, + fileName, + curChan: Math.ceil(this.channel_1) + } + } + this.isLoading = true - const { sampleId, inputFileName } = this.sampleData - const { success, result, message } = await getAction('/gamma/insertPeak', { - sampleId, - fileName: inputFileName, - curChan: Math.ceil(this.curChan) - }) + const { success, result, message } = await getAction(url, params) if (success) { - const { oldPeaks, tablePeaksList } = result + const { newPeaks, oldPeaks, tablePeaksList } = result tablePeaksList.forEach(item => { item.energy = Number(item.energy).toPrecision(6) item.netArea = Number(item.netArea).toPrecision(6) item.fwhm = Number(item.fwhm).toPrecision(6) }) this.list = tablePeaksList + this.newPeaks = newPeaks this.oldPeaks = oldPeaks } else { this.$message.error(message) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index 3b1e0ac..944a233 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -181,7 +181,9 @@ @@ -461,6 +463,11 @@ export default { model: cloneDeep(nuclideIdentifyModal), currChannel: undefined, // 当currChannel前选中的channel + + channel_1: undefined, // 用于Fit Peaks And Baseline Modal的道值 + channel_2: undefined, + isInsertPeak: false, // 是否是插入Peak + selectedTableItem: undefined, // 当前选中的表格项 isModifying: false, // 正在修改控制点 @@ -636,6 +643,9 @@ export default { return } + this.channel_1 = left + this.channel_2 = right + this.isInsertPeak = false this.fitPeaksAndBaselineModalVisible = true this.isFitting = false @@ -737,7 +747,10 @@ export default { return } + this.channel_1 = this.currChannel + this.fitPeaksAndBaselineModalVisible = true + this.isInsertPeak = true }, // 点击 Fit Peak XXX 弹窗中的 Peaks 按钮 @@ -772,13 +785,13 @@ export default { series.push(this.buildBaseLine(channelBaseLineChart)) // 推入旧的Count - series.push(this.buildCountLine(channelCountChart)) + series.push(this.buildCountLine(this.channelCountChart)) // 推入Peak series.push(...this.buildPeaks(channelPeakChart)) // 推入旧的基线控制点 - series.push(this.buildCtrlPoint(channelBaseCPChart)) + series.push(this.buildCtrlPoint(this.channelBaseCPChart)) this.thumbnailOption.series = this.buildBarChart(barChart) @@ -1278,27 +1291,43 @@ export default { }, // 确定对Baseline Control Points 的操作 - handleAccept() { + async handleAccept() { this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) const { baseline, xctrl, yctrl } = this.BaseCtrls - this.channelBaseLineChart.pointlist = baseline.map((val, index) => { - return { - x: index + 1, - y: val - } - }) + // this.channelBaseLineChart.pointlist = baseline.map((val, index) => { + // return { + // x: index + 1, + // y: val + // } + // }) - this.channelBaseCPChart = xctrl.map((val, index) => { - return { - color: this.channelBaseCPChart[0].color, - name: index.toString(), - point: { - x: val, - y: yctrl[index] - }, - size: 4 + // this.channelBaseCPChart = xctrl.map((val, index) => { + // return { + // color: this.channelBaseCPChart[0].color, + // name: index.toString(), + // point: { + // x: val, + // y: yctrl[index] + // }, + // size: 4 + // } + // }) + + const { inputFileName: fileName } = this.sampleData + + try { + const { success, result, message } = await postAction('/gamma/acceptBaseLine', { + ...this.BaseCtrls, + fileName + }) + if(success) { + console.log('%c [ ]-1312', 'font-size:13px; background:pink; color:#bf2c9f;', result) + } else { + this.$message.error(message) } - }) + } catch (error) { + console.error(error) + } this.handleSwitchOperation() From 90cfebf23e67001dd932ca474e96660b4bbeedbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Fri, 13 Oct 2023 19:49:20 +0800 Subject: [PATCH 04/22] =?UTF-8?q?beta=20=E9=87=8D=E6=96=B0=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5=EF=BC=8C=E5=8F=8A?= =?UTF-8?q?save=20to=20DB=20=E5=8A=9F=E8=83=BD=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BetaDetectorCalibration.vue | 3 ++ .../components/GammaDetectorCalibration.vue | 3 ++ .../BetaGammaEnergyCalibrationModal/index.vue | 52 ++++++++++++++++--- src/views/spectrumAnalysis/index.vue | 49 +++++++++++++++-- 4 files changed, 97 insertions(+), 10 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue index 9d16ab4..c098dba 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue @@ -596,6 +596,7 @@ export default { count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小 isFirstFitting: true, isInverse: false, // 是否需要反算 + betaIsFitting: false, } }, created() { @@ -869,6 +870,8 @@ export default { }) if (success) { this.isFirstFitting = false + this.betaIsFitting = true + this.$emit('isFitting', this.betaIsFitting) const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result this.newE2C = EToC diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/GammaDetectorCalibration.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/GammaDetectorCalibration.vue index 2fc9bb9..aa1ec94 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/GammaDetectorCalibration.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/GammaDetectorCalibration.vue @@ -467,6 +467,7 @@ export default { count: 0, //反算时需要传递的数值 非反算的情况下不需要传递 数值大小是 第一次调用接口时返回的tableWidgets 大小 isFirstFitting: true, isInverse: false, // 是否需要反算 + gammaIsFitting: false, } }, created() { @@ -646,6 +647,8 @@ export default { }) if (success) { this.isFirstFitting = false + this.gammaIsFitting = false + this.$emit('isFitting', this.gammaIsFitting) const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result this.newE2C = EToC diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue index df6f889..2ac1900 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue @@ -9,19 +9,19 @@ > - + - + - +
Station code
- +
Detector code
- +
Sample geometry
- +
- - P - G - B + + P + G + B - - PREL - FULL + + PREL + FULL

Sample reference identification

- +

Background measurement identification

- +
Transmit time - +
@@ -103,8 +116,29 @@ diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue index 9014786..bc4f7e9 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue @@ -3,23 +3,31 @@
- + - + - + - +
-

- Total air volume sampled -

- +

Total air volume sampled

+
@@ -30,58 +38,63 @@ Designator - +
Station code
- +
Detector code
- +
Sample geometry
- +
- - P - G - B + + P + G + B - - PREL - FULL + + PREL + FULL

Sample reference identification

- +

Background measurement identification

- +
Transmit time - +
@@ -103,8 +116,29 @@ diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index b4e3188..e0a0afa 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -734,7 +734,7 @@ export default { { type: 'a-menu-item', title: 'Ftransit', - show: this.isGamma, + show: this.isGamma || this.isBetaGamma, handler: () => (this.ftransltModalVisible = true), }, { From 4edd3d250b414425fcab2df489d20324dd4cf1c5 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Mon, 16 Oct 2023 19:26:51 +0800 Subject: [PATCH 09/22] =?UTF-8?q?feat:=20Replot=E5=8A=9F=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnalyzeInteractiveToolModal/index.vue | 106 +++++++++++++----- 1 file changed, 80 insertions(+), 26 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index 17559f6..2a42fd6 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -104,7 +104,7 @@ Undo
- Replot + Replot
Accept @@ -474,6 +474,7 @@ export default { isFitting: false, // 正在进行Fit操作 firstFittingChannel: null, // Fit操作时点击的第一个channel isAccepting: false, + isReploting: false, operationStack: [] // 操作记录 } @@ -529,7 +530,6 @@ export default { this.setChartOption(channelBaseLineChart, channelCountChart, channelPeakChart, channelBaseCPChart, barChart) this.list = table - } else { this.$message.error(message) } @@ -787,7 +787,13 @@ export default { this.channelBaseLineChart = channelBaseLineChart this.barChart = barChart - this.setChartOption(channelBaseLineChart, this.channelCountChart, channelPeakChart, this.channelBaseCPChart, barChart) + this.setChartOption( + channelBaseLineChart, + this.channelCountChart, + channelPeakChart, + this.channelBaseCPChart, + barChart + ) this.list = table }, @@ -796,7 +802,13 @@ export default { const { channelPeakChart, table } = result this.channelPeakChart = channelPeakChart - this.setChartOption(this.channelBaseLineChart, this.channelCountChart, channelPeakChart, this.channelBaseCPChart, this.barChart) + this.setChartOption( + this.channelBaseLineChart, + this.channelCountChart, + channelPeakChart, + this.channelBaseCPChart, + this.barChart + ) this.list = table }, @@ -1035,7 +1047,10 @@ export default { else { this.btnGroupType = 1 this.opts.notMerge = true - this.option.series.splice(this.option.series.length - 1, 1) // 去掉白色的基线副本 + const baseLineEditSeries = findSeriesByName(this.option.series, 'BaseLine_Edit') + const index = this.option.series.findIndex(item => item == baseLineEditSeries) + this.option.series.splice(index, 1) + this.clearRect() const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine') @@ -1044,6 +1059,8 @@ export default { const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point') baseLineCP.data = this.buildCPPointData(this.channelBaseCPChart) + this.redrawPeaks(this.channelPeakChart) + this.$nextTick(() => { this.resetChartOpts() }) @@ -1098,6 +1115,14 @@ export default { } }, + // 重绘Peaks + redrawPeaks(peakList) { + this.option.series = this.option.series.filter((item) => { + return !item.name.includes('Peak_') + }) + this.option.series.push(...this.buildPeaks(peakList)) + }, + /** * 设置小方块可拖拽 */ @@ -1231,26 +1256,53 @@ export default { }, // 将原先的基线和控制点移动到新位置 - handleReplot() { - const { xctrl, yctrl, yslope, baseline } = this.baseCtrls_Copy - const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine') - baseLineSeries.data = baseline.map((val, index) => [index + 1, val]) + async handleReplot() { + try { + const { inputFileName: fileName } = this.sampleData + this.isReploting = true + const { success, result, message } = await postAction('/gamma/replotBaseLine', { + ...this.baseCtrls_Copy, + fileName, + replotNeeded: true + }) + if (success) { + const { chartData, peakSet, shapeData } = result - const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point') - // 第一个控制点(因为第一个和最后一个不会被删除) - const firstCP = this.channelBaseCPChart[0] - const { color, size } = firstCP - const baseCPPoints = xctrl.map((xAxis, index) => { - return { - size, - color, - point: { - x: xAxis, - y: yctrl[index] - } + const { xctrl, yctrl, yslope, baseline } = this.baseCtrls_Copy + const baseLineSeries = findSeriesByName(this.option.series, 'BaseLine') + baseLineSeries.data = baseline.map((val, index) => [index + 1, val]) + + const baseLineCP = findSeriesByName(this.option.series, 'BaseLine_Ctrl_Point') + // 第一个控制点(因为第一个和最后一个不会被删除) + const firstCP = this.channelBaseCPChart[0] + const { color, size } = firstCP + const baseCPPoints = xctrl.map((xAxis, index) => { + return { + size, + color, + point: { + x: xAxis, + y: yctrl[index] + } + } + }) + baseLineCP.data = this.buildCPPointData(baseCPPoints) + + this.opts.notMerge = true + this.redrawPeaks(peakSet) + this.$nextTick(() => { + this.resetChartOpts() + }) + + this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) + } else { + this.$message.error(message) } - }) - baseLineCP.data = this.buildCPPointData(baseCPPoints) + } catch (error) { + console.error(error) + } finally { + this.isReploting = false + } }, /** @@ -1272,8 +1324,8 @@ export default { // 确定对Baseline Control Points 的操作 async handleAccept() { - this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) - const { baseline, xctrl, yctrl } = this.BaseCtrls + // this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) + // const { baseline, xctrl, yctrl } = this.BaseCtrls // this.channelBaseLineChart.pointlist = baseline.map((val, index) => { // return { // x: index + 1, @@ -1298,10 +1350,12 @@ export default { try { this.isAccepting = true const { success, result, message } = await postAction('/gamma/acceptBaseLine', { - ...this.BaseCtrls, + ...this.baseCtrls_Copy, fileName }) if (success) { + this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) + const { allData, barChart, From 0f8d019a562c6876fe4b8c9424ffeeebd92a5c04 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 17 Oct 2023 10:00:48 +0800 Subject: [PATCH 10/22] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=80=BB=E8=BE=91=E5=92=8C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spectrumAnalysis/beta-gamma-analysis.vue | 3 ++- .../AnalyzeInteractiveToolModal/index.vue | 27 ++++++++++++------- src/views/spectrumAnalysis/index.vue | 6 +++-- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 7fb98b8..82eda6e 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -251,7 +251,6 @@ export default { if (success) { this.sampleDetail = result this.changeChartByType('sample') - this.isLoading = false this.$emit('getFiles', { detFileName: result.detBg.fileName, gasFileName: result.gasBg.fileName, @@ -262,6 +261,8 @@ export default { } } catch (error) { console.error(error) + } finally { + this.isLoading = false } }, async getSampleDetail_file() { diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index 2a42fd6..0c6f33b 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -476,7 +476,8 @@ export default { isAccepting: false, isReploting: false, - operationStack: [] // 操作记录 + operationStack: [], // 操作记录 + replotNeeded: false } }, created() { @@ -563,6 +564,7 @@ export default { this.btnGroupType = 1 this.opts.notMerge = false this.isFitting = false + this.replotNeeded = false this.$nextTick(() => { this.option.brush = { toolbox: [] } this.selectedKeys = [] @@ -611,13 +613,12 @@ export default { } } - const selectedRow = this.list[index] - - this.selectedKeys = [selectedRow.index] - - this.getSelPosNuclide(selectedRow) - - this.selectedTableItem = selectedRow + if (this.list.length) { + const selectedRow = this.list[index] + this.selectedKeys = [selectedRow.index] + this.getSelPosNuclide(selectedRow) + this.selectedTableItem = selectedRow + } // 如果点击了Fit按钮 if (this.isFitting) { @@ -1027,6 +1028,7 @@ export default { if (this.btnGroupType == 1) { this.btnGroupType = 2 this.baseCtrls_Copy = cloneDeep(this.BaseCtrls) + this.replotNeeded = false // 供编辑的白色基线 const baseLineEditSeries = buildLineSeries( @@ -1100,6 +1102,7 @@ export default { // 重新生成基线 redrawBaseLine() { + this.replotNeeded = true try { console.time('updateBaseLine') const res = updateBaseLine(JSON.stringify(this.baseCtrls_Copy)) @@ -1117,7 +1120,7 @@ export default { // 重绘Peaks redrawPeaks(peakList) { - this.option.series = this.option.series.filter((item) => { + this.option.series = this.option.series.filter(item => { return !item.name.includes('Peak_') }) this.option.series.push(...this.buildPeaks(peakList)) @@ -1257,13 +1260,16 @@ export default { // 将原先的基线和控制点移动到新位置 async handleReplot() { + if (!this.replotNeeded) { + return + } try { const { inputFileName: fileName } = this.sampleData this.isReploting = true const { success, result, message } = await postAction('/gamma/replotBaseLine', { ...this.baseCtrls_Copy, fileName, - replotNeeded: true + replotNeeded: this.replotNeeded }) if (success) { const { chartData, peakSet, shapeData } = result @@ -1295,6 +1301,7 @@ export default { }) this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) + this.replotNeeded = false } else { this.$message.error(message) } diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index e0a0afa..d1b5a9f 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -794,6 +794,7 @@ export default { key: 'all', }, ], + key: 'resultsToDB' }, { title: 'Save PHD to File', @@ -807,6 +808,7 @@ export default { key: 'all', }, ], + key: 'phdToFile' }, ], width: '170px', @@ -817,9 +819,9 @@ export default { this.saveSettingModalVisible = true }, submenuClick: ({ item, child }) => { - if (item.title == 'Save Results to DB') { + if (item.key == 'resultsToDB') { this.handleSaveResultsToDB(child.key) - } else if (item.title == 'Save PHD to File') { + } else if (item.key == 'phdToFile') { this.handleSavePHDToFile(child.key) } }, From 83d3da81adb407d246ef2c147dae07b66b06056c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 17 Oct 2023 14:35:56 +0800 Subject: [PATCH 11/22] =?UTF-8?q?gamma=20File-Format-Ftransit=20=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=B8=ADSpectrum=20Transfer=20=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CanberraIECImsTransfer.vue | 42 +++++++++++++++++-- .../components/IntSpcImsTransfer.vue | 42 +++++++++++++++++-- 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue index 26c9c6f..0249d07 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/CanberraIECImsTransfer.vue @@ -100,16 +100,24 @@
-
Canberra IEC1455(.IEC)
+
+ +
Canberra IEC1455(.IEC)
+
+
Data type
-
IMS .ims .rms
+
+ +
IMS .ims .rms
+
+
- +
@@ -137,8 +145,32 @@ export default { backgroundMea: '0', transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'), }, + dataSource: [], + targetKeys: [], } }, + methods: { + ortecBeforeUpload(file, fileList) { + console.log(file, fileList) + this.dataSource = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + }, + imsBeforeUpload(file, fileList) { + console.log(file, fileList) + let arr = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + this.targetKeys = arr.map((item) => item.key) + this.dataSource.push(...arr) + }, + }, } @@ -239,6 +271,10 @@ export default { background-color: #225a6a; height: 32px; line-height: 32px; + /deep/.ant-upload { + width: 100%; + cursor: pointer; + } } } diff --git a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue index bc4f7e9..5a2ff6a 100644 --- a/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue +++ b/src/views/spectrumAnalysis/components/Modals/FtransltModal/components/IntSpcImsTransfer.vue @@ -100,16 +100,24 @@
-
ORTEC int.spc
+
+ +
ORTEC int.spc
+
+
Data type
-
IMS .ims .rms
+
+ +
IMS .ims .rms
+
+
- +
@@ -137,8 +145,32 @@ export default { backgroundMea: '0', transmitTime: moment(new Date()).format('YYYY/MM/DD HH:mm:ss'), }, + dataSource: [], + targetKeys: [], } }, + methods: { + ortecBeforeUpload(file, fileList) { + console.log(file, fileList) + this.dataSource = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + }, + imsBeforeUpload(file, fileList) { + console.log(file, fileList) + let arr = fileList.map((item) => { + return { + key: item.uid, + title: item.name, + } + }) + this.targetKeys = arr.map((item) => item.key) + this.dataSource.push(...arr) + }, + }, } @@ -239,6 +271,10 @@ export default { background-color: #225a6a; height: 32px; line-height: 32px; + /deep/.ant-upload { + width: 100%; + cursor: pointer; + } } } From f0dc11679319122a5f9999644042b55095db65ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 17 Oct 2023 15:15:42 +0800 Subject: [PATCH 12/22] =?UTF-8?q?beta=20=E6=A8=A1=E5=9D=97=20view=20ARR=20?= =?UTF-8?q?=E5=92=8C=20Automatic=20Analysis=20Log=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90=EF=BC=8C=E5=8F=8A=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spectrumAnalysis/index.vue | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index d1b5a9f..35ca69e 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -794,7 +794,7 @@ export default { key: 'all', }, ], - key: 'resultsToDB' + key: 'resultsToDB', }, { title: 'Save PHD to File', @@ -808,7 +808,7 @@ export default { key: 'all', }, ], - key: 'phdToFile' + key: 'phdToFile', }, ], width: '170px', @@ -1077,12 +1077,16 @@ export default { { type: 'a-menu-item', title: 'View ARR', - handler: () => { - this.arrOrRRRModalVisible = true - this.arrOrRRRModalExtraData = {} - this.arrOrRRRModalType = 3 - }, show: this.isBetaGamma, + handler: () => { + if (this.newSampleData.sampleId) { + this.arrOrRRRModalVisible = true + this.arrOrRRRModalExtraData = {} + this.arrOrRRRModalType = 3 + } else { + this.$message.warning("The file isn't existed.") + } + }, }, { type: 'a-menu-item', @@ -1141,16 +1145,13 @@ export default { title: 'Automatic Analysis Log', show: this.isBetaGamma || this.isGamma, handler: () => { - if (this.isGamma) { + if (this.isBetaGamma || this.isGamma) { if (this.newSampleData.sampleId) { this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1 this.autoAnalysisMogModalVisible = true } else { this.$message.warning("The file isn't existed.") } - } else if (this.isBetaGamma) { - this.autoAnalysisMogModalType = this.isGamma ? 1 : this.isBetaGamma ? 2 : 1 - this.autoAnalysisMogModalVisible = true } }, }, From d2878ecd36462c1bbdbbdcf14628b3ad1d277f4d Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 17 Oct 2023 15:25:53 +0800 Subject: [PATCH 13/22] =?UTF-8?q?feat:=20Strip=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modals/CompareFileListModal.vue | 30 ++------- .../components/Modals/StripModal.vue | 36 +++++++--- src/views/spectrumAnalysis/gamma-analysis.vue | 67 +++++++++++++++---- src/views/spectrumAnalysis/index.vue | 14 +--- 4 files changed, 91 insertions(+), 56 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue b/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue index b49e6ec..de8c912 100644 --- a/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/CompareFileListModal.vue @@ -12,7 +12,7 @@ @change="handleTableChange" >
- Compare + Ok Cancel
@@ -22,7 +22,6 @@ import { getAction } from '@/api/manage' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ModalMixin from '@/mixins/ModalMixin' -import SampleDataMixin from '../../SampleDataMixin' const columns = [ { @@ -56,7 +55,7 @@ const formItems = [ ] export default { - mixins: [ModalMixin, JeecgListMixin, SampleDataMixin], + mixins: [ModalMixin, JeecgListMixin], data() { this.columns = columns this.formItems = formItems @@ -64,8 +63,7 @@ export default { return { queryParam: {}, selectedRowKeys: [], - selectionRows: [], - isComparing: false + selectionRows: [] } }, methods: { @@ -109,27 +107,9 @@ export default { this.$message.warn('Please Select A File to Compare') return } - try { - const { inputFileName: fileName } = this.sampleData - const compareFileName = this.selectionRows[0].name - this.isComparing = true - - const { success, result, message } = await getAction('/gamma/Compare', { - fileName, - compareFileName - }) - if (success) { - this.visible = false - this.$emit('compareWithFile', result) - } else { - this.$message.error(message) - } - } catch (error) { - console.error(error) - } finally { - this.isComparing = false - } + this.$emit('fileSelect', this.selectionRows[0].name) + this.visible = false } } } diff --git a/src/views/spectrumAnalysis/components/Modals/StripModal.vue b/src/views/spectrumAnalysis/components/Modals/StripModal.vue index f5cc095..f340871 100644 --- a/src/views/spectrumAnalysis/components/Modals/StripModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/StripModal.vue @@ -1,25 +1,45 @@ From 52e360eca5e30cf310dfbf35351dc388a26f1ea8 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Wed, 18 Oct 2023 17:59:53 +0800 Subject: [PATCH 21/22] =?UTF-8?q?feat:=20=E5=AF=B9=E6=8E=A5=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BetaGammaExtrapolationModal.vue | 199 +++++++++++++----- 1 file changed, 147 insertions(+), 52 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue index 62837f1..6f7ebb9 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaExtrapolationModal.vue @@ -89,16 +89,18 @@
Gamma Window Setting
Gamma Window Begin:
- Channel + + Channel
Gamma Window End:
- Channel + + Channel
Parameter Setting
Min of Energy:
- keV + keV
Half Life:
Day
@@ -106,16 +108,16 @@
Function of Fitting
- - Linear - 2-polynomial + + Linear + 2-polynomial
- Analyse + Analyse Exit
@@ -133,8 +135,10 @@ :class="tableList.length ? 'has-data' : ''" :scroll="{ y: 101 }" > -