master
Mr.sun 2 years ago
parent 37e85a4a33
commit a9b421d08e
  1. 2
      src/api/util/mapDrawing.js
  2. 15
      src/api/wcs/location.js
  3. 90
      src/config.js
  4. 97
      src/views/index.vue

@ -1575,7 +1575,7 @@ class MapDrawing extends EventEmitter {
Object.keys(warehouseData.storageRack[storageRackId].freightSpace).map(freightSpaceId => { Object.keys(warehouseData.storageRack[storageRackId].freightSpace).map(freightSpaceId => {
let freightSpace = warehouseData.storageRack[storageRackId].freightSpace[freightSpaceId] let freightSpace = warehouseData.storageRack[storageRackId].freightSpace[freightSpaceId]
Object.keys(freightSpaceStateDictionary).map(tileStateKey => { Object.keys(freightSpaceStateDictionary).map(tileStateKey => {
if (freightSpace.state.toString() === tileStateKey) { if (freightSpace.state && freightSpace.state.toString() === tileStateKey) {
if (!freightSpaceStateDictionary[tileStateKey].nodeIds) { if (!freightSpaceStateDictionary[tileStateKey].nodeIds) {
freightSpaceStateDictionary[tileStateKey].nodeIds = [] freightSpaceStateDictionary[tileStateKey].nodeIds = []
} }

@ -8,6 +8,21 @@ export function listLocation(query) {
params: query params: query
}) })
} }
export function containerList(data) {
return request({
url: '/wcs/container/list',
method: 'get',
params: data
})
}
// export function listLocation(query) {
// return request({
// url: '/wcs/location/list',
// method: 'get',
// params: query
// })
// }
// 查询货位信息详细lo // 查询货位信息详细lo
export function getLocation(id) { export function getLocation(id) {

@ -55,7 +55,7 @@ var arr=[
[1,12,2,"011202",1,0,120,380,100], [1,12,2,"011202",1,0,120,380,100],
[1,12,3,"011203",1,0,120,380,100], [1,12,3,"011203",1,0,120,380,100],
[1,12,4,"011204",1,0,120,380,100], [1,12,4,"011204",1,0,120,380,100],
[1,13,1,"011301",1,0,100,380,100], [1,13,1,"011301",1,0,120,380,100],
[1,13,2,"011302",1,0,120,380,100], [1,13,2,"011302",1,0,120,380,100],
[1,13,3,"011303",1,0,120,380,100], [1,13,3,"011303",1,0,120,380,100],
[1,13,4,"011304",1,0,120,380,100], [1,13,4,"011304",1,0,120,380,100],
@ -310,31 +310,95 @@ var arrRe=[
// color: '#cccccc' // color: '#cccccc'
// } // }
// }, // },
// 0:空(无盒子)
// 1:禁止
// 2:实(有盒子)
// 3:实(BCR 异常的盒子)
// 4:实(BCR 重复 ID 的既存盒子)
// 5:实(双重搬入时的现有的盒子)
// 6:输送目的地预约中
// 7: 源目标
// 8: 切离禁用空的状态
// 9: 切离禁用实的状态
freightSpaceStateDictionary: { freightSpaceStateDictionary: {
'0': { '0': {
//无色
describe: '空', describe: '空',
color: '#ecf0f1' color: '#ecf0f1'
}, },
'1': { '1': {
describe: '满位', //红色
color: '#3742fa' describe: '禁止',
color: '#ff4757'
}, },
'2': { '2': {
describe: '半满', //淡蓝
color: '#70a1ff' describe: '实(有盒子)',
color: '#3742fa'
}, },
'3': { '3': {
describe: '托盘出库中', describe: '实(BCR 异常的盒子)',
color: '#ffa502' color: '#3742fa'
}, },
'4': { '4': {
describe: '模具出库中', describe: '实(BCR 重复 ID 的既存盒子)',
color: '#ff4757' color: '#74b9ff'
}, },
'5':{ '5': {
describe: '只有空托盘', describe: '实(双重搬入时的现有的盒子)',
color: '#8670ff' color: '#3742fa'
} },
'6': {
describe: '输送目的地预约中',
color: '#3742fa'
},
'7': {
describe: '源目标',
color: '#3742fa'
},
// 8: 切离禁用空的状态
// 9: 切离禁用实的状态
'8': {
describe: '切离禁用空的状态',
color: '#3742fa'
},
'9': {
describe: '切离禁用实的状态',
color: '#3742fa'
},
// '1': {
// describe: '满位',
// color: '#3742fa'
// },
// '1': {
// describe: '满位',
// color: '#3742fa'
// },
// '1': {
// describe: '满位',
// color: '#3742fa'
// },
// '1': {
// describe: '满位',
// color: '#3742fa'
// },
// '2': {
// describe: '半满',
// color: '#70a1ff'
// },
// '3': {
// describe: '托盘出库中',
// color: '#ffa502'
// },
// '4': {
// describe: '模具出库中',
// color: '#ff4757'
// },
// '5':{
// describe: '只有空托盘',
// color: '#8670ff'
// }
}, },
// 堆垛机状态 // 堆垛机状态
pilerStateDictionary: { pilerStateDictionary: {

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

Loading…
Cancel
Save