diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 19287cbd8..c44ef59ce 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -76,6 +76,7 @@ export default { operate: null, concentrationStationList: [], showMode: '02', + canvasId:'', localStationShow: false, previewOrMapDraw: false, trainingSetStation: false // 现地实训是否根据设备仅显示设备集中站设备 @@ -85,11 +86,12 @@ export default { ...mapGetters('training', [ 'mode' ]), - canvasId() { - const canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_'); - this.$store.dispatch('config/setCurrentCancasId', { id: canvasId }); - return canvasId; - }, + // canvasId() { + // // debugger; + // const canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_'); + // this.$store.dispatch('config/setCurrentCancasId', { id: canvasId }); + // return canvasId; + // }, width() { return this.$store.state.config.width; }, @@ -207,6 +209,8 @@ export default { EventBus.$on('refresh', () => { this.refresh(this.$store.state.map.map); }); + this.canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_'); + this.$store.dispatch('config/setCurrentCancasId', { id: this.canvasId }); }, mounted() { this.initLoadPage(); @@ -265,7 +269,6 @@ export default { stateUpdate: this.handleStateUpdate } }); - this.$jlmap.on('dataZoom', this.onDataZoom, this); this.$jlmap.on('selected', this.onSelected, this); this.$jlmap.on('contextmenu', this.onContextMenu, this);