diff --git a/src/components/CustomChart/index.vue b/src/components/CustomChart/index.vue index c38f28c..8dac754 100644 --- a/src/components/CustomChart/index.vue +++ b/src/components/CustomChart/index.vue @@ -6,7 +6,7 @@ import * as echarts from 'echarts' import 'echarts-gl' const events = ['click', 'brushEnd'] -const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click', 'dblclick'] +const zrEvents = ['mousemove', 'mousedown', 'mouseup', 'click', 'dblclick', 'contextmenu'] export default { props: { option: { diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 7d5f098..e87c043 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() { @@ -323,7 +324,6 @@ export default { histogramDataDList, // 左侧 Beta-Gamma Spectrum: Sample 图表的3D部分 Boundary, // 左侧2d图表的矩形 - XeData, // 右下角Result Display spectrumData, AcqTimeBtn, // QC Flags 相关 @@ -333,6 +333,10 @@ export default { GasBgBtn, // QC Flags 相关 DetBgBtn, // QC Flags 相关 } = this.sampleDetail[this.spectraType] + const { + XeData, // 右下角Result Display + savedAnalysisResult, + } = this.sampleDetail this.spectrumData = spectrumData @@ -348,9 +352,9 @@ export default { this.betaProjectedData = betaProjectedData this.betaEnergyData = betaEnergyData - this.resultDisplay = XeData + this.resultDisplay = this.resultDisplay.length > 0 ? this.resultDisplay : XeData - this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode) + this.$emit('sendInfo', this.resultDisplay, this.spectrumData.stationCode, savedAnalysisResult) this.qcFlags = { AcqTimeBtn, @@ -432,6 +436,7 @@ export default { watch: { sample: { handler(newVal, oldVal) { + this.resultDisplay = [] if (newVal.sampleId) { this.getSampleDetail() } else { @@ -443,8 +448,8 @@ export default { }, analyseCurrentSpectrum: { handler(newVal, oldVal) { - this.currResultDisplay = newVal.XeData - this.resultDisplay = newVal.XeData + // this.currResultDisplay = newVal.XeData + this.resultDisplay = newVal.XeData || [] }, immediate: true, deep: true, diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue index 0315866..5b3bd3f 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue @@ -24,8 +24,8 @@ @brushEnd="handleBrushEnd" />
- -
{{ currCount + 1 }}
+ +
{{ currCount }}
0
@@ -322,8 +322,7 @@ export default { return { active: 0, - maxCount: 15, // count的最大值 - currCount: 15, + currCount: 50, twoDOption, threeDSurfaceOption, @@ -359,7 +358,7 @@ export default { this.emitRangeChange([0, 256, 0, 256]) this.reDrawRect() - this.rangeScatter() + this.buildScatterList() }, // 点击ROI @@ -439,26 +438,33 @@ export default { this.reDrawRect() - this.rangeScatter() + this.buildScatterList() } this.clearBrush(chart) }, - /** - * 因scatterGL 不受axis中max和min的控制,手动处理溢出部分 - */ - rangeScatter() { + // 构造scatter列表 + buildScatterList() { const { xAxis: { min: minX, max: maxX }, yAxis: { min: minY, max: maxY } } = this.twoDOption - const data = this.histogramDataList + this.twoDOption.series.data = this.histogramDataDList .filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY) - .map(({ b, g, c }) => [b, g, c]) + .map(({ b, g, c }) => this.buildScatterItem(b, g, c)) + }, - this.twoDOption.series.data = data + // 构造一个scatter 的点 + buildScatterItem(xAxis, yAxis, count) { + const { r, g, b } = this.interpolateColor(1 - (count / this.currCount)) + return { + value: [xAxis, yAxis], + itemStyle: { + color: `rgb(${r}, ${g}, ${b})` + } + } }, // 通知上层范围改变 @@ -482,7 +488,7 @@ export default { } this.reDrawRect() - this.rangeScatter() + this.buildScatterList() }, // 重绘矩形框区域 @@ -713,7 +719,10 @@ export default { }, // 颜色插值算法 - interpolateColor(color1, color2, percentage) { + interpolateColor(percentage) { + const color1 = { r: 255, g: 0, b: 0 }, + color2 = { r: 255, g: 255, b: 255 } + const r = color1.r + (color2.r - color1.r) * percentage const g = color1.g + (color2.g - color1.g) * percentage const b = color1.b + (color2.b - color1.b) * percentage @@ -723,10 +732,9 @@ export default { watch: { // 2D 图表 histogramDataList: { - handler(newVal) { + handler() { this.active = 0 - this.twoDOption.series.data = newVal.filter(item => item.c).map(item => [item.b, item.g, item.c]) // 设置2D Scatter数据 - this.rangeScatter() + this.buildScatterList() }, immediate: true }, @@ -759,18 +767,8 @@ export default { }, currCount: { - handler(val) { - if (val <= this.maxCount) { - const { r, g, b } = this.interpolateColor( - { r: 255, g: 0, b: 0 }, - { r: 255, g: 255, b: 255 }, - val / this.maxCount - ) - - this.twoDOption.series.itemStyle.color = `rgb(${r}, ${g}, ${b})` - } else { - this.twoDOption.series.itemStyle.color = '#fff' - } + handler() { + this.buildScatterList() }, immediate: true } diff --git a/src/views/spectrumAnalysis/components/ColorPalette.vue b/src/views/spectrumAnalysis/components/ColorPalette.vue index 80ce3ff..b470f9a 100644 --- a/src/views/spectrumAnalysis/components/ColorPalette.vue +++ b/src/views/spectrumAnalysis/components/ColorPalette.vue @@ -23,16 +23,19 @@ 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..0c6f33b 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -104,10 +104,10 @@ Undo
- Replot + Replot
- Accept + Accept
Cancel @@ -181,7 +181,9 @@ @@ -461,13 +463,21 @@ 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, // 正在修改控制点 isFitting: false, // 正在进行Fit操作 firstFittingChannel: null, // Fit操作时点击的第一个channel + isAccepting: false, + isReploting: false, - operationStack: [] // 操作记录 + operationStack: [], // 操作记录 + replotNeeded: false } }, created() { @@ -517,25 +527,10 @@ export default { this.energy = energy this.BaseCtrls = BaseCtrls this.FitBaseLine = FitBaseLine + this.barChart = barChart - const series = [] - - // 推入BaseLine - series.push(this.buildBaseLine(channelBaseLineChart)) - - // 推入Count - series.push(this.buildCountLine(channelCountChart)) - - // 推入Peak - series.push(...this.buildPeaks(channelPeakChart)) - - // 推入基线控制点 - series.push(this.buildCtrlPoint(channelBaseCPChart)) - - this.thumbnailOption.series = this.buildBarChart(barChart) - + this.setChartOption(channelBaseLineChart, channelCountChart, channelPeakChart, channelBaseCPChart, barChart) this.list = table - this.option.series = series } else { this.$message.error(message) } @@ -544,11 +539,32 @@ export default { } }, + setChartOption(baseLine, count, peaks, baseCP, bar) { + const series = [] + + // 推入BaseLine + series.push(this.buildBaseLine(baseLine)) + + // 推入Count + series.push(this.buildCountLine(count)) + + // 推入Peak + series.push(...this.buildPeaks(peaks)) + + // 推入基线控制点 + series.push(this.buildCtrlPoint(baseCP)) + + this.thumbnailOption.series = this.buildBarChart(bar) + + this.option.series = series + }, + reset() { this.currChannel = undefined this.btnGroupType = 1 this.opts.notMerge = false this.isFitting = false + this.replotNeeded = false this.$nextTick(() => { this.option.brush = { toolbox: [] } this.selectedKeys = [] @@ -597,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) { @@ -636,6 +651,9 @@ export default { return } + this.channel_1 = left + this.channel_2 = right + this.isInsertPeak = false this.fitPeaksAndBaselineModalVisible = true this.isFitting = false @@ -737,7 +755,10 @@ export default { return } + this.channel_1 = this.currChannel + this.fitPeaksAndBaselineModalVisible = true + this.isInsertPeak = true }, // 点击 Fit Peak XXX 弹窗中的 Peaks 按钮 @@ -765,47 +786,32 @@ export default { this.channelPeakChart = channelPeakChart this.channelBaseLineChart = channelBaseLineChart + this.barChart = barChart - const series = [] - - // 推入BaseLine - series.push(this.buildBaseLine(channelBaseLineChart)) - - // 推入旧的Count - series.push(this.buildCountLine(channelCountChart)) - - // 推入Peak - series.push(...this.buildPeaks(channelPeakChart)) - - // 推入旧的基线控制点 - series.push(this.buildCtrlPoint(channelBaseCPChart)) - - this.thumbnailOption.series = this.buildBarChart(barChart) - + this.setChartOption( + channelBaseLineChart, + this.channelCountChart, + channelPeakChart, + this.channelBaseCPChart, + barChart + ) this.list = table - this.option.series = series }, // 点击 Fit Peak XXX 弹窗中的 Cancel 按钮 handleCancelSuccess(result) { const { channelPeakChart, table } = result this.channelPeakChart = channelPeakChart - const series = [] - // 推入旧的BaseLine - series.push(this.buildBaseLine(this.channelBaseLineChart)) - - // 推入旧的Count - series.push(this.buildCountLine(this.channelCountChart)) - - // 推入Peak - series.push(...this.buildPeaks(channelPeakChart)) - - // 推入旧的基线控制点 - series.push(this.buildCtrlPoint(this.channelBaseCPChart)) + this.setChartOption( + this.channelBaseLineChart, + this.channelCountChart, + channelPeakChart, + this.channelBaseCPChart, + this.barChart + ) this.list = table - this.option.series = series }, // 删除 @@ -1022,6 +1028,7 @@ export default { if (this.btnGroupType == 1) { this.btnGroupType = 2 this.baseCtrls_Copy = cloneDeep(this.BaseCtrls) + this.replotNeeded = false // 供编辑的白色基线 const baseLineEditSeries = buildLineSeries( @@ -1042,7 +1049,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') @@ -1051,6 +1061,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() }) @@ -1090,6 +1102,7 @@ export default { // 重新生成基线 redrawBaseLine() { + this.replotNeeded = true try { console.time('updateBaseLine') const res = updateBaseLine(JSON.stringify(this.baseCtrls_Copy)) @@ -1105,6 +1118,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)) + }, + /** * 设置小方块可拖拽 */ @@ -1238,26 +1259,57 @@ 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() { + 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: this.replotNeeded + }) + 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) + this.replotNeeded = false + } else { + this.$message.error(message) } - }) - baseLineCP.data = this.buildCPPointData(baseCPPoints) + } catch (error) { + console.error(error) + } finally { + this.isReploting = false + } }, /** @@ -1278,31 +1330,75 @@ export default { }, // 确定对Baseline Control Points 的操作 - 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 + 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.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 { + this.isAccepting = true + const { success, result, message } = await postAction('/gamma/acceptBaseLine', { + ...this.baseCtrls_Copy, + fileName + }) + if (success) { + this.BaseCtrls = cloneDeep(this.baseCtrls_Copy) + + const { + allData, + barChart, + channelBaseLineChart, + peakSet, + shadowChannelChart, + shadowEnergyChart, + shapeChannelData, + shapeData, + shapeEnergyData + } = result + + this.channelBaseLineChart = channelBaseLineChart + this.channelPeakChart = peakSet + this.shadowChannelChart = shadowChannelChart + this.channelBaseCPChart = shapeChannelData + this.barChart = barChart + + this.btnGroupType = 1 + this.opts.notMerge = true + this.clearRect() + + this.setChartOption(channelBaseLineChart, this.channelCountChart, peakSet, this.channelBaseCPChart, barChart) + this.$nextTick(() => { + this.resetChartOpts() + }) + + this.$bus.$emit('accept', result) + } else { + this.$message.error(message) } - }) - - this.channelBaseCPChart = xctrl.map((val, index) => { - return { - color: this.channelBaseCPChart[0].color, - name: index.toString(), - point: { - x: val, - y: yctrl[index] - }, - size: 4 - } - }) - - this.handleSwitchOperation() - - this.$bus.$emit('accept') + } catch (error) { + console.error(error) + } finally { + this.isAccepting = false + } }, // 右下角添加当前选中的nuclide diff --git a/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue b/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue index ba28f60..64ff88d 100644 --- a/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/ArrRrrModal.vue @@ -52,16 +52,43 @@ export default { url = '/spectrumAnalysis/viewRRR' break } + console.log(this.extraData) try { this.content = '' this.isLoading = true - const { sampleId, inputFileName: fileName } = this.sampleData - const method = this.type == 4? postAction : getAction - const res = await method(url, { + console.log(this.sampleData) + const { sampleId, - fileName, - ...this.extraData, - }) + inputFileName: fileName, + dbName, + detFileName, + gasFileName, + qcFileName, + sampleFileName, + } = this.sampleData + // const method = this.type == 4 ? postAction : getAction + let res = null + if (this.type == 4) { + let params = { + dbName, + sampleId, + sampleData: this.extraData.sampleData, + gasBgData: this.extraData.GasBgData, + detBgData: this.extraData.DetBgData, + qcData: this.extraData.QCData, + sampleFileName, + gasFileName, + detFileName, + qcFileName, + } + res = await postAction(url, params) + } else { + res = await getAction(url, { + sampleId, + fileName, + ...this.extraData, + }) + } if (typeof res == 'string') { this.content = res 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..eb43c15 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 - +
-
ORTEC int.spc
+
+ +
ORTEC int.spc
+
+
Data type
-
IMS .ims .rms
+
+ +
IMS .ims .rms
+
+
- +
@@ -205,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/RLRModal/components/Header.vue b/src/views/spectrumAnalysis/components/Modals/RLRModal/components/Header.vue index 210251a..bfe5d72 100644 --- a/src/views/spectrumAnalysis/components/Modals/RLRModal/components/Header.vue +++ b/src/views/spectrumAnalysis/components/Modals/RLRModal/components/Header.vue @@ -12,7 +12,7 @@ - + @@ -27,13 +27,13 @@ - + - + diff --git a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue index a092112..ed5afc9 100644 --- a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue @@ -120,19 +120,23 @@ import { showSaveFileModal } from '@/utils/file' const columns = [ { title: 'Energy(keV)', - dataIndex: 'energy' + dataIndex: 'energy', + customRender: (text) => Number(text).toFixed(3) }, { title: 'FWHM(keV)', - dataIndex: 'fwhm' + dataIndex: 'fwhm', + customRender: (text) => Number(text).toFixed(3) }, { title: 'Fit(keV)', - dataIndex: 'fit' + dataIndex: 'fit', + customRender: (text) => Number(text).toFixed(3) }, { title: 'Delta(%)', - dataIndex: 'delta' + dataIndex: 'delta', + customRender: (text) => Number(text).toFixed(3) } ] @@ -243,11 +247,11 @@ export default { }) this.isLoading = false if (success) { - const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result + const { list_dataSource, ECutAnalysis_Low, G_energy_span, currentText: resultCurrentText } = result this.dataSourceList = list_dataSource if (!currentText) { - this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1] - this.appliedDataSource = list_dataSource[list_dataSource.length - 1] + this.currSelectedDataSource = resultCurrentText + this.appliedDataSource = resultCurrentText } this.ECutAnalysis_Low = ECutAnalysis_Low diff --git a/src/views/spectrumAnalysis/components/Modals/SaveSettingModal.vue b/src/views/spectrumAnalysis/components/Modals/SaveSettingModal.vue index b8d03a1..ea6ed2a 100644 --- a/src/views/spectrumAnalysis/components/Modals/SaveSettingModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/SaveSettingModal.vue @@ -2,16 +2,14 @@
- - Save All - + Save All
Save as Txt Save as Excel - Save as Html +
@@ -25,13 +23,13 @@ export default { components: { TitleOverBorder }, props: { value: { - type: Boolean - } + type: Boolean, + }, }, data() { return { saveAll: false, - saveFormat: 'txt' + saveFormat: 'txt', } }, methods: { @@ -42,7 +40,7 @@ export default { handleOk() { this.$emit('save', this.saveFormat) - } + }, }, computed: { visible: { @@ -55,9 +53,9 @@ export default { } return this.value - } - } - } + }, + }, + }, } 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 @@