From 709a0c069a6d77543a4699a3b00b83a670b5544f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 16 Nov 2023 18:19:24 +0800 Subject: [PATCH] =?UTF-8?q?gamma=E5=8A=9F=E8=83=BD=E7=9A=84configureSave?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=20=E5=A2=9E=E5=8A=A0=20applyAll=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20Reprocessing=20all=20=E8=AF=B7=E6=B1=82=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E6=97=B6=E5=80=99=E6=94=B9=E4=B8=BA=E4=BE=9D?= =?UTF-8?q?=E6=AC=A1=E8=B0=83=E7=94=A8=E5=88=86=E6=9E=90=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E5=88=86=E6=9E=90=E5=85=A8=E9=83=A8=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E5=8D=95=E4=B8=AA=E6=96=87=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E5=BC=B9=E7=AA=97=EF=BC=9B=20=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=85=A8=E9=83=A8=E7=9A=84=E6=97=B6=E5=80=99=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BF=9B=E5=BA=A6=E6=9D=A1=E5=BC=B9=E7=AA=97=EF=BC=9B?= =?UTF-8?q?=20beta=E7=9A=84Statistics=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=AD=97=E6=AE=B5=20xeResu?= =?UTF-8?q?ltFlag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Modals/AnalyzeSettingModal.vue | 2 + .../StatisticsParamerHistoryModal.vue | 77 ++++++++++--------- .../Modals/ProcessingMonitorModal.vue | 48 ++++++++++++ src/views/spectrumAnalysis/gamma-analysis.vue | 4 +- src/views/spectrumAnalysis/index.vue | 72 ++++++++++++++--- 5 files changed, 153 insertions(+), 50 deletions(-) create mode 100644 src/views/spectrumAnalysis/components/Modals/ProcessingMonitorModal.vue diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue index 2b14225..5ae6e68 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeSettingModal.vue @@ -177,6 +177,7 @@ export default { dateTime_Conc, checkBox_updateCal, checkBox_keepPeak, + group_calPS, } = this.model const param = { @@ -196,6 +197,7 @@ export default { refTime_conc: dateTime_Conc, updateCalibration: checkBox_updateCal, keepCalPeakSearchPeaks: checkBox_keepPeak, + applyAll: group_calPS || false, } const { success, message } = await postAction('/gamma/configureSave', param) diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue index 00da396..18c4898 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/StatisticsParamerHistoryModal.vue @@ -61,7 +61,7 @@ - Xe Result Flag + Xe Result Flag
@@ -157,7 +157,7 @@ const initialOption = { right: 10, left: 40, top: 20, - bottom: 60 + bottom: 60, }, legend: { show: false, @@ -166,62 +166,62 @@ const initialOption = { right: 20, z: 999, textStyle: { - color: '#fff' + color: '#fff', }, backgroundColor: '#022024', borderColor: '#0b8c82', borderWidth: 1, - itemWidth: 50 + itemWidth: 50, }, xAxis: { type: 'category', axisLine: { lineStyle: { - color: 'rgba(119, 181, 213, .3)' - } + color: 'rgba(119, 181, 213, .3)', + }, }, axisLabel: { color: '#ade6ee', fontSize: 12, rotate: 45, margin: 10, - formatter: value => { + formatter: (value) => { return moment(value).format('YYYY/MM/DD') }, - interval: 4 + interval: 4, }, splitLine: { show: true, lineStyle: { - color: 'rgba(119, 181, 213, .3)' - } + color: 'rgba(119, 181, 213, .3)', + }, }, axisTick: { - show: false + show: false, }, - data: [] + data: [], }, yAxis: { axisLine: { lineStyle: { - color: 'rgba(119, 181, 213, .3)' - } + color: 'rgba(119, 181, 213, .3)', + }, }, axisLabel: { color: '#ade6ee', - fontSize: 12 + fontSize: 12, }, splitLine: { show: true, lineStyle: { - color: 'rgba(119, 181, 213, .3)' - } + color: 'rgba(119, 181, 213, .3)', + }, }, axisTick: { - show: false - } + show: false, + }, }, - series: [] + series: [], } // 左侧配置 @@ -244,7 +244,7 @@ const initialFilterOption = { xeVolumeLine: 0.87, mdcLine: 0, concLine: 0, - nuclidesList: [] + nuclidesList: [], } export default { components: { TitleOverBorder, CustomChart }, @@ -254,8 +254,10 @@ export default { option: cloneDeep(initialOption), initialMDC: {}, // 初始化的信息,用于重置 - queryParams: {}, - detectorList: [] // 探测器列表 + queryParams: { + xeResFlag: false, + }, + detectorList: [], // 探测器列表 } }, methods: { @@ -265,7 +267,7 @@ export default { const { sampleId, inputFileName: sampleFileName } = this.sampleData const { success, message, result } = await getAction('/spectrumAnalysis/viewMDC', { sampleId, - sampleFileName + sampleFileName, }) if (success) { this.setStationAndDetector(result) @@ -303,7 +305,7 @@ export default { this.queryParams.stationName = stationName this.detectorList = detectorList.map(({ detectorCode, detectorId }) => ({ label: detectorCode, - value: detectorId || '' + value: detectorId || '', })) this.queryParams.detectorName = detectorList[0].detectorCode this.queryParams.detectorId = detectorList[0].detectorId || '' @@ -315,7 +317,7 @@ export default { this.queryParams.stationName = this.initialMDC.stationName this.detectorList = this.initialMDC.detectorList.map(({ detectorCode, detectorId }) => ({ label: detectorCode, - value: detectorId || '' + value: detectorId || '', })) }, @@ -327,29 +329,28 @@ export default { } try { - const find = this.detectorList.find(item => item.value == this.queryParams.detectorId) + const find = this.detectorList.find((item) => item.value == this.queryParams.detectorId) const { success, message, result } = await postAction('/spectrumAnalysis/statisticsQuery', { - detectorCode: find? find.label: '', - ...this.queryParams + detectorCode: find ? find.label : '', + ...this.queryParams, }) if (success) { if (result) { - this.option.xAxis.data = result[0].m_Keys this.option.legend.show = true - this.option.series = result.map(item => { + this.option.series = result.map((item) => { return { type: 'line', name: item.m_strGraphName, data: item.m_Values, itemStyle: { - color: item.m_GraphPen + color: item.m_GraphPen, }, lineStyle: { - color: item.m_GraphPen + color: item.m_GraphPen, }, - symbol: 'circle' + symbol: 'circle', } }) } else { @@ -375,17 +376,17 @@ export default { this.queryParams = { ...initialFilterOption, startTime: moment().format('YYYY-MM-DD'), - endTime: moment().format('YYYY-MM-DD') + endTime: moment().format('YYYY-MM-DD'), } this.option = cloneDeep(initialOption) - } + }, }, computed: { filterDisabled() { return !this.queryParams.filterGrpbox - } - } + }, + }, } diff --git a/src/views/spectrumAnalysis/components/Modals/ProcessingMonitorModal.vue b/src/views/spectrumAnalysis/components/Modals/ProcessingMonitorModal.vue new file mode 100644 index 0000000..0ef27d3 --- /dev/null +++ b/src/views/spectrumAnalysis/components/Modals/ProcessingMonitorModal.vue @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue index 75a3904..5124d0a 100644 --- a/src/views/spectrumAnalysis/gamma-analysis.vue +++ b/src/views/spectrumAnalysis/gamma-analysis.vue @@ -1534,9 +1534,10 @@ export default { try { this.isLoading = true + const str = `&processKey=${userId}_${this.timerStamp}` const { inputFileName: fileName } = this.sample const { success, result, message } = await postAction( - `/gamma/Reprocessing?fileName=${fileName}&processKey=${userId}_${this.timerStamp}` + `/gamma/Reprocessing?fileName=${fileName}${showMessage ? str : ''}` ) if (success) { this.reprocessingModalVisible = false //如果分析成功了,分析进度的弹窗即便是没有接收到后面的 ws 消息也要关闭弹窗 @@ -1546,6 +1547,7 @@ export default { this.handleResetState() result.DetailedInformation = this.detailedInfomation this.dataProcess(result) + return success } else { this.isLoading = false if (showMessage) { diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index 9887550..785ac27 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -93,6 +93,13 @@ @senInfo="getUpdateFlag" /> + + + sample.sampleType !== 'B') + this.gammaSampleNum = gammaSampleList.length + const gammaInputFileNames = gammaSampleList.map((item) => item.inputFileName) - // 先排除当前的谱 - const otherSampleList = this.sampleList.filter((sample) => sample.inputFileName !== inputFileName) + if (gammaInputFileNames.length > 0) { + this.fetchReprocessing(gammaInputFileNames, inputFileName, sampleType) + } - const betaSamples = otherSampleList.filter((sample) => sample.sampleType == 'B') - const gammaSamples = otherSampleList.filter((sample) => sample.sampleType !== 'B') - gammaSamples.forEach((gammaSample) => { - postAction(`/gamma/Reprocessing?fileName=${gammaSample.inputFileName}`) - }) + // // 先排除当前的谱 + // const otherSampleList = this.sampleList.filter((sample) => sample.inputFileName !== inputFileName) - // 处理当前的谱的reprocessing - if (inputFileName && sampleType !== 'B') { - this.$refs.gammaAnalysisRef.reProcessing(false) + // const betaSamples = otherSampleList.filter((sample) => sample.sampleType == 'B') + // const gammaSamples = otherSampleList.filter((sample) => sample.sampleType !== 'B') + // gammaSamples.forEach((gammaSample) => { + // postAction(`/gamma/Reprocessing?fileName=${gammaSample.inputFileName}`) + // }) + + // // 处理当前的谱的reprocessing + // if (inputFileName && sampleType !== 'B') { + // this.$refs.gammaAnalysisRef.reProcessing(false) + // } + }, + async fetchReprocessing(fileNames, currFileName, sampleType) { + if (fileNames[0] == currFileName && sampleType !== 'B') { + this.$refs.gammaAnalysisRef.reProcessing(false).then((res) => { + if (res) { + this.finishCont++ + this.percentBar = this.finishCont / this.gammaSampleNum + this.analysedFileName = fileNames.splice(0, 1) + if (fileNames.length > 0) { + this.fetchReprocessing(fileNames, currFileName, sampleType) + } + } + }) + } else { + try { + const { success, result, message } = await postAction(`/gamma/Reprocessing?fileName=${fileNames[0]}`) + if (success) { + this.finishCont++ + this.percentBar = this.finishCont / this.gammaSampleNum + this.analysedFileName = fileNames.splice(0, 1) + if (fileNames.length > 0) { + this.fetchReprocessing(fileNames, currFileName, sampleType) + } + } + } catch (error) { + console.error(error) + } } }, - // 查看Comments handleViewComments() { // 如果是gamma