Procházet zdrojové kódy

接口findTreeData未返回authorityObject,authorityName报错暂时处理

shenqilong před 1 rokem
rodič
revize
f288e4b23a
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      src/business/platform/cat/type/tree.vue

+ 4 - 0
src/business/platform/cat/type/tree.vue

@@ -131,6 +131,10 @@ export default {
                     const noData = data.filter(item => item.isShow === '1')
                     const noIdList = noData.map((obj, index) => { return obj.id }).join(',').split(',')
                     const tree = data.filter(item => item.isShow !== '1' && !noIdList.includes(item.parentId))
+                    for (const item of tree) {
+                        item.authorityName = item.authorityName || '{"chaYue":"","buMen":"","shenCha":"","shenHeZouXiang":"","fenLei":""}'
+                        item.authorityObject = item.authorityObject || { chaYue: '', buMen: '', shenCha: '', shenHeZouXiang: '', fenLei: '' }
+                    }
                     this.treeData = tree
                 }