Browse Source

修改业务空间创建高度问题

haojianlong 5 years ago
parent
commit
de014f4c82
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/components/business_space/newGraphy/graphy.vue

+ 9 - 9
src/components/business_space/newGraphy/graphy.vue

@@ -320,7 +320,7 @@ export default {
         })
         // 绘制业务空间
         let tempArr = this.BSPRelaISPList.map((t, i) => {
-          if(t.FloorId == this.buildFloor[1]&&t.ObjectType == this.tab.code){
+          if (t.FloorId == this.buildFloor[1] && t.ObjectType == this.tab.code) {
             return {
               RoomLocalName: t.RoomLocalName,
               OutLine: t.Outline,
@@ -412,7 +412,7 @@ export default {
         this.scene.isZoneSelectable = false;
       }
     },
-    // 批量创建业务空间
+    // 根据未关联元空间批量创建业务空间
     groupCreateBSpace() {
       let text = []
       let Spaces = this.allUnRelatISP.map(t => {
@@ -470,7 +470,7 @@ export default {
         this.$message.warning('请至少选择一个空间');
       }
     },
-    // 创建新的业务空间-弹窗返回确认创建
+    // 根据图创建新的业务空间-弹窗返回确认创建
     createRoom(val) {
       let zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
       let selectSpaces = this.scene.getSelectedSpaces();
@@ -480,7 +480,7 @@ export default {
           IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
         }
         if (t.data.Height && (zoneObj.Height == 0 || t.data.Height < zoneObj.Height)) {
-          zoneObj.Height = t.data.Height;
+          zoneObj.Height = t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height;
         }
       })
       // 如果有划分,求交集
@@ -506,7 +506,7 @@ export default {
       zoneObj.FloorId = this.buildFloor[1];
       this.createSingleBSP(zoneObj, IspaceIdList)
     },
-    // 从未关联平面图的业务空间中选择--按钮返回关联信号
+    // 根据图从未关联平面图的业务空间中选择--按钮返回关联信号
     createFromUnrelated(BSP) {
       BSP.Outline = [];
       BSP.Height = 0;
@@ -517,7 +517,7 @@ export default {
           IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
         }
         if (t.Height && (BSP.Height == 0 || t.Height < BSP.Height)) {
-          BSP.Height = t.Height;
+          BSP.Height = t.Height > 100 ? (t.Height / 1000).toFixed(2) : t.Height;
         }
       })
       this.updateBSPOutline(BSP, IspaceIdList)
@@ -563,7 +563,7 @@ export default {
           IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
         }
         if (t.Height && (zoneObj.Height == 0 || t.Height < zoneObj.Height)) {
-          zoneObj.Height = t.Height;
+          zoneObj.Height = t.Height > 100 ? (t.Height / 1000).toFixed(2) : t.Height;
         }
       })
       // 类空间
@@ -602,7 +602,7 @@ export default {
       zoneObj.RoomID = this.curZoneItem.data.RoomID;
       this.updateBSPOutline(zoneObj, IspaceIdList)
     },
-    // 批量创建所选业务空间
+    // 根据图批量创建所选业务空间
     groupCreateZone() {
       let arr = this.scene.getSelectedSpaces();
       let spaces = arr.map(t => {
@@ -612,7 +612,7 @@ export default {
           Outline: [t.data.OutLine],
           BuildingId: this.buildFloor[0],
           FloorId: this.buildFloor[1],
-          Height: t.data.Height || 0
+          Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
         }
       })
       if (spaces.length) {