feat: Energy Calibration 重新分析功能

This commit is contained in:
Xu Zhimeng 2023-08-14 09:44:37 +08:00
parent 967fa6705a
commit 9801acb2fe
5 changed files with 45 additions and 2 deletions

View File

@ -348,6 +348,17 @@ export default {
this.statisticsType = statisticsType this.statisticsType = statisticsType
this.statisticModalVisible = true this.statisticModalVisible = true
} }
},
// 线Energy
reanalyse([type, data]) {
const energy = data.map(item => [item.y])
if(type == 'gamma') {
this.gammaEnergyData = energy
} else {
this.betaEnergyData = energy
}
} }
}, },
watch: { watch: {

View File

@ -163,7 +163,7 @@
</a-checkbox-group> </a-checkbox-group>
</title-over-border> </title-over-border>
<div class="footer-btns"> <div class="footer-btns">
<a-button type="primary">Reanalyse Spectrum Using New Calibration</a-button> <a-button type="primary" @click="handleReAnalyse">Reanalyse Spectrum Using New Calibration</a-button>
<a-button type="primary" class="exit" @click="handleExit()">Exit</a-button> <a-button type="primary" class="exit" @click="handleExit()">Exit</a-button>
</div> </div>
</div> </div>
@ -851,6 +851,7 @@ export default {
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
this.newE2C = EToC this.newE2C = EToC
this.newLineSeries = newLineSeries
if (tableWidgets) { if (tableWidgets) {
this.list = tableWidgets this.list = tableWidgets
@ -919,6 +920,12 @@ export default {
} }
}, },
//
handleReAnalyse() {
this.$bus.$emit('reanalyse', 'beta', this.newLineSeries)
this.$emit('exit')
},
/** /**
* 返回的科学计数法的字符串处理 * 返回的科学计数法的字符串处理
* @param {string} str * @param {string} str

View File

@ -136,7 +136,7 @@
</a-checkbox-group> </a-checkbox-group>
</title-over-border> </title-over-border>
<div class="footer-btns"> <div class="footer-btns">
<a-button type="primary">Reanalyse Spectrum Using New Calibration</a-button> <a-button type="primary" @click="handleReAnalyse()">Reanalyse Spectrum Using New Calibration</a-button>
<a-button type="primary" class="exit" @click="handleExit()">Exit</a-button> <a-button type="primary" class="exit" @click="handleExit()">Exit</a-button>
</div> </div>
</div> </div>
@ -652,6 +652,8 @@ export default {
const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result const { EToC, newLineSeries, newScatterSeriesData, tableWidgets, CToE } = result
this.newE2C = EToC this.newE2C = EToC
this.newLineSeries = newLineSeries
if (tableWidgets) { if (tableWidgets) {
this.list = tableWidgets this.list = tableWidgets
} }
@ -717,6 +719,12 @@ export default {
} }
}, },
//
handleReAnalyse() {
this.$bus.$emit('reanalyse', 'gamma', this.newLineSeries)
this.$emit('exit')
},
/** /**
* 返回的科学计数法的字符串处理 * 返回的科学计数法的字符串处理
* @param {string} str * @param {string} str

View File

@ -168,6 +168,9 @@ export default {
if(energy) { if(energy) {
this.summary.energy = energy[0].toFixed(3) this.summary.energy = energy[0].toFixed(3)
} }
else {
this.summary.energy = 0
}
} else { } else {
this.option.series.markLine.data = [] this.option.series.markLine.data = []
this.summary.channel = 0 this.summary.channel = 0

View File

@ -29,8 +29,13 @@
<!-- 频谱分析部分 --> <!-- 频谱分析部分 -->
<div class="spectrum-analysis-main"> <div class="spectrum-analysis-main">
<!-- Gamma 分析 -->
<gamma-analysis v-if="isGamma" ref="gammaAnalysisRef" /> <gamma-analysis v-if="isGamma" ref="gammaAnalysisRef" />
<!-- Gamma 分析 -->
<!-- Beta-Gamma 分析 -->
<beta-gamma-analysis v-else-if="isBetaGamma" ref="betaGammaAnalysisRef" :sample="sampleData" /> <beta-gamma-analysis v-else-if="isBetaGamma" ref="betaGammaAnalysisRef" :sample="sampleData" />
<!-- Beta-Gamma 分析 -->
<div v-else class="empty"> <div v-else class="empty">
Please Select a Sample Please Select a Sample
</div> </div>
@ -338,6 +343,10 @@ export default {
statisticsParamerHistoryModalVisible: false // beta-gamma Statistics Paramer History statisticsParamerHistoryModalVisible: false // beta-gamma Statistics Paramer History
} }
}, },
created() {
this.$bus.$on('reanalyse', this.handleReanalyse)
},
methods: { methods: {
/** /**
* 从数据库加载-选择完成 * 从数据库加载-选择完成
@ -429,6 +438,11 @@ export default {
handleResize() { handleResize() {
this.$refs.gammaAnalysisRef && this.$refs.gammaAnalysisRef.resize() this.$refs.gammaAnalysisRef && this.$refs.gammaAnalysisRef.resize()
this.$refs.betaGammaAnalysisRef && this.$refs.betaGammaAnalysisRef.resize() this.$refs.betaGammaAnalysisRef && this.$refs.betaGammaAnalysisRef.resize()
},
// Beta-Gamma Energy Calibration
handleReanalyse(...data) {
this.$refs.betaGammaAnalysisRef.reanalyse(data)
} }
}, },
computed: { computed: {