fix: Gamma的Calibration初步优化

This commit is contained in:
Xu Zhimeng 2023-10-17 15:26:14 +08:00
parent d2878ecd36
commit c493d0abdc
3 changed files with 34 additions and 22 deletions

View File

@ -1,5 +1,5 @@
<template>
<custom-modal v-model="visible" :width="1280" title="Efficiency Calibration" :footer="null" destroy-on-close>
<custom-modal v-model="visible" :width="1280" title="Efficiency Calibration" :footer="null">
<a-spin :spinning="isLoading">
<div class="energy-calibration">
<div class="left">
@ -125,19 +125,23 @@ import { showSaveFileModal } from '@/utils/file'
const columns = [
{
title: 'Energy(keV)',
dataIndex: 'energy'
dataIndex: 'energy',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Efficiency',
dataIndex: 'efficiency'
dataIndex: 'efficiency',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Fit(keV)',
dataIndex: 'fit'
dataIndex: 'fit',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Delta(%)',
dataIndex: 'delta'
dataIndex: 'delta',
customRender: (text) => Number(text).toFixed(3)
}
]
@ -282,11 +286,11 @@ export default {
})
this.isLoading = false
if (success) {
const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result
const { list_dataSource, ECutAnalysis_Low, G_energy_span, currentText: resultCurrentText } = result
this.dataSourceList = list_dataSource
if (!currentText) {
this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1]
this.appliedDataSource = list_dataSource[list_dataSource.length - 1]
this.currSelectedDataSource = resultCurrentText
this.appliedDataSource = resultCurrentText
}
this.ECutAnalysis_Low = ECutAnalysis_Low

View File

@ -120,19 +120,23 @@ import { showSaveFileModal } from '@/utils/file'
const columns = [
{
title: 'Channel',
dataIndex: 'channel'
dataIndex: 'channel',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Energy(keV)',
dataIndex: 'energy'
dataIndex: 'energy',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Fit(keV)',
dataIndex: 'fit'
dataIndex: 'fit',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Delta(%)',
dataIndex: 'delta'
dataIndex: 'delta',
customRender: (text) => Number(text).toFixed(3)
}
]
@ -244,11 +248,11 @@ export default {
})
this.isLoading = false
if (success) {
const { list_dataSource, rg_high, rg_low } = result
const { list_dataSource, rg_high, rg_low, currentText: resultCurrentText } = result
this.dataSourceList = list_dataSource
if (!currentText) {
this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1]
this.appliedDataSource = list_dataSource[list_dataSource.length - 1]
this.currSelectedDataSource = resultCurrentText
this.appliedDataSource = resultCurrentText
}
this.rg_high = rg_high

View File

@ -120,19 +120,23 @@ import { showSaveFileModal } from '@/utils/file'
const columns = [
{
title: 'Energy(keV)',
dataIndex: 'energy'
dataIndex: 'energy',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'FWHM(keV)',
dataIndex: 'fwhm'
dataIndex: 'fwhm',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Fit(keV)',
dataIndex: 'fit'
dataIndex: 'fit',
customRender: (text) => Number(text).toFixed(3)
},
{
title: 'Delta(%)',
dataIndex: 'delta'
dataIndex: 'delta',
customRender: (text) => Number(text).toFixed(3)
}
]
@ -243,11 +247,11 @@ export default {
})
this.isLoading = false
if (success) {
const { list_dataSource, ECutAnalysis_Low, G_energy_span } = result
const { list_dataSource, ECutAnalysis_Low, G_energy_span, currentText: resultCurrentText } = result
this.dataSourceList = list_dataSource
if (!currentText) {
this.currSelectedDataSource = list_dataSource[list_dataSource.length - 1]
this.appliedDataSource = list_dataSource[list_dataSource.length - 1]
this.currSelectedDataSource = resultCurrentText
this.appliedDataSource = resultCurrentText
}
this.ECutAnalysis_Low = ECutAnalysis_Low