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) + } } },