From 1fd86cd469bfa4cc05c3b44c98fe8028d69064f5 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Fri, 11 Apr 2025 10:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AE=B0=E7=9A=84=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mapPage/realTimeMap/editMap.vue | 26 +++++++++++++---------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue index da1529fc..c6b47e72 100644 --- a/src/views/mapPage/realTimeMap/editMap.vue +++ b/src/views/mapPage/realTimeMap/editMap.vue @@ -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() }