ソースを参照

修改编辑器加载顺序

haojianlong 4 年 前
コミット
a7b7a8d19b
1 ファイル変更13 行追加10 行削除
  1. 13 10
      src/components/baseEditer.vue

+ 13 - 10
src/components/baseEditer.vue

@@ -94,7 +94,7 @@ export default {
   },
   methods: {
     init() {
-      const loadings = Loading.service({
+      this.loadings = Loading.service({
         lock: true,
         text: "Loading",
         spinner: "el-icon-loading",
@@ -121,10 +121,10 @@ export default {
           .then(response => {
             console.log("获取rf成功", response);
             this.parserData(floorid);
-            this.readGraph();
-            loadings.close();
+            // this.readGraph();
+            // loadings.close();
           });
-        this.view.fitSceneToView();
+        // this.view.fitSceneToView();
       });
       // 获取typeid
       this.getTypeId();
@@ -141,9 +141,10 @@ export default {
           );
           this.scene.addItem(imgItem);
           this.view.scene = this.scene;
-          this.view.fitSceneToView();
-          this.loading = false;
-          this.isQuerying = false;
+          // this.view.fitSceneToView();
+          // this.loading = false;
+          // this.isQuerying = false;
+          this.readGraph();
         }
       } else {
         if (this.floorList[floor]) {
@@ -175,9 +176,10 @@ export default {
               this.scene.addItem(item);
             })
             this.view.scene = this.scene;
-            this.view.fitSceneToView();
-            this.loading = false;
-            this.isQuerying = false;
+            // this.view.fitSceneToView();
+            // this.loading = false;
+            // this.isQuerying = false;
+            this.readGraph();
             console.log("success");
           });
         } else {
@@ -272,6 +274,7 @@ export default {
           bus.$emit("initScale", this.view.scale);
           bus.$emit("elementDataChange", this.scene);
         }
+        this.loadings.close()
       });
     },
     // 监听变化