From 139b6b1063397672010a955c303983f72bfb5a3c Mon Sep 17 00:00:00 2001 From: cool Date: Tue, 7 Nov 2023 16:32:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E5=90=88=E5=89=8D=E7=AB=AF=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=AD=97=E5=85=B8=E5=80=BC=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dict/service/info.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/dict/service/info.ts b/src/modules/dict/service/info.ts index 7b33dae..72fc56b 100644 --- a/src/modules/dict/service/info.ts +++ b/src/modules/dict/service/info.ts @@ -50,7 +50,13 @@ export class DictInfoService extends BaseService { .addOrderBy('a.createTime', 'ASC') .getMany(); for (const item of typeData) { - result[item.key] = _.filter(data, { typeId: item.id }); + result[item.key] = _.filter(data, { typeId: item.id }).map(e => { + const value = Number(e.value); + return { + ...e, + value: isNaN(value) ? e.value : value, + }; + }); } return result; }