Browse Source

Merge branch 'screen' into dev

haojianlong 5 years ago
parent
commit
ed9df84c67
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/views/screen/splitscreen/equipledger/index.vue

+ 5 - 2
src/views/screen/splitscreen/equipledger/index.vue

@@ -5,7 +5,7 @@
       <span>{{equip.EquipLocalName || equip.EquipName}}</span>
       <span>{{equip.EquipLocalName || equip.EquipName}}</span>
       <span>(位置图片)</span>
       <span>(位置图片)</span>
     </div>
     </div>
-    <div class="page-content" id="page-content">
+    <div class="page-content" id="page-content" v-loading="canvasLoading">
       <div v-show="showCanvas">
       <div v-show="showCanvas">
         <p>{{file.FolderName}} - {{file.FloorName}}</p>
         <p>{{file.FolderName}} - {{file.FloorName}}</p>
         <canvas :height="cadHeight" :width="cadWidth" id="floorCanvas" :k="refreshCanvas"></canvas>
         <canvas :height="cadHeight" :width="cadWidth" id="floorCanvas" :k="refreshCanvas"></canvas>
@@ -33,7 +33,8 @@ export default {
       scene: {},
       scene: {},
       cadWidth: 800,
       cadWidth: 800,
       cadHeight: 800,
       cadHeight: 800,
-      showCanvas: true
+      showCanvas: true,
+      canvasLoading: false,
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -56,11 +57,13 @@ export default {
     getGraphy() {
     getGraphy() {
       this.clearGraphy();
       this.clearGraphy();
       this.scene = new LocationPointScene()
       this.scene = new LocationPointScene()
+      this.canvasLoading = true;
       this.scene.getFloorData('/modelapi/base-graph/query', { ModelId: this.equip.ModelId }).then(res => {
       this.scene.getFloorData('/modelapi/base-graph/query', { ModelId: this.equip.ModelId }).then(res => {
         this.getGraphtSuc(res)
         this.getGraphtSuc(res)
       })
       })
     },
     },
     getGraphtSuc(res) {
     getGraphtSuc(res) {
+      this.canvasLoading = false;
       this.view.scene = this.scene;
       this.view.scene = this.scene;
       this.view.fitSceneToView();
       this.view.fitSceneToView();
       this.scene.isSpaceSelectable = false;
       this.scene.isSpaceSelectable = false;