Просмотр исходного кода

修改网络慢 业务空间叠加问题

haojianlong 5 лет назад
Родитель
Сommit
3b5eb61ef7

+ 12 - 7
src/components/business_space/newGraphy/graphy.vue

@@ -320,13 +320,18 @@ export default {
         })
         // 绘制业务空间
         let tempArr = this.BSPRelaISPList.map((t, i) => {
-          return {
-            RoomLocalName: t.RoomLocalName,
-            OutLine: t.Outline,
-            RoomID: t.RoomID,
-            Color: colorArr[i % colorArr.length],
+          if(t.FloorId == this.buildFloor[1]&&t.ObjectType == this.tab.code){
+            return {
+              RoomLocalName: t.RoomLocalName,
+              OutLine: t.Outline,
+              RoomID: t.RoomID,
+              Color: colorArr[i % colorArr.length],
+            }
+          } else {
+            console.log('internet slow')
+            return undefined;
           }
-        })
+        }).filter(item => item)
         this.scene.removeAllZone();
         this.scene.addZoneList(tempArr);
         this.scene.click(this, this.canvasClick);
@@ -449,7 +454,7 @@ export default {
           });
         });
       } else {
-        this.$message('没有未关联的空间')
+        this.$message('没有未关联的空间')
       }
     },
     // 创建新的业务空间

+ 7 - 5
src/views/ledger/spacelist/index.vue

@@ -113,7 +113,7 @@ export default {
       },
       floorToMap: {}, //楼层及其对应的模型图
       FloorMap: {}, //当前选中的楼层对象
-      buildFloorSelectd: ['all'], //当前所选的建筑楼层
+      buildFloorSelectd: [''], //当前所选的建筑楼层
       childBackParam: {}
     };
   },
@@ -151,6 +151,8 @@ export default {
         if (this.childBackParam.zone) {
           this.changeCascader(this.buildFloorSelectd);
           this.$refs.floorCascader.setValue(this.buildFloorSelectd)
+        } else {
+          this.$refs.floorCascader.setValue([''])
         }
       })
     },
@@ -213,6 +215,10 @@ export default {
     // 判断切换至图还是表
     changeGraphyOrTable(num) {
       this.activeTabType = this.getItemForType()
+      if(!this.buildFloorSelectd[0]) {
+        this.$message.warning('请选择建筑楼层')
+        return
+      };
       if (num == 2) {
         this.initMessage();
       } else {
@@ -233,10 +239,6 @@ export default {
         this.$refs.handsontable.getHeader(res.Content, this.buildFloorSelectd);
       })
     },
-    // 批量创建业务空间
-    groupCreateBSpace() {
-      this.$refs.graphy.groupCreateBSpace()
-    },
     checkSpace(list, build, graphyId) {
       this.floor.notRelated = true;
       this.$refs.notRelated.getIdList(list, build, graphyId, this.activeTabType);