Browse Source

修改系统集成级联最后一级多选bug

haojianlong 5 years ago
parent
commit
ce19b9e936
1 changed files with 15 additions and 1 deletions
  1. 15 1
      src/components/config_point/dictionaryCascader.vue

+ 15 - 1
src/components/config_point/dictionaryCascader.vue

@@ -48,7 +48,7 @@ export default {
     ...mapActions('project', ['getDictionary']),
     //获取物理世界所有设备类型
     getDictSuc(list) {
-      this.options = list;
+      this.options = this.transformList(list);
       this.changeSelect(this.form.dict);
     },
     changeSelect(val) {
@@ -78,6 +78,20 @@ export default {
         }
       })
     },
+    transformList(list) {
+      let arr = [];
+      arr = list.map(t => {
+        if (t.Content) {
+          if (!t.Content.length) {
+            t.Content = [{ InfoPointName: '暂无可对应信息点', disabled: true }]
+          } else {
+            t.Content = this.transformList(t.Content);
+          }
+        }
+        return t;
+      })
+      return arr;
+    }
   }
 }
 </script>