Przeglądaj źródła

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

haojianlong 5 lat temu
rodzic
commit
8bf7e5ee94

+ 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;
         }