소스 검색

顶楼读取修改

haojianlong 4 년 전
부모
커밋
4ba9544b59
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 9 3
      src/components/floorMap/index.vue

+ 9 - 3
src/components/floorMap/index.vue

@@ -89,10 +89,13 @@ export default {
                 // 屋顶
                 if (window.fengmapData.frImg) {
                     let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
-                    this.scene.addItem(imgItem)
                     imgItem.showType = SImageShowType.AutoFit;
+                    imgItem.connect('imgLoadOver',this,()=> {
+                        this.readGraph();
+                    })
+                    this.scene.addItem(imgItem)
                     this.view.scene = this.scene
-                    this.view.fitSceneToView()
+                    // this.view.fitSceneToView()
                 }
             } else {
                 if (window.fengmapData.gnameToGid[floor]) {
@@ -120,12 +123,15 @@ export default {
                         this.fParser.columnList.forEach(t => this.scene.addItem(t))
                         this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         this.view.scene = this.scene
-                        this.view.fitSceneToView()
+                        // this.view.fitSceneToView()
+                        this.readGraph()
                     })
                 } else {
                     console.log('楼层不正确')
                 }
             }
+        },
+        readGraph(){
             this.readGroup(this.floorid).then(data => {
                 this.loading = false
                 if (data.Result == 'failure') {