소스 검색

解决bug

haojianlong 4 년 전
부모
커밋
5f37654bf9
2개의 변경된 파일21개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/components/business_space/newGraphy/graphy.vue
  2. 19 1
      src/views/ledger/spacelist/index.vue

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

@@ -379,7 +379,7 @@ export default {
       that.canvasLoading = false;
       if (res == 'error') {
         this.FloorMap = '';
-        this.$message.warning('数据解析异常');
+        console.log('数据解析异常', `/image-service/common/file_get?systemId=revit&key=${this.FloorMap}`);
         return;
       }
       that.view.scene = that.scene;
@@ -451,7 +451,7 @@ export default {
             this.view._needDraw = true;
             this.fit();
           } catch (err) {
-            console.log(err);
+            console.log(err,'------------');
             console.log(this)
           }
           this.canvasLoading = false;

+ 19 - 1
src/views/ledger/spacelist/index.vue

@@ -136,7 +136,9 @@ export default {
       mutiCount: 0,
       infectedTotal: 0,
       infectedCurfloor: 0,
-      otherType: ''
+      otherType: '',
+      tabsListLoadOver: false,
+      isGetType: true, // 防止请求图时 分区类型还没有请求回来
     };
   },
   created() {
@@ -221,6 +223,7 @@ export default {
           }
           return t;
         }).filter(item => item);
+        this.tabsListLoadOver = true;
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
           this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;
@@ -302,12 +305,17 @@ export default {
         this.$message.warning('请选择建筑楼层')
         return
       }
+      if (!this.activeTabType.code) {
+        this.isGetType = false;
+        return
+      }
       if (num == 2) {
         this.initMessage();
       } else {
         this.getInfected(this.buildFloorSelectd[1]);
         /// 
         console.log(this.FloorMap, '========================');
+        this.isGetType = true;
         this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType);
         this.childBackParam = {}
       }
@@ -389,6 +397,16 @@ export default {
     },
     projectId() {
       this.init()
+    },
+    tabsListLoadOver: {
+      handler: function (n) {
+        if (n) {
+          if (!this.isGetType) {
+            console.log(n,'0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0');
+            this.changeGraphyOrTable(this.isMyTab)
+          }
+        }
+      }
     }
   }
 };