标记的格式更改
This commit is contained in:
parent
004ad300c9
commit
1fd86cd469
@ -1855,18 +1855,22 @@ const markFormSubmit = async () => {
|
|||||||
message.warning('请选择车辆')
|
message.warning('请选择车辆')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 格式是 '{"area":"E区","batSoc":"80","floor":"3","robotNo":"100","x":"-1.720683217048645","y":"-14.308184623718262","yaw":"-3.0042707920074463"}'
|
||||||
let res = await MapApi.getAGVPointInformation(state.markForm.macAddress)
|
let res = await MapApi.getAGVPointInformation(state.markForm.macAddress)
|
||||||
if (res) {
|
if (res) {
|
||||||
let content = JSON.parse(res.content)
|
//点
|
||||||
let point = JSON.parse(content[state.markForm.robotNo]) //标记传过来的数据
|
let point = JSON.parse(res)
|
||||||
|
console.log(point)
|
||||||
let pointPx = convertActualToBrowser(point.x, point.y)
|
let pointPx = convertActualToBrowser(point.x, point.y)
|
||||||
let actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
|
let actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
|
||||||
|
|
||||||
if (state.currentItemIndex !== -1) {
|
if (state.currentItemIndex !== -1) {
|
||||||
|
state.allMapPointInfo[state.currentItemIndex].locationYaw = point.yaw
|
||||||
state.allMapPointInfo[state.currentItemIndex].locationX = pointPx.x
|
state.allMapPointInfo[state.currentItemIndex].locationX = pointPx.x
|
||||||
state.allMapPointInfo[state.currentItemIndex].locationY = pointPx.y
|
state.allMapPointInfo[state.currentItemIndex].locationY = pointPx.y
|
||||||
state.allMapPointInfo[state.currentItemIndex].actualLocationX = actualPoint.actualLocationX
|
state.allMapPointInfo[state.currentItemIndex].actualLocationX = point.x
|
||||||
state.allMapPointInfo[state.currentItemIndex].actualLocationY = actualPoint.actualLocationY
|
state.allMapPointInfo[state.currentItemIndex].actualLocationY = point.y
|
||||||
|
|
||||||
//更改路线里的
|
//更改路线里的
|
||||||
let item = state.allMapPointInfo[state.currentItemIndex]
|
let item = state.allMapPointInfo[state.currentItemIndex]
|
||||||
@ -1876,16 +1880,16 @@ const markFormSubmit = async () => {
|
|||||||
route.startPointY = pointPx.y
|
route.startPointY = pointPx.y
|
||||||
route.beginHigh = Number(item.locationDeepPx)
|
route.beginHigh = Number(item.locationDeepPx)
|
||||||
route.beginWidth = Number(item.locationWidePx)
|
route.beginWidth = Number(item.locationWidePx)
|
||||||
route.actualStartPointX = actualPoint.actualLocationX
|
route.actualStartPointX = point.x
|
||||||
route.actualStartPointY = actualPoint.actualLocationY
|
route.actualStartPointY = point.y
|
||||||
}
|
}
|
||||||
if (item.id === route.endPointId) {
|
if (item.id === route.endPointId) {
|
||||||
route.endPointX = pointPx.x
|
route.endPointX = pointPx.x
|
||||||
route.endPointY = pointPx.y
|
route.endPointY = pointPx.y
|
||||||
route.endHigh = Number(item.locationDeepPx)
|
route.endHigh = Number(item.locationDeepPx)
|
||||||
route.endWidth = Number(item.locationWidePx)
|
route.endWidth = Number(item.locationWidePx)
|
||||||
route.actualEndPointX = actualPoint.actualLocationX
|
route.actualEndPointX = point.x
|
||||||
route.actualEndPointY = actualPoint.actualLocationY
|
route.actualEndPointY = point.y
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1897,8 +1901,8 @@ const markFormSubmit = async () => {
|
|||||||
layerSelectionShow: true,
|
layerSelectionShow: true,
|
||||||
locationX: pointPx.x,
|
locationX: pointPx.x,
|
||||||
locationY: pointPx.y,
|
locationY: pointPx.y,
|
||||||
actualLocationX: actualPoint.actualLocationX,
|
actualLocationX: point.x,
|
||||||
actualLocationY: actualPoint.actualLocationY,
|
actualLocationY: point.y,
|
||||||
locationDeep: 40,
|
locationDeep: 40,
|
||||||
locationWide: 40,
|
locationWide: 40,
|
||||||
locationDeepPx: 8,
|
locationDeepPx: 8,
|
||||||
@ -1912,7 +1916,7 @@ const markFormSubmit = async () => {
|
|||||||
type: 1, //默认类型1 路径节点
|
type: 1, //默认类型1 路径节点
|
||||||
dataList: [], //存库位的
|
dataList: [], //存库位的
|
||||||
dataObj: {}, //存 设备点 停车点 文字
|
dataObj: {}, //存 设备点 停车点 文字
|
||||||
locationYaw: 0 //弧度
|
locationYaw: point.yaw //弧度
|
||||||
})
|
})
|
||||||
addEditHistory()
|
addEditHistory()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user