From 1c7098cbaae69c939f439fe843d6a5028df36d4a Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Mon, 11 Dec 2023 15:34:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=AA=E7=94=A8661.?= =?UTF-8?q?657=E5=87=8F=E5=8E=BBEnergy=E5=AF=BC=E8=87=B4=E7=9A=84Energy?= =?UTF-8?q?=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BetaDetectorCalibration.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 2d4334e..eba61fb 100644 --- a/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue +++ b/src/views/spectrumAnalysis/components/Modals/BetaGammaModals/BetaGammaEnergyCalibrationModal/components/BetaDetectorCalibration.vue @@ -187,6 +187,7 @@ import { graphic } from 'echarts' import { isNullOrUndefined } from '@/utils/util' import SampleDataMixin from '@/views/spectrumAnalysis/SampleDataMixin' import axios from 'axios' +import { add } from 'xe-utils/methods' const initialBetaGammaChartOption = { grid: { @@ -680,7 +681,7 @@ export default { // 设置 gamma-gated beta spectrum const yAxis = parseInt(point[1].toFixed()) - this.currEnergy = parseFloat(this.gammaEnergy[yAxis][0].toFixed(2)) // 设置当前选中位置的Energy + this.currEnergy = this.gammaEnergy[yAxis][0].toPrecision(6) // 设置当前选中位置的Energy this.channelAndEnergyModel = { channel: undefined, energy: undefined, @@ -783,7 +784,9 @@ export default { } this.tooltipVisible = true this.channelAndEnergyModel.channel = xAxis - this.channelAndEnergyModel.energy = this.currEnergy + if(!isNullOrUndefined(this.currEnergy)) { + this.channelAndEnergyModel.energy = add(661.657, -this.currEnergy) + } } },