|
@@ -8,7 +8,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { SFengParser } from "@saga-web/feng-map";
|
|
|
+import { SFengParser, ProjectRf } from "@saga-web/feng-map";
|
|
|
import { SFloorParser } from "@saga-web/big";
|
|
|
import { FloorView } from "./../lib/FloorView";
|
|
|
import { EditScence } from "./mapClass/EditScence";
|
|
@@ -69,7 +69,8 @@ export default {
|
|
|
menuStyle: {
|
|
|
top: 0,
|
|
|
left: 0
|
|
|
- }
|
|
|
+ },
|
|
|
+ count: 0, // 顶楼为多张图时计数器
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -159,16 +160,42 @@ export default {
|
|
|
if (floor == "g80") {
|
|
|
// 屋顶
|
|
|
if (window.FENGMAP.frImg) {
|
|
|
- const imgItem = new SImageItem(
|
|
|
- null,
|
|
|
- `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${window.FENGMAP.frImg}`
|
|
|
- );
|
|
|
- imgItem.showType = SImageShowType.AutoFit;
|
|
|
- imgItem.connect("imgLoadOver", this, () => {
|
|
|
- this.readGraph();
|
|
|
- });
|
|
|
- this.scene.addItem(imgItem);
|
|
|
- this.view.scene = this.scene;
|
|
|
+ // const pj = this.urlMsg.fmapID.split('_')[0]
|
|
|
+ // // 单张图片
|
|
|
+ // if (!ProjectRf[pj]) {
|
|
|
+ const imgItem = new SImageItem(
|
|
|
+ null,
|
|
|
+ `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${window.FENGMAP.frImg}`
|
|
|
+ );
|
|
|
+ imgItem.showType = SImageShowType.AutoFit;
|
|
|
+ imgItem.connect("imgLoadOver", this, () => {
|
|
|
+ this.readGraph();
|
|
|
+ });
|
|
|
+ this.scene.addItem(imgItem);
|
|
|
+ this.view.scene = this.scene;
|
|
|
+ // } 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.width
|
|
|
+ // 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 {
|
|
|
// 屋顶图不为图片
|
|
|
this.readBaseMap(floor);
|
|
@@ -199,7 +226,11 @@ export default {
|
|
|
this.scene.addItem(t);
|
|
|
});
|
|
|
this.scene.spaceList = this.fParser.spaceList;
|
|
|
- this.fParser.wallList.forEach(t => this.scene.addItem(t));
|
|
|
+ this.fParser.wallList.forEach(t => {
|
|
|
+ // if (!t.data.HasHole) {
|
|
|
+ this.scene.addItem(t)
|
|
|
+ // }
|
|
|
+ });
|
|
|
this.fParser.virtualWallList.forEach(t => this.scene.addItem(t));
|
|
|
this.fParser.doorList.forEach(t => this.scene.addItem(t));
|
|
|
this.fParser.columnList.forEach(t => this.scene.addItem(t));
|
|
@@ -300,6 +331,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ console.log(11111111111111111111111111);
|
|
|
this.view.fitSceneToView();
|
|
|
// 设置初始化缩放比例
|
|
|
this.initScale = this.view.scale;
|
|
@@ -310,6 +342,15 @@ export default {
|
|
|
this.loadings.close()
|
|
|
});
|
|
|
},
|
|
|
+ // 顶楼为多张图时计数器
|
|
|
+ countRf(len) {
|
|
|
+ this.count++
|
|
|
+ if (len == this.count) {
|
|
|
+ this.readGraph();
|
|
|
+ } else {
|
|
|
+ console.log('所有图片未加载完成');
|
|
|
+ }
|
|
|
+ },
|
|
|
// 监听变化
|
|
|
emitChange(itemMsg) {
|
|
|
this.chiceItemList = itemMsg.itemList;
|