feat: 解决没数据报错的问题
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user