feat: 自建台站在分析后更新energy的功能
This commit is contained in:
parent
aa9fcabbfe
commit
6d1114a471
File diff suppressed because it is too large
Load Diff
|
@ -73,7 +73,6 @@
|
|||
ref="RoiChartRef"
|
||||
:ROILists="ROILists"
|
||||
:ROIAnalyzeLists="ROIAnalyzeLists"
|
||||
:gammaEnergyData="gammaEnergyData"
|
||||
/>
|
||||
</beta-gamma-chart-container>
|
||||
<!-- 底部显示 -->
|
||||
|
@ -281,14 +280,30 @@ export default {
|
|||
data: analyseList,
|
||||
})
|
||||
|
||||
// 更新XeData
|
||||
updateSampleData({
|
||||
inputFileName,
|
||||
key: 'XeData',
|
||||
data: result.XeData,
|
||||
})
|
||||
|
||||
// 更新XeData
|
||||
this.resultDisplay = result.XeData
|
||||
|
||||
const { betaEnergyData, gammaEnergyData } = result
|
||||
// 更新 betaEnergyData 和 gammaEnergyData
|
||||
this.betaEnergyData = betaEnergyData
|
||||
this.gammaEnergyData = gammaEnergyData
|
||||
|
||||
// 更新sample的 betaEnergyData 和 gammaEnergyData
|
||||
updateSampleData({
|
||||
inputFileName,
|
||||
key: 'sample.betaEnergyData',
|
||||
data: betaEnergyData,
|
||||
})
|
||||
updateSampleData({
|
||||
inputFileName,
|
||||
key: 'sample.gammaEnergyData',
|
||||
data: gammaEnergyData,
|
||||
})
|
||||
} else {
|
||||
const arr = message.split('\n')
|
||||
this.$warning({
|
||||
|
@ -562,7 +577,7 @@ export default {
|
|||
|
||||
// 从分析工具刷新部分数据
|
||||
handleRefresh(data, index) {
|
||||
this.ROIAnalyzeLists[index] = this.$set(this.ROIAnalyzeLists, index, data)
|
||||
this.$set(this.ROIAnalyzeLists, index, data)
|
||||
|
||||
const { inputFileName } = this.sample
|
||||
updateSampleData({
|
||||
|
@ -585,7 +600,7 @@ export default {
|
|||
BaseCtrls,
|
||||
} = data
|
||||
|
||||
this.ROIAnalyzeLists[index] = this.$set(this.ROIAnalyzeLists, index, {
|
||||
this.$set(this.ROIAnalyzeLists, index, {
|
||||
allData,
|
||||
peak,
|
||||
shadowChannelChart,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -122,6 +122,7 @@ export default {
|
|||
open(seriesData, energys) {
|
||||
this.option.series.data = (seriesData || []).map(({ x, y }) => [x, y])
|
||||
this.energys = energys || []
|
||||
this.axisInfo = cloneDeep(initialAxisInfo)
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ export default {
|
|||
open(seriesData, energys) {
|
||||
this.option.series.data = (seriesData || []).map(({ x, y }) => [x, y])
|
||||
this.energys = energys || []
|
||||
this.axisInfo = cloneDeep(initialAxisInfo)
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
:key="index"
|
||||
:title="`ROI${index + 1}`"
|
||||
:title-color="RoiTitleColors[index]"
|
||||
:energys="gammaEnergyData"
|
||||
:roi-list="ROILists[index]"
|
||||
:analyze-result="ROIAnalyzeLists[index]"
|
||||
@toggle="handleToggle"
|
||||
|
@ -34,10 +33,6 @@ export default {
|
|||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
gammaEnergyData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
this.RoiTitleColors = RoiTitleColors
|
||||
|
|
|
@ -132,10 +132,6 @@ export default {
|
|||
props: {
|
||||
title: String,
|
||||
titleColor: String,
|
||||
energys: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
roiList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
|
@ -191,14 +187,24 @@ export default {
|
|||
this.$bus.$off('SelfStationBetaSpectrumChange', this.handleLimitItemChange)
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 根据channel获取energy
|
||||
* @param {number} channel
|
||||
*/
|
||||
getEnergyByChannel(channel) {
|
||||
const energyItem = this.allEnergy ? this.allEnergy[channel - 1] : null
|
||||
return energyItem ? energyItem.x : 0
|
||||
},
|
||||
|
||||
handleTooltipFormat(params) {
|
||||
const [xAxis, count] = params[0].value
|
||||
const channel = Math.round(xAxis)
|
||||
const channelData = this.channelData.all && this.channelData.all.pointlist[channel]
|
||||
const energy = this.getEnergyByChannel(channel)
|
||||
this.axisInfo = {
|
||||
channel,
|
||||
count: channelData ? channelData.y : count,
|
||||
energy: (this.energys[channel] || 0).toFixed(3),
|
||||
energy: energy.toFixed(2),
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -323,6 +329,9 @@ export default {
|
|||
baseLineCP: shapeChannelData,
|
||||
}
|
||||
|
||||
const allEnergy = this.getLineData(allData, 'Energy', 'energy')
|
||||
this.allEnergy = allEnergy.pointlist
|
||||
|
||||
// 设置 Spectrum Line
|
||||
this.setSeriesData(
|
||||
this.option.series,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user