zhulizhen1111 пре 4 година
родитељ
комит
f8261ed52b
1 измењених фајлова са 18 додато и 8 уклоњено
  1. 18 8
      src/components/floorMap/index.vue

+ 18 - 8
src/components/floorMap/index.vue

@@ -87,7 +87,7 @@
     </div>
 </template>
 <script>
-import { SFengParser } from '@saga-web/feng-map'
+import { SFengParser, ProjectRf } from '@saga-web/feng-map'
 import { SFloorParser, ItemOrder, ItemColor, SPolygonItem } from '@saga-web/big'
 import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
@@ -135,6 +135,7 @@ export default {
             },
             activeItem: null,
             showBtnWell: false,
+            count: 0, // 顶楼为多张图时计数器
         }
     },
     props: {
@@ -289,13 +290,13 @@ export default {
             if (floor == 'g80') {
                 // 屋顶
                 if (window.fengmapData.frImg) {
-                    let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
-                    imgItem.showType = SImageShowType.AutoFit
-                    imgItem.connect('imgLoadOver', this, () => {
-                        this.readGraph()
-                    })
-                    this.scene.addItem(imgItem)
-                    this.view.scene = this.scene
+                        let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
+                        imgItem.showType = SImageShowType.AutoFit
+                        imgItem.connect('imgLoadOver', this, () => {
+                            this.readGraph()
+                        })
+                        this.scene.addItem(imgItem)
+                        this.view.scene = this.scene
                     // this.view.fitSceneToView()
                 } else {
                     // 屋顶图不为图片
@@ -453,6 +454,15 @@ export default {
                     this.loading = false
                 })
         },
+        // 顶楼为多张图时计数器
+        countRf(len) {
+            this.count++
+            if (len == this.count) {
+                this.readGraph();
+            } else {
+                console.log('所有图片未加载完成');
+            }
+        },
         clearGraphy() {
             if (this.view) {
                 this.view.scene = null