From 2cd2bedb3c9be53e0314f7b9709c16e642e2499a Mon Sep 17 00:00:00 2001 From: huangchengfa <171504222@qq.com> Date: Fri, 12 Dec 2025 14:45:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=A3=E5=86=B3=E6=B2=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/dict.js b/src/utils/dict.js index b3a89d6..20261c9 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -15,7 +15,7 @@ export function isLocalDict(dictCode) { D_GS_SSYJ: true, // "岗哨系统四色预警" D_BZ_SF: true, // "是否" BD_BK_CLYJBQ: true, // "车辆预警标签" - D_YJXX_CZCSLX:true, //常控处置措施类型 + D_YJXX_CZCSLX: true, //常控处置措施类型 } return localDicObj[dictCode] } @@ -32,12 +32,14 @@ export function getDict(...args) { getSysDictByCode({ dictCode: d }).then(result => { + result = result || {} + result.itemList = Array.isArray(result.itemList) ? result.itemList : [] result.itemList.forEach(p => { p.label = p.zdmc p.value = p.dm p.id = p.dm p.elTagType = p.dictType - if (p.itemList && p.itemList.length > 0) { + if (p?.itemList && p.itemList?.length > 0) { getChildren(p) } p.children = p.itemList