|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
|
|
|
|
|
<div class="app-container" |
|
|
|
|
<div |
|
|
|
|
class="app-container" |
|
|
|
|
v-loading="loading" |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
@ -163,8 +164,6 @@ |
|
|
|
|
<li style="width: 30px;height: 20px;background-color: #ecf0f1;margin-left:8px;margin-right:20px"></li> |
|
|
|
|
<li>有货</li> |
|
|
|
|
<li style="width: 30px;height: 20px;background-color: #3742fa;margin-left:8px;margin-right:20px"></li> |
|
|
|
|
<!-- <li>空台车</li> |
|
|
|
|
<li style="width: 30px;height: 20px;background-color: #70a1ff;margin-left:8px;margin-right:20px"></li> --> |
|
|
|
|
<li>已分配</li> |
|
|
|
|
<li style="width: 30px;height: 20px;background-color: #eccc68;margin-left:8px;margin-right:20px"></li> |
|
|
|
|
<li>锁定库存</li> |
|
|
|
|
@ -384,7 +383,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
// this.startMap() |
|
|
|
|
this.startMap() |
|
|
|
|
this.init('fourwayCar') |
|
|
|
|
if (!localStorage.getItem('level')) { |
|
|
|
|
localStorage.setItem('level', 'level-1') |
|
|
|
|
@ -396,7 +395,7 @@ export default { |
|
|
|
|
init(type) { |
|
|
|
|
let self = this |
|
|
|
|
this.type = type |
|
|
|
|
this.config=JSON.parse(JSON.stringify(sysConfig)) |
|
|
|
|
this.config = JSON.parse(JSON.stringify(sysConfig)) |
|
|
|
|
switch (type) { |
|
|
|
|
case 'fourwayCar': |
|
|
|
|
this.config.mutiLayer = true |
|
|
|
|
@ -410,14 +409,14 @@ export default { |
|
|
|
|
this.config.warehouseType = 1 |
|
|
|
|
break |
|
|
|
|
} |
|
|
|
|
let container=null |
|
|
|
|
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 = null |
|
|
|
|
this.mapControl = new MapDrawing('mapContainer', { |
|
|
|
|
width: container.offsetWidth - 10, |
|
|
|
|
height: window.innerHeight - 10, |
|
|
|
|
@ -485,7 +484,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.mapControl.initWarehouse() |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.init() |
|
|
|
|
} |
|
|
|
|
@ -606,22 +604,24 @@ export default { |
|
|
|
|
num1: 0, |
|
|
|
|
num2: 0, |
|
|
|
|
num3: 0, |
|
|
|
|
num4: 0 |
|
|
|
|
num4: 0, |
|
|
|
|
num5: 0 |
|
|
|
|
} |
|
|
|
|
this.locationObj2 = { |
|
|
|
|
num1: 0, |
|
|
|
|
num2: 0, |
|
|
|
|
num3: 0, |
|
|
|
|
num4: 0 |
|
|
|
|
num4: 0, |
|
|
|
|
num5: 0 |
|
|
|
|
} |
|
|
|
|
getBaseLocationForMap({ pageNum: 1, pageSize: 9999 }).then((res) => { |
|
|
|
|
res.rows.forEach((item, index) => { |
|
|
|
|
// console.log(item) |
|
|
|
|
if (item.isDel == '1') { |
|
|
|
|
// console.log('isDel') |
|
|
|
|
item.locationStatus = '7' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// res.rows.forEach((item, index) => { |
|
|
|
|
// // console.log(item) |
|
|
|
|
// if (item.isDel == '1') { |
|
|
|
|
// // console.log('isDel') |
|
|
|
|
// item.locationStatus = '7' |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
this.latticeForPiler1 = res.rows |
|
|
|
|
localStorage.setItem('latticeForPiler1', JSON.stringify(this.latticeForPiler1)) |
|
|
|
|
this.doUpdateFreightSpaceState() |
|
|
|
|
@ -647,6 +647,11 @@ export default { |
|
|
|
|
if (item.locationStatus != 0) { |
|
|
|
|
this.locationObj2.num4++ |
|
|
|
|
} |
|
|
|
|
} else if (item.locationName.slice(0, 2) == '5-') { |
|
|
|
|
this.locationObj.num5++ |
|
|
|
|
if (item.locationStatus != 0) { |
|
|
|
|
this.locationObj2.num5++ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
@ -893,7 +898,7 @@ export default { |
|
|
|
|
localStorage.setItem('layerItem', JSON.stringify(this.layer)) |
|
|
|
|
|
|
|
|
|
// location.reload() |
|
|
|
|
this.$router.replace('/mapRouter'); |
|
|
|
|
this.$router.replace('/mapRouter') |
|
|
|
|
}, |
|
|
|
|
getPointPosition(tileData) { |
|
|
|
|
// 计算点位x坐标 |
|
|
|
|
|