标记的格式更改

This commit is contained in:
yyy 2025-04-11 10:57:53 +08:00
parent 004ad300c9
commit 1fd86cd469

View File

@ -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()
}