fix: 修复未用661.657减去Energy导致的Energy值错误
This commit is contained in:
parent
6ba0a75e53
commit
1c7098cbaa
|
@ -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)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user