{
- // this.LogicalAreaList = response.rows
- // // this.paging.total = response.total
- // this.loading = false
- // })
- // // clearInterval(timer)
- // var timer = setInterval(() => {
- // this.startMap()
- // // console.log(2222)
- // }, 30000)
},
methods: {
init(type) {
let self = this
this.type = type
+ this.config=JSON.parse(JSON.stringify(sysConfig))
switch (type) {
case 'fourwayCar':
this.config.mutiLayer = true
@@ -420,12 +410,14 @@ export default {
this.config.warehouseType = 1
break
}
- let container = document.getElementById('mapContainer')
+ let container=null
+ container = document.getElementById('mapContainer')
if (container) {
this.config.mapWidth = this.config.columnCount * this.config.standardXLength
this.config.mapHeight = this.config.rowCount * this.config.standardYLength
this.config.leftOffset = this.config.leftOffset - this.config.mapWidth / 2 - this.config.standardXLength / 2 - this.config.standardXLength * this.config.leftOffsetCell
this.config.topOffset = this.config.topOffset - this.config.mapHeight / 2 - this.config.standardYLength / 2 - this.config.standardYLength * this.config.topOffsetCell
+ this.mapControl =null
this.mapControl = new MapDrawing('mapContainer', {
width: container.offsetWidth - 10,
height: window.innerHeight - 10,
@@ -493,6 +485,7 @@ export default {
}
}
this.mapControl.initWarehouse()
+
} else {
this.init()
}
@@ -898,13 +891,9 @@ export default {
}
})
localStorage.setItem('layerItem', JSON.stringify(this.layer))
- // }
- // this.layer[layerId1]
- // this.layer[layerId] = !this.layer[layerId]
- // this.mapControl.layerControl(layerId1, this.layer[layerId1], layerId1.slice(6, 7))
- // this.mapControl.initWarehouse()
- // console.log(this.layer[layerId]);
- location.reload()
+
+ // location.reload()
+ this.$router.replace('/mapRouter');
},
getPointPosition(tileData) {
// 计算点位x坐标