feat: 自建台站在分析后更新energy的功能

This commit is contained in:
Xu Zhimeng 2024-11-21 18:03:01 +08:00
parent aa9fcabbfe
commit 6d1114a471
8 changed files with 36 additions and 967267 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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,

View File

@ -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
},

View File

@ -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
},

View File

@ -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

View File

@ -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