@@ -116,26 +116,31 @@ import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin'
import { showSaveFileModal } from '@/utils/file'
+const format = (text) => {
+ const num = parseFloat(text)
+ return (!num? '-': '') + Number(text).toFixed(3)
+}
+
const columns = [
{
title: 'Energy(keV)',
dataIndex: 'energy',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Efficiency',
dataIndex: 'efficiency',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Fit(keV)',
dataIndex: 'fit',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Delta(%)',
dataIndex: 'delta',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
]
diff --git a/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue
index ef52148..f132a09 100644
--- a/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/EnergyCalibrationModal.vue
@@ -111,26 +111,31 @@ import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin'
import { showSaveFileModal } from '@/utils/file'
+const format = (text) => {
+ const num = parseFloat(text)
+ return (!num? '-': '') + Number(text).toFixed(3)
+}
+
const columns = [
{
title: 'Channel',
dataIndex: 'channel',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Energy(keV)',
dataIndex: 'energy',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Fit(keV)',
dataIndex: 'fit',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Delta(%)',
dataIndex: 'delta',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
]
diff --git a/src/views/spectrumAnalysis/components/Modals/KorsumModal.vue b/src/views/spectrumAnalysis/components/Modals/KorsumModal.vue
index 734317e..456baa9 100644
--- a/src/views/spectrumAnalysis/components/Modals/KorsumModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/KorsumModal.vue
@@ -77,16 +77,16 @@
:pagination="false"
>
-
+
-
+
-
+
-
+
@@ -238,6 +238,11 @@ export default {
this.isLoading = false
if (success) {
const { Energy, Nuclide } = result
+ Energy.forEach(item => {
+ item.totalEffi = Number(item.totalEffi).toPrecision(4)
+ item.peakEffi = Number(item.peakEffi).toPrecision(4)
+ item.uncertain = Number(item.uncertain).toFixed(1)
+ })
this.list = Energy
this.nuclideList = Nuclide
} else {
diff --git a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue
index 2278599..d957310 100644
--- a/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/ResolutionCalibrationModal.vue
@@ -111,26 +111,31 @@ import { buildLineSeries } from '@/utils/chartHelper'
import SampleDataMixin from '../../SampleDataMixin'
import { showSaveFileModal } from '@/utils/file'
+const format = (text) => {
+ const num = parseFloat(text)
+ return (!num? '-': '') + Number(text).toFixed(3)
+}
+
const columns = [
{
title: 'Energy(keV)',
dataIndex: 'energy',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'FWHM(keV)',
dataIndex: 'fwhm',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Fit(keV)',
dataIndex: 'fit',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
{
title: 'Delta(%)',
dataIndex: 'delta',
- customRender: (text) => parseFloat(Number(text).toPrecision(6)),
+ customRender: (text) => format(text),
},
]
@@ -158,7 +163,7 @@ const initialOption = {
const energy = parseInt(x)
const fwhm = y.toFixed(3)
return `
Energy: ${energy}
-
Efficiency : ${efficiency}
`
+
Efficiency : ${fwhm}
`
},
className: 'figure-chart-option-tooltip',
},