fix: 某些弹窗中取值精度问题

This commit is contained in:
Xu Zhimeng 2023-12-29 09:54:31 +08:00
parent 102a4708e8
commit 3c825bb184
3 changed files with 4 additions and 37 deletions

View File

@ -63,58 +63,34 @@ const columns = [
{
title: 'Energy (keV)',
dataIndex: 'energy',
customRender: (text) => {
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
},
},
{
title: 'Yield (%)',
dataIndex: 'yield',
customRender: (text) => {
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
},
},
{
title: 'Efficiency',
dataIndex: 'efficiency',
customRender: (text) => {
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
},
},
{
title: 'Activity (Bq)',
dataIndex: 'activity',
customRender: (text) => {
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
},
},
{
title: 'Act Err (%)',
dataIndex: 'actErr',
customRender: (text) => {
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
},
},
{
title: 'MDA (Bq)',
dataIndex: 'mda',
customRender: (text) => {
return text && text !== 'null' ? parseFloat(Number(text).toPrecision(6)) : text
},
},
{
title: 'Conc (uBq/m3)',
dataIndex: 'conc',
customRender: (text) => {
return text
},
},
{
title: 'MDC (uBq/m3)',
dataIndex: 'mdc',
customRender: (text) => {
return text
},
},
]
export default {

View File

@ -151,25 +151,25 @@ const mainColumns = [
title: 'Energy(keV)',
dataIndex: 'energy',
width: 100,
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
customRender: (text) => Number(text).toFixed(3),
},
{
title: 'Energy Uncert(%)',
dataIndex: 'energyUncert',
width: 120,
customRender: (text) => parseFloat(Number(text * 100).toPrecision(6)),
customRender: (text) => Number(text).toFixed(6),
},
{
title: 'Yield',
dataIndex: 'yield',
width: 80,
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
customRender: (text) => Number(text).toFixed(3),
},
{
title: 'Yield Uncert(%)',
dataIndex: 'yieldUncert',
width: 120,
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
customRender: (text) => Number(text).toFixed(3),
},
{
title: 'KeyLine',

View File

@ -47,12 +47,10 @@ const columns = [
{
title: 'Energy(keV)',
dataIndex: 'energy',
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
},
{
title: 'Centroid',
dataIndex: 'centroid',
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
},
{
title: 'Multiplet',
@ -61,31 +59,24 @@ const columns = [
{
title: 'Fwhm(keV)',
dataIndex: 'fwhm',
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
},
{
title: 'NetArea',
dataIndex: 'netArea',
ellipsis: true,
// customRender: (text) => parseFloat(Number(text).toPrecision(6)),
customRender: (text) => text,
},
{
title: 'AreaErr(%)',
dataIndex: 'areaErr',
ellipsis: true,
// customRender: (text) => parseFloat(Number(text).toPrecision(6)),
customRender: (text) => text,
},
{
title: 'Significant',
dataIndex: 'significant',
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
},
{
title: 'Sensitivity',
dataIndex: 'sensitivity',
customRender: (text) => parseFloat(Number(text).toPrecision(6)),
},
{
title: 'Indentify',