|
@@ -35,7 +35,7 @@ export default {
|
|
|
)
|
|
|
);
|
|
|
// 刷新时,将haveFengMap 置为false,解决设备设施页面,刷新时不出新楼层图的问题
|
|
|
- this.SETHAVEFENGMAP(false);
|
|
|
+ this.SETHAVEFENGMAP(-1);
|
|
|
localStorage.removeItem("beforeunload");
|
|
|
window.addEventListener("beforeunload", () => {
|
|
|
let state = JSON.stringify(this.$store.state);
|
|
@@ -58,18 +58,19 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getMap() {
|
|
|
- //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
|
|
|
- // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
|
|
|
- // let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
|
|
|
- // setFloor({ plazaId: this.plazaIds }, arr)
|
|
|
- // .then(res => {
|
|
|
- // console.log("缓存楼层", res);
|
|
|
- // })
|
|
|
- // .catch(error => {
|
|
|
- // console.log("缓存楼层", error);
|
|
|
- // });
|
|
|
- // return
|
|
|
- // }
|
|
|
+ //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
|
|
|
+ // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
|
|
|
+ // let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
|
|
|
+ // setFloor({ plazaId: this.plazaIds }, arr)
|
|
|
+ // .then(res => {
|
|
|
+ // console.log("缓存楼层", res);
|
|
|
+ // })
|
|
|
+ // .catch(error => {
|
|
|
+ // console.log("缓存楼层", error);
|
|
|
+ // });
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
window.fengmapData = new SFengParser(
|
|
|
`fengMap${this.id}`,
|
|
|
`${this.mapServerURL}/fmap/${this.fmapID}`,
|
|
@@ -78,6 +79,9 @@ export default {
|
|
|
null,
|
|
|
this.mapthemeUrl
|
|
|
);
|
|
|
+ if (this.fmapID.includes("null")) {
|
|
|
+ this.SETHAVEFENGMAP(0);
|
|
|
+ }
|
|
|
window.fengmapData.loadMap(this.fmapID, (a, b) => {
|
|
|
const dataArr = b.map(item => {
|
|
|
return item.gname;
|
|
@@ -88,23 +92,22 @@ export default {
|
|
|
`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
|
|
|
)
|
|
|
.then(res => {
|
|
|
- this.SETHAVEFENGMAP();
|
|
|
+ this.SETHAVEFENGMAP(1);
|
|
|
});
|
|
|
// 缓存楼层数据
|
|
|
if (dataArr.length) {
|
|
|
//如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
|
|
|
- if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
|
|
|
- let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
|
|
|
- alert('12313')
|
|
|
- setFloor({ plazaId: this.plazaIds }, arr)
|
|
|
- .then(res => {
|
|
|
- console.log("缓存楼层", res);
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- console.log("缓存楼层", error);
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
|
|
|
+ // let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
|
|
|
+ // setFloor({ plazaId: this.plazaIds }, arr)
|
|
|
+ // .then(res => {
|
|
|
+ // console.log("缓存楼层", res);
|
|
|
+ // })
|
|
|
+ // .catch(error => {
|
|
|
+ // console.log("缓存楼层", error);
|
|
|
+ // });
|
|
|
+ // return
|
|
|
+ // }
|
|
|
setFloor({ plazaId: this.plazaIds }, dataArr)
|
|
|
.then(res => {
|
|
|
console.log("缓存楼层", res);
|