Sfoglia il codice sorgente

修改业务空间

haojianlong 5 anni fa
parent
commit
6449b14a71
1 ha cambiato i file con 22 aggiunte e 16 eliminazioni
  1. 22 16
      src/components/business_space/newGraphy/graphy.vue

+ 22 - 16
src/components/business_space/newGraphy/graphy.vue

@@ -349,18 +349,24 @@ export default {
     },
     // canvas点击事件
     canvasClick(item, event) {
+      console.log(item)
+      console.log(event)
       if (this.type == 4) {
 
       } else {
         if (item instanceof SpaceItem && item.selectable) {
+          if (this.type == 2) {
+            this.scene.clearZoneSelection();
+          }
           this.type = 3;
           this.curZoneItem = {};
-          this.scene.isZoneSelectable = false;
         }
         if (item instanceof ZoneItem && item.selectable) {
+          if (this.type == 3) {
+            this.scene.clearSpaceSelection();
+          }
           this.type = 2;
           this.curZoneItem = item;
-          this.scene.isSpaceSelectable = false;
           this.scene.clearZoneSelection();
           item.selected = true;
         }
@@ -547,23 +553,23 @@ export default {
     },
     // 批量创建
     groupCreateBSP(spaces) {
-        let pa = {
-          zone: this.tab.code,
-          data: {
-            Content: space
-          }
+      let pa = {
+        zone: this.tab.code,
+        data: {
+          Content: space
         }
-        createZone(pa, res => {
-          res.EntityList.map(t => {
-            Spaces = Spaces.map(item => {
-              if (t.RoomLocalName == item.RoomLocalName) {
-                item.SpaceId = t.RoomID
-              }
-              return item;
-            })
+      }
+      createZone(pa, res => {
+        res.EntityList.map(t => {
+          Spaces = Spaces.map(item => {
+            if (t.RoomLocalName == item.RoomLocalName) {
+              item.SpaceId = t.RoomID
+            }
+            return item;
           })
-          this.groupCreRelaZoneAndISp(space)
         })
+        this.groupCreRelaZoneAndISp(space)
+      })
     },
     // 单个创建
     createSingleBSP(space, IspaceIdList) {