Browse Source

fix: 添加设备,添加空间 空间分区实例下拉菜单无数据处理: 添加一条暂无数据的禁用数据(使用MSelect有问题,故不改用MSelect)

yunxing 3 years ago
parent
commit
c71d1d2687

+ 1 - 3
src/components/editview/leftToolBar/addEquipmentDialog.vue

@@ -320,9 +320,7 @@ export default {
             if (data.length) {
                 this.selectData = data;
             } else {
-                this.selectData = [];
-                // TODO: 111
-                // this.selectData = [{ disabled: true, name: "暂无数据", id: "" }];
+                this.selectData = [{ disabled: true, name: "暂无数据", id: "" }];
             }
             //   v-model="spacePartitionInstance"
             // :selectdata="selectData"

+ 5 - 1
src/components/editview/leftToolBar/addSpaceDialog.vue

@@ -233,7 +233,11 @@ export default {
                 return { id: v.id, name: v.localName || '--' };
             });
             this.spacePartitionInstance = [];
-            this.selectData = data;
+             if (data.length) {
+                this.selectData = data;
+            } else {
+                this.selectData = [{ disabled: true, name: "暂无数据", id: "" }];
+            }
         },
         // 空间功能类型
         async getDict() {