|
@@ -7,6 +7,7 @@
|
|
<script>
|
|
<script>
|
|
import { mapGetters, mapActions, mapMutations } from 'vuex'
|
|
import { mapGetters, mapActions, mapMutations } from 'vuex'
|
|
import { SFengParser } from '@saga-web/feng-map'
|
|
import { SFengParser } from '@saga-web/feng-map'
|
|
|
|
+import {setFloor} from "@/api/public.js"
|
|
window.fengmapData = null
|
|
window.fengmapData = null
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -39,7 +40,6 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
this.isMounted = true
|
|
this.isMounted = true
|
|
this.plazaIds = localStorage.getItem('PLAZAID')
|
|
this.plazaIds = localStorage.getItem('PLAZAID')
|
|
- console.log(this.plazaIds)
|
|
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'accessLevel'])
|
|
...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'accessLevel'])
|
|
@@ -61,11 +61,20 @@ export default {
|
|
null,
|
|
null,
|
|
this.mapthemeUrl
|
|
this.mapthemeUrl
|
|
)
|
|
)
|
|
- window.fengmapData.loadMap(this.fmapID, () => {
|
|
|
|
|
|
+ window.fengmapData.loadMap(this.fmapID, (a,b) => {
|
|
|
|
+ const dataArr = b.map(item=>{
|
|
|
|
+ return item.gname
|
|
|
|
+ });
|
|
// 获取主题数据
|
|
// 获取主题数据
|
|
window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {
|
|
window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {
|
|
this.SETHAVEFENGMAP()
|
|
this.SETHAVEFENGMAP()
|
|
})
|
|
})
|
|
|
|
+ // 缓存楼层数据
|
|
|
|
+ setFloor({plazaId:this.plazaIds},dataArr).then((res)=>{
|
|
|
|
+ console.log('缓存楼层',res)
|
|
|
|
+ }).catch((error)=>{
|
|
|
|
+ console.log('缓存楼层',error)
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|