|
|
|
|
@ -81,7 +81,7 @@ |
|
|
|
|
@click="doUpdateFreightSpaceState()" |
|
|
|
|
>更新货位状态</Button> |
|
|
|
|
</div> |
|
|
|
|
<!-- <div |
|
|
|
|
<div |
|
|
|
|
class="dataContainer" |
|
|
|
|
v-show="rightStatus" |
|
|
|
|
> |
|
|
|
|
@ -94,10 +94,11 @@ |
|
|
|
|
style="width: 30px;height: 30px;float: right;cursor: pointer;" |
|
|
|
|
> |
|
|
|
|
<Table |
|
|
|
|
:height="550" |
|
|
|
|
:columns="columns" |
|
|
|
|
:data="tableData" |
|
|
|
|
></Table> |
|
|
|
|
</div> --> |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
|
id="mapContainer" |
|
|
|
|
class="map-container" |
|
|
|
|
@ -461,7 +462,8 @@ |
|
|
|
|
<script> |
|
|
|
|
import MapDrawing from '@/api/util/mapDrawing.js' |
|
|
|
|
import sysConfig from '../config.js' |
|
|
|
|
// import { getLocationDataList } from '@/api/wms/basicData/locationData' |
|
|
|
|
import { listLocation, containerList } from '@/api/wcs/location.js' |
|
|
|
|
// import { getLocationMoldByLocationCode } from '@/api/tool/dataScreen' |
|
|
|
|
// import { getLocationMoldByLocationCode } from '@/api/tool/dataScreen' |
|
|
|
|
export default { |
|
|
|
|
name: 'HelloWorld', |
|
|
|
|
@ -580,27 +582,31 @@ export default { |
|
|
|
|
}, |
|
|
|
|
columns: [ |
|
|
|
|
{ |
|
|
|
|
title: 111, |
|
|
|
|
key: 'locationCode' |
|
|
|
|
title: '货位', |
|
|
|
|
key: 'locationName' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: 222, |
|
|
|
|
key: 'moldNo', |
|
|
|
|
width: 150 |
|
|
|
|
title: '盒子信息', |
|
|
|
|
key: 'boxId' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: 333, |
|
|
|
|
key: 'model' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: 444, |
|
|
|
|
key: 'moldName' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: 555, |
|
|
|
|
key: 'inTime', |
|
|
|
|
width: 140 |
|
|
|
|
title: '备注', |
|
|
|
|
key: 'remark', |
|
|
|
|
width: 150 |
|
|
|
|
} |
|
|
|
|
// { |
|
|
|
|
// title: 333, |
|
|
|
|
// key: 'model' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title: 444, |
|
|
|
|
// key: 'moldName' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title: 555, |
|
|
|
|
// key: 'inTime', |
|
|
|
|
// width: 140 |
|
|
|
|
// } |
|
|
|
|
], |
|
|
|
|
tableData: [], |
|
|
|
|
latticeForPiler1: [], |
|
|
|
|
@ -610,13 +616,13 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
// |
|
|
|
|
// console.log(window.systemConfig) |
|
|
|
|
// getLocationDataList({ pageNum: 1, pageSize: 999 }).then((res) => { |
|
|
|
|
// console.log(res) |
|
|
|
|
// this.latticeForPiler1 = res.rows |
|
|
|
|
// }) |
|
|
|
|
listLocation({ pageNum: 1, pageSize: 9999 }).then((res) => { |
|
|
|
|
// console.log(res) |
|
|
|
|
this.latticeForPiler1 = res.rows |
|
|
|
|
}) |
|
|
|
|
// this.doUpdateFreightSpaceState() |
|
|
|
|
this.init('piler') |
|
|
|
|
// clearInterval(timer) |
|
|
|
|
clearInterval(timer) |
|
|
|
|
var timer = setInterval(() => { |
|
|
|
|
this.doUpdateFreightSpaceState() |
|
|
|
|
// console.log(2222) |
|
|
|
|
@ -932,57 +938,65 @@ export default { |
|
|
|
|
|
|
|
|
|
this.locationCodeList = [] |
|
|
|
|
self.tableData = [] |
|
|
|
|
await getLocationMoldByLocationCode({ locationCode: eventData.all[0].nodeId }).then((res) => { |
|
|
|
|
this.locationCodeList = res.data |
|
|
|
|
}) |
|
|
|
|
// await containerList({ locationId: eventData.all[0].nodeId }).then((res) => { |
|
|
|
|
// this.locationCodeList = res.data |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
// let resultDatas = eventData.all |
|
|
|
|
self.tableData.length = 0 |
|
|
|
|
this.locationCodeList.map((data) => { |
|
|
|
|
let rowData = { |
|
|
|
|
locationCode: eventData.all[0].nodeId, |
|
|
|
|
moldNo: data.moldNo, |
|
|
|
|
model: data.model, |
|
|
|
|
moldName: data.moldName, |
|
|
|
|
inTime: data.inTime |
|
|
|
|
|
|
|
|
|
this.latticeForPiler1.forEach((item) => { |
|
|
|
|
if (item.locationCode === eventData.all[0].nodeId) { |
|
|
|
|
self.tableData.push(item) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log(self.tableData) |
|
|
|
|
|
|
|
|
|
let storageRack, freightSpace |
|
|
|
|
// switch (data.customDataType) { |
|
|
|
|
// case 'storageRack': |
|
|
|
|
// storageRack = self.warehouseInfo.storageRack[data.nodeId] |
|
|
|
|
// let freightSpaces = [] |
|
|
|
|
// Object.keys(storageRack.freightSpace).map((freightSpaceId) => { |
|
|
|
|
// let freightSpace = storageRack.freightSpace[freightSpaceId] |
|
|
|
|
// freightSpaces.push(freightSpace.id) |
|
|
|
|
// }) |
|
|
|
|
// rowData.detail = '当前货架包含货位:' + freightSpaces.join('、') |
|
|
|
|
// break |
|
|
|
|
// case 'freightSpace': |
|
|
|
|
// storageRack = self.warehouseInfo.storageRack[data.nodeInfo.parentId] |
|
|
|
|
// // freightSpace = storageRack.freightSpace[data.nodeId] |
|
|
|
|
// // freightSpace.freight.name + '(' + freightSpace.freight.id + |
|
|
|
|
// let freightSpacess = [] |
|
|
|
|
// this.locationCodeList.map((data) => { |
|
|
|
|
// let rowData = { |
|
|
|
|
// locationCode: eventData.all[0].nodeId, |
|
|
|
|
// moldNo: data.moldNo, |
|
|
|
|
// model: data.model, |
|
|
|
|
// moldName: data.moldName, |
|
|
|
|
// inTime: data.inTime |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// this.locationCodeList.forEach((item) => { |
|
|
|
|
// // console.log(item) |
|
|
|
|
// freightSpace = item.moldNo + '|' + item.model + (item.moldName ? '|' + item.moldName : item.moldName) |
|
|
|
|
// // console.log(freightSpace) |
|
|
|
|
// freightSpacess.push(freightSpace) |
|
|
|
|
// }) |
|
|
|
|
// let storageRack, freightSpace |
|
|
|
|
// switch (data.customDataType) { |
|
|
|
|
// case 'storageRack': |
|
|
|
|
// storageRack = self.warehouseInfo.storageRack[data.nodeId] |
|
|
|
|
// let freightSpaces = [] |
|
|
|
|
// Object.keys(storageRack.freightSpace).map((freightSpaceId) => { |
|
|
|
|
// let freightSpace = storageRack.freightSpace[freightSpaceId] |
|
|
|
|
// freightSpaces.push(freightSpace.id) |
|
|
|
|
// }) |
|
|
|
|
// rowData.detail = '当前货架包含货位:' + freightSpaces.join('、') |
|
|
|
|
// break |
|
|
|
|
// case 'freightSpace': |
|
|
|
|
// storageRack = self.warehouseInfo.storageRack[data.nodeInfo.parentId] |
|
|
|
|
// // freightSpace = storageRack.freightSpace[data.nodeId] |
|
|
|
|
// // freightSpace.freight.name + '(' + freightSpace.freight.id + |
|
|
|
|
// let freightSpacess = [] |
|
|
|
|
|
|
|
|
|
// // console.log(this.locationCodeList, freightSpacess) |
|
|
|
|
// rowData.detail = '所属货架:' + storageRack.id + '; 存放货物:(' + freightSpacess.join('、') + ')' |
|
|
|
|
// break |
|
|
|
|
// case 'piler': |
|
|
|
|
// break |
|
|
|
|
// case 'cargo': |
|
|
|
|
// let cargo = this.cargo[data.nodeId] |
|
|
|
|
// rowData.detail = '货物:' + cargo.name + '(' + cargo.id + ')' |
|
|
|
|
// break |
|
|
|
|
// } |
|
|
|
|
self.tableData.push(rowData) |
|
|
|
|
}) |
|
|
|
|
// this.locationCodeList.forEach((item) => { |
|
|
|
|
// // console.log(item) |
|
|
|
|
// freightSpace = item.moldNo + '|' + item.model + (item.moldName ? '|' + item.moldName : item.moldName) |
|
|
|
|
// // console.log(freightSpace) |
|
|
|
|
// freightSpacess.push(freightSpace) |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
// // console.log(this.locationCodeList, freightSpacess) |
|
|
|
|
// rowData.detail = '所属货架:' + storageRack.id + '; 存放货物:(' + freightSpacess.join('、') + ')' |
|
|
|
|
// break |
|
|
|
|
// case 'piler': |
|
|
|
|
// break |
|
|
|
|
// case 'cargo': |
|
|
|
|
// let cargo = this.cargo[data.nodeId] |
|
|
|
|
// rowData.detail = '货物:' + cargo.name + '(' + cargo.id + ')' |
|
|
|
|
// break |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 地图点击事件处理 |
|
|
|
|
@ -1093,7 +1107,7 @@ export default { |
|
|
|
|
*/ |
|
|
|
|
carPlay() { |
|
|
|
|
let road = this.warehouseInfo.pilerInfo.road[this.carModel.pilerId.replace('piler-', '')] |
|
|
|
|
console.log(road, this.warehouseInfo, this.carModel) |
|
|
|
|
// console.log(road, this.warehouseInfo, this.carModel) |
|
|
|
|
this.carModel.pathPoints = [...this.warehouseInfo.carModel.carHeadPathPoints, [road.startPoint.x, 0, road.startPoint.y]] |
|
|
|
|
this.mapControl.updateCar(this.carModel) |
|
|
|
|
}, |
|
|
|
|
@ -1152,12 +1166,11 @@ export default { |
|
|
|
|
// console.log(this.lattice) |
|
|
|
|
Object.keys(this.lattice).map((tileKey) => { |
|
|
|
|
if (['interactionPoint', 'storageRack'].indexOf(this.lattice[tileKey].tileType.type) > -1) { |
|
|
|
|
let stateIndex = Math.round(Math.random() * (dicKeys.length - 1)) |
|
|
|
|
// let stateIndex = Math.round(Math.random() * (dicKeys.length - 1)) |
|
|
|
|
this.latticeForPiler1.forEach((item) => { |
|
|
|
|
// console.log(item) |
|
|
|
|
|
|
|
|
|
if (item.locationName === tileKey) { |
|
|
|
|
// console.log(tileKey) |
|
|
|
|
dacKeysList.push(item.locationStatus) |
|
|
|
|
freightSpaceState[tileKey] = item.locationStatus |
|
|
|
|
} |
|
|
|
|
@ -1341,10 +1354,10 @@ export default { |
|
|
|
|
.dataContainer { |
|
|
|
|
position: absolute; |
|
|
|
|
right: 10px; |
|
|
|
|
top: 10px; |
|
|
|
|
top: 60px; |
|
|
|
|
width: 520px; |
|
|
|
|
height: 800px; |
|
|
|
|
height: 560px; |
|
|
|
|
background-color: aliceblue; |
|
|
|
|
padding-top: 10px; |
|
|
|
|
padding-top: 5px; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|