瀏覽代碼

修改 bug 业务空间与元空间关系传null问题

haojianlong 5 年之前
父節點
當前提交
8bf7e5ee94
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      src/components/business_space/newGraphy/graphy.vue

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

@@ -479,7 +479,9 @@ export default {
       let selectSpaces = this.scene.getSelectedSpaces();
       selectSpaces.map(t => {
         zoneObj.Outline.push(t.data.OutLine);
-        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        if (this.BIMIDToSID[t.data.SourceId]) {
+          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        }
         if (t.data.Height && (zoneObj.Height == 0 || t.data.Height < zoneObj.Height)) {
           zoneObj.Height = t.data.Height;
         }
@@ -511,7 +513,9 @@ export default {
       let arr = this.scene.getSelectedSpaces(), IspaceIdList = [];
       arr.map(t => {
         BSP.Outline.push(t.data.OutLine);
-        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        if (this.BIMIDToSID[t.data.SourceId]) {
+          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        }
         if (t.Height && (BSP.Height == 0 || t.Height < BSP.Height)) {
           BSP.Height = t.Height;
         }
@@ -549,7 +553,9 @@ export default {
       // 空间
       selectSpace.map(t => {
         zoneObj.Outline.push(t.data.OutLine);
-        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        if (this.BIMIDToSID[t.data.SourceId]) {
+          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
+        }
         if (t.Height && (zoneObj.Height == 0 || t.Height < zoneObj.Height)) {
           zoneObj.Height = t.Height;
         }