标记的格式更改
This commit is contained in:
parent
004ad300c9
commit
1fd86cd469
@ -1855,18 +1855,22 @@ const markFormSubmit = async () => {
|
||||
message.warning('请选择车辆')
|
||||
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)
|
||||
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 actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
|
||||
|
||||
if (state.currentItemIndex !== -1) {
|
||||
state.allMapPointInfo[state.currentItemIndex].locationYaw = point.yaw
|
||||
state.allMapPointInfo[state.currentItemIndex].locationX = pointPx.x
|
||||
state.allMapPointInfo[state.currentItemIndex].locationY = pointPx.y
|
||||
state.allMapPointInfo[state.currentItemIndex].actualLocationX = actualPoint.actualLocationX
|
||||
state.allMapPointInfo[state.currentItemIndex].actualLocationY = actualPoint.actualLocationY
|
||||
state.allMapPointInfo[state.currentItemIndex].actualLocationX = point.x
|
||||
state.allMapPointInfo[state.currentItemIndex].actualLocationY = point.y
|
||||
|
||||
//更改路线里的
|
||||
let item = state.allMapPointInfo[state.currentItemIndex]
|
||||
@ -1876,16 +1880,16 @@ const markFormSubmit = async () => {
|
||||
route.startPointY = pointPx.y
|
||||
route.beginHigh = Number(item.locationDeepPx)
|
||||
route.beginWidth = Number(item.locationWidePx)
|
||||
route.actualStartPointX = actualPoint.actualLocationX
|
||||
route.actualStartPointY = actualPoint.actualLocationY
|
||||
route.actualStartPointX = point.x
|
||||
route.actualStartPointY = point.y
|
||||
}
|
||||
if (item.id === route.endPointId) {
|
||||
route.endPointX = pointPx.x
|
||||
route.endPointY = pointPx.y
|
||||
route.endHigh = Number(item.locationDeepPx)
|
||||
route.endWidth = Number(item.locationWidePx)
|
||||
route.actualEndPointX = actualPoint.actualLocationX
|
||||
route.actualEndPointY = actualPoint.actualLocationY
|
||||
route.actualEndPointX = point.x
|
||||
route.actualEndPointY = point.y
|
||||
}
|
||||
})
|
||||
|
||||
@ -1897,8 +1901,8 @@ const markFormSubmit = async () => {
|
||||
layerSelectionShow: true,
|
||||
locationX: pointPx.x,
|
||||
locationY: pointPx.y,
|
||||
actualLocationX: actualPoint.actualLocationX,
|
||||
actualLocationY: actualPoint.actualLocationY,
|
||||
actualLocationX: point.x,
|
||||
actualLocationY: point.y,
|
||||
locationDeep: 40,
|
||||
locationWide: 40,
|
||||
locationDeepPx: 8,
|
||||
@ -1912,7 +1916,7 @@ const markFormSubmit = async () => {
|
||||
type: 1, //默认类型1 路径节点
|
||||
dataList: [], //存库位的
|
||||
dataObj: {}, //存 设备点 停车点 文字
|
||||
locationYaw: 0 //弧度
|
||||
locationYaw: point.yaw //弧度
|
||||
})
|
||||
addEditHistory()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user