修改canvasId 初始化位置
This commit is contained in:
parent
4796e7f648
commit
45371fb2d3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user