diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 62300ba..7153206 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -183,15 +183,15 @@ export default { sampleInfo: { type: Object, }, - // analyseCurrentSpectrum: { - // type: Object, - // }, + analyseCurrentSpectrum: { + type: Object, + }, }, data() { this.SampleType = SampleType return { - analyseCurrentSpectrum: {}, + // analyseCurrentSpectrum: {}, qcFlags: {}, spectraVisible: false, @@ -224,10 +224,24 @@ export default { currSample: {}, } }, + created() { + this.$bus.$on('ReAnalyse', this.redrawRect) + }, destroyed() { this.cancelLastRequest() + this.$bus.$off('ReAnalyse', this.redrawRect) }, methods: { + // 重新绘制矩形框 + redrawRect(result) { + const keys = ['SampleBoundary', 'GasBoundary', 'DetBoundary', 'QCBoundary'] + SampleType.forEach((item, index) => { + const value = result[keys[index]] + this.sampleDetail[item.value].Boundary = value || [] + this.changeChartByType(this.spectraType) + }) + }, + handleGetFlag(val, obj) { this.resultDisplay.forEach((item) => { if (item.nuclideName === obj.nuclideName) { @@ -466,7 +480,8 @@ export default { postAction('/spectrumAnalysis/analyseCurrentSpectrum', params).then((res) => { if (res.success) { // this.isReAnalyed_beta = true - this.analyseCurrentSpectrum = res.result + // this.analyseCurrentSpectrum = res.result + this.$emit('sendXeData', res.result.XeData) if (res.result.XeData && res.result.XeData.length > 0) { res.result.XeData.forEach((item) => { item.conc = parseFloat(item.conc.toPrecision(6)) @@ -493,7 +508,8 @@ export default { } postAction('/spectrumAnalysis/analyseAllSpectrum', params).then((res) => { if (res.success) { - this.analyseCurrentSpectrum = res.result + // this.analyseCurrentSpectrum = res.result + this.$emit('sendXeData', res.result.XeData) res.result.XeData.forEach((item) => { item.conc = parseFloat(item.conc.toPrecision(6)) item.concErr = parseFloat(item.concErr.toPrecision(6)) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index 4604c00..46d6b31 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -799,7 +799,7 @@ export default { shapeChannelData, shapeEnergyData, peak: table, - barChart: this.barChart + barChart: this.barChart, }) this.channelPeakChart = channelPeakChart @@ -892,6 +892,7 @@ export default { barChart: this.barChart, }) + this.opts.notMerge = true this.channelPeakChart = channelPeakChart const series = [] // 推入旧的BaseLine @@ -908,9 +909,10 @@ export default { this.list = table - this.opts.notMerge = true this.option.series = series - this.resetChartOpts() + this.$nextTick(() => { + this.resetChartOpts() + }) this.selectedKeys = [] @@ -1438,7 +1440,7 @@ export default { this.resetChartOpts() }) - this.$bus.$emit('accept', result) + this.$bus.$emit('accept', { ...result, BaseCtrls: cloneDeep(this.baseCtrls_Copy) }) } else { this.$message.error(message) } @@ -1818,7 +1820,12 @@ export default { width: 100%; } } - +::v-deep { + .ant-modal { + top: 5px; + padding-bottom: 7px; + } +} .is-modify, .is-fitting { color: #f00; diff --git a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue index 6f16c6c..11886d3 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/index.vue @@ -10,7 +10,7 @@ > - + @@ -71,7 +71,7 @@ export default { }, betaEnergyValid: false, gammaEnergyValid: false, - isReanlyze: false + isReanlyze: false, } }, methods: { @@ -90,14 +90,14 @@ export default { this.betaEnergyValid = val }, getFittingFlag_gamma(val) { - console.log("zhiqian>>>"+this.gammaEnergyValid); + console.log('zhiqian>>>' + this.gammaEnergyValid) this.gammaEnergyValid = val - console.log("zhihou>>>"+this.gammaEnergyValid); + console.log('zhihou>>>' + this.gammaEnergyValid) }, handleReAnalyse() { // todo 1.fitting之后才能点击; 2.isReAnalyze需要缓存 - if(!this.gammaEnergyValid){ - return false; + if (!this.gammaEnergyValid) { + return false } const regExp = /^([A-Z]{1,}\d{1,})_/ const regMatched = this.newSampleData.inputFileName.match(regExp) @@ -141,15 +141,16 @@ export default { postAction('/spectrumAnalysis/ReAnalyse', params).then((res) => { if (res.success) { res.result.XeData.forEach((item) => { - item.conc = item.conc.toFixed(6) - item.concErr = item.concErr.toFixed(6) - item.lc = item.lc.toFixed(6) - item.mdc = item.mdc.toFixed(6) + item.conc = parseFloat(item.conc.toPrecision(6)) + item.concErr = parseFloat(item.concErr.toPrecision(6)) + item.lc = parseFloat(item.lc.toPrecision(6)) + item.mdc = parseFloat(item.mdc.toPrecision(6)) }) this.$emit('sendXeData', res.result.XeData) this.$message.success('Analyse Success!') this.isReanlyze = true this.handleExit() + this.$bus.$emit('ReAnalyse', res.result) } else { this.$message.warning(res.message) } @@ -157,9 +158,9 @@ export default { }, handleExit() { this.gammaEnergyValid = this.isReanlyze - console.log("exit>>>this.isReanlyze>>>"+this.isReanlyze); - if(!this.isReanlyze && this.$ls.get("calibration-gamma:"+this.newSampleData.inputFileName)){ - this.$ls.remove("calibration-gamma:"+this.newSampleData.inputFileName) // 如果没有点击ReANalyze,删除fitting之后缓存的数据 20231101:xiao + console.log('exit>>>this.isReanlyze>>>' + this.isReanlyze) + if (!this.isReanlyze && this.$ls.get('calibration-gamma:' + this.newSampleData.inputFileName)) { + this.$ls.remove('calibration-gamma:' + this.newSampleData.inputFileName) // 如果没有点击ReANalyze,删除fitting之后缓存的数据 20231101:xiao } this.visible = false }, @@ -182,6 +183,10 @@ export default { diff --git a/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue index dfc0cd9..d2d980f 100644 --- a/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue @@ -680,4 +680,10 @@ export default { .mt-20 { margin-top: 20px; } +::v-deep { + .ant-modal { + top: 5px; + padding-bottom: 15px; + } +} diff --git a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue index 8ee8f88..ebdda9a 100644 --- a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue @@ -679,4 +679,10 @@ export default { .mt-20 { margin-top: 20px; } +::v-deep { + .ant-modal { + top: 5px; + padding-bottom: 15px; + } +} diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue index 6d9bc99..85d45a8 100644 --- a/src/views/spectrumAnalysis/gamma-analysis.vue +++ b/src/views/spectrumAnalysis/gamma-analysis.vue @@ -1382,7 +1382,7 @@ export default { // 分析工具Accept时刷新部分数据 handleAccept(data) { - const { allData, peak, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData, barChart } = data + const { allData, peak, shadowChannelChart, shadowEnergyChart, shapeChannelData, shapeEnergyData, barChart, BaseCtrls } = data const result = { DetailedInformation: this.detailedInfomation, @@ -1393,7 +1393,7 @@ export default { shapeChannelData, shapeEnergyData, peak, - BaseCtrls: this.baseCtrls, + BaseCtrls, bAnalyed: this.bAnalyed, barChart } diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index f0a7682..62b93dd 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -49,12 +49,13 @@ ref="betaGammaAnalysisRef" @getFiles="getFiles" @sendInfo="getStationName" + @sendXeData="getXeData" @reAnalyCurr="getReAnalyCurr" @reAnalyAll="getReAnalyAll" :sampleInfo="sampleInfo" :sample="sampleData" + :analyseCurrentSpectrum="analyseCurrentSpectrumData" /> -
Please Select a Sample
@@ -376,7 +377,7 @@ export default { betaGammaRlrModalVisible: false, // beta-gamma RLR 弹窗 statisticsParamerHistoryModalVisible: false, // beta-gamma Statistics Paramer History 弹窗 bgLogViewerVisible: false, // beta-gamma Log 下的BG log viewer 弹窗 - // analyseCurrentSpectrumData: {}, + analyseCurrentSpectrumData: {}, resultDisplayFlag: [], params_toDB: { comment: '', @@ -467,7 +468,7 @@ export default { this.params_toDB.checkDet = val.checkDet }, getXeData(val) { - // this.$set(this.analyseCurrentSpectrumData, 'XeData', val) + this.$set(this.analyseCurrentSpectrumData, 'XeData', val) this.resultDisplayFlag = val }, // formDB 来源 吧接口返回的文件名称添加到sampleData @@ -1304,7 +1305,7 @@ export default { title: 'BG log viewer', show: this.isBetaGamma, handler: () => { - if(this.params_toDB.savedAnalysisResult) { + if (this.params_toDB.savedAnalysisResult) { this.bgLogViewerVisible = true } },