Browse Source

顶楼多图

haojianlong 4 years ago
parent
commit
8d3ec163e9
2 changed files with 27 additions and 27 deletions
  1. 1 1
      package.json
  2. 26 26
      src/components/floorMap/index.vue

+ 1 - 1
package.json

@@ -14,7 +14,7 @@
         "@saga-web/base": "2.1.25",
         "@saga-web/base": "2.1.25",
         "@saga-web/big": "1.0.107",
         "@saga-web/big": "1.0.107",
         "@saga-web/draw": "2.1.106",
         "@saga-web/draw": "2.1.106",
-        "@saga-web/feng-map": "1.0.37",
+        "@saga-web/feng-map": "1.0.38",
         "@saga-web/graph": "2.1.123",
         "@saga-web/graph": "2.1.123",
         "ant-design-vue": "^1.4.10",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "axios": "^0.19.2",

+ 26 - 26
src/components/floorMap/index.vue

@@ -290,9 +290,9 @@ export default {
             if (floor == 'g80') {
             if (floor == 'g80') {
                 // 屋顶
                 // 屋顶
                 if (window.fengmapData.frImg) {
                 if (window.fengmapData.frImg) {
-                    // const pj = this.urlMsg.fmapID.split('_')[0]
-                    // // 单张图片
-                    // if (!ProjectRf[pj]) {
+                    const pj = this.fmapID.split('_')[0]
+                    // 单张图片
+                    if (!ProjectRf[pj]) {
                         let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
                         let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
                         imgItem.showType = SImageShowType.AutoFit
                         imgItem.showType = SImageShowType.AutoFit
                         imgItem.connect('imgLoadOver', this, () => {
                         imgItem.connect('imgLoadOver', this, () => {
@@ -301,29 +301,29 @@ export default {
                         this.scene.addItem(imgItem)
                         this.scene.addItem(imgItem)
                         this.view.scene = this.scene
                         this.view.scene = this.scene
                     // this.view.fitSceneToView()
                     // this.view.fitSceneToView()
-                    // } else {
-                    //   // 多张图
-                    //   try {
-                    //     // 初始化0
-                    //     this.count = 0;
-                    //     ProjectRf[pj].forEach(t => {
-                    //       const item = new SImageItem(
-                    //         null,
-                    //         `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${t.name}`
-                    //       );
-                    //       item.width = t.width
-                    //       item.height = t.height
-                    //       item.moveTo(t.x, t.y)
-                    //       item.connect("imgLoadOver", this, () => {
-                    //         this.countRf(ProjectRf[pj].length);
-                    //       });
-                    //       this.scene.addItem(item);
-                    //     })
-                    //     this.view.scene = this.scene;
-                    //   } catch(e) {
-                    //     console.log(e);
-                    //   }
-                    // }
+                    } else {
+                      // 多张图
+                      try {
+                        // 初始化0
+                        this.count = 0;
+                        ProjectRf[pj].forEach(t => {
+                          const item = new SImageItem(
+                            null,
+                            `${this.mapServerURL}/webtheme/${this.fmapID}/${t.name}`
+                          );
+                          item.width = t.width
+                          item.height = t.height
+                          item.moveTo(t.x, t.y)
+                          item.connect("imgLoadOver", this, () => {
+                            this.countRf(ProjectRf[pj].length);
+                          });
+                          this.scene.addItem(item);
+                        })
+                        this.view.scene = this.scene;
+                      } catch(e) {
+                        console.log(e);
+                      }
+                    }
                 } else {
                 } else {
                     // 屋顶图不为图片
                     // 屋顶图不为图片
                     this.readBaseMap(floor)
                     this.readBaseMap(floor)