From 45371fb2d3a3d1cee23b1297219540c25b485510 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 25 May 2021 09:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9canvasId=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/jlmapNew/index.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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);