|
|
|
|
@ -1,6 +1,8 @@ |
|
|
|
|
<template> |
|
|
|
|
|
|
|
|
|
<div class="app-container"> |
|
|
|
|
<div class="app-container" |
|
|
|
|
v-loading="loading" |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
class="dataContainer" |
|
|
|
|
@ -377,7 +379,8 @@ export default { |
|
|
|
|
num2: '', |
|
|
|
|
num3: '', |
|
|
|
|
num4: '' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
loading: false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -388,25 +391,12 @@ export default { |
|
|
|
|
} |
|
|
|
|
var layerId1 = localStorage.getItem('level') || 'level-1' |
|
|
|
|
this.mapControl.layerControl(layerId1, this.layer[layerId1], layerId1.slice(6, 7)) |
|
|
|
|
// this.init('piler') |
|
|
|
|
// var layerId1 = localStorage.getItem('level') || 'level-1' |
|
|
|
|
// this.mapControl.layerControl(layerId1, this.layer[layerId1], layerId1.slice(6, 7)) |
|
|
|
|
// console.log(layerId1, this.layer[layerId1], layerId1.slice(6, 7), this.layer) |
|
|
|
|
// getLogicalAreaList({ pageNum: 1, pageSize: 999 }).then((response) => { |
|
|
|
|
// 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坐标 |
|
|
|
|
|