From a1bc61f61942f7d3031a9ab16ce7bd14e78bdb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=86=E9=BE=99?= Date: Tue, 26 Dec 2023 13:49:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=90=88=E8=AE=A1=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95mapTableT?= =?UTF-8?q?otalSummary=20fieldKeys=20=E8=A6=81=E8=AE=A1=E7=AE=97=E5=90=88?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E5=88=97=E5=AD=97=E6=AE=B5=EF=BC=8C=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E4=B8=BANuber=E7=B1=BB=E5=9E=8B=E5=86=8D=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common/compUtils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/common/compUtils.ts b/src/utils/common/compUtils.ts index 1d41585..d1fadda 100644 --- a/src/utils/common/compUtils.ts +++ b/src/utils/common/compUtils.ts @@ -143,7 +143,10 @@ export function mapTableTotalSummary(tableData: Recordable[], fieldKeys: string[ let totals: any = { _row: '合计', _index: '合计' }; fieldKeys.forEach((key) => { totals[key] = tableData.reduce((prev, next) => { - prev += next[key]; + const value = Number(next[key]); + if (!isNaN(value)) { + prev += value; + } return prev; }, 0); }); @@ -510,4 +513,4 @@ export function tenantSaasMessage(title){ cancelButtonProps: { style: { display: 'none' } }, }) } -} \ No newline at end of file +} -- Gitee From 299b10d7a83c193c1db8ae36f75b992bfd4f902d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=86=E9=BE=99?= Date: Tue, 26 Dec 2023 14:33:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=90=88=E8=AE=A1=E5=B7=A5=E5=85=B7=E6=96=B9=E6=B3=95mapTableT?= =?UTF-8?q?otalSummary=20fieldKeys=20=E8=A6=81=E8=AE=A1=E7=AE=97=E5=90=88?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E5=88=97=E5=AD=97=E6=AE=B5=EF=BC=8C=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E4=B8=BANuber=E7=B1=BB=E5=9E=8B=E5=86=8D=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common/compUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/common/compUtils.ts b/src/utils/common/compUtils.ts index d1fadda..edb3ed1 100644 --- a/src/utils/common/compUtils.ts +++ b/src/utils/common/compUtils.ts @@ -505,7 +505,7 @@ export function tenantSaasMessage(title){ let tenantId = getTenantId(); if(!tenantId){ Modal.confirm({ - title:title, + title: title, content: '此菜单需要在多租户模式下使用,否则数据会出现混乱', okText: '确认', okType: 'danger', -- Gitee