ソースを参照

业务空间交互修改

haojianlong 5 年 前
コミット
f205eb52e5
1 ファイル変更22 行追加2 行削除
  1. 22 2
      src/components/business_space/newGraphy/graphy.vue

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

@@ -350,7 +350,9 @@ export default {
     canvasClick(item, event) {
       console.log(item)
       console.log(event)
-      if (this.type == 4) {
+      if (this.type == 4) {//重新划分
+
+      } else if (this.type == 5) {//批量
 
       } else {
         if (item instanceof SpaceItem && item.selectable) {
@@ -543,7 +545,25 @@ export default {
       this.updateBSPOutline(zoneObj, IspaceIdList)
     },
     // 批量创建所选业务空间
-    groupCreateZone() { },
+    groupCreateZone() {
+      let arr = this.scene.getSelectedSpaces();
+      let spaces = arr.map(t => {
+        return {
+          IspaceId: this.BIMIDToSID[t.data.SourceId],
+          RoomLocalName: t.data.Name,
+          Outline: [t.data.OutLine],
+          BuildingId: this.buildFloor[0],
+          FloorId: this.buildFloor[1],
+          Height: t.data.Height || 0
+        }
+      })
+      if (spaces.length) {
+        this.canvasLoading = true;
+        this.groupCreateBSP(spaces)
+      } else {
+        this.$message.warning('未选择空间');
+      }
+    },
     // 更新业务空间和元空间的关系
     relationInBSPandISP(SpaceId, IspaceIdList) {
       let pa = {