diff --git a/.env.local b/.env.local
index c22b406f..a3752946 100644
--- a/.env.local
+++ b/.env.local
@@ -4,7 +4,7 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
-VITE_BASE_URL='http://192.168.0.172:48080'
+VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.189:48080'
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue
index 93b92910..a4eb5632 100644
--- a/src/views/mapPage/realTimeMap/editMap.vue
+++ b/src/views/mapPage/realTimeMap/editMap.vue
@@ -325,7 +325,7 @@
style="border: none; z-index: 999"
>
-
+
{
return
}
let res = await MapApi.getAGVPointInformation(state.markForm.macAddress)
- let content = JSON.parse(res.content)
- let point = JSON.parse(content[state.markForm.robotNo]) //标记传过来的数据
- let pointPx = convertActualToBrowser(point.x, point.y)
- let actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
+ if (res) {
+ let content = JSON.parse(res.content)
+ let point = JSON.parse(content[state.markForm.robotNo]) //标记传过来的数据
+ let pointPx = convertActualToBrowser(point.x, point.y)
+ let actualPoint = disposeEventPoint(pointPx.x, pointPx.y)
- if (state.currentItemIndex !== -1) {
- 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
+ if (state.currentItemIndex !== -1) {
+ 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
- //更改路线里的
- let item = state.allMapPointInfo[state.currentItemIndex]
- state.mapRouteList.forEach((route) => {
- if (item.id === route.startingPointId) {
- route.startPointX = pointPx.x
- route.startPointY = pointPx.y
- route.beginHigh = Number(item.locationDeepPx)
- route.beginWidth = Number(item.locationWidePx)
- route.actualStartPointX = actualPoint.actualLocationX
- route.actualStartPointY = actualPoint.actualLocationY
- }
- 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
- }
- })
+ //更改路线里的
+ let item = state.allMapPointInfo[state.currentItemIndex]
+ state.mapRouteList.forEach((route) => {
+ if (item.id === route.startingPointId) {
+ route.startPointX = pointPx.x
+ route.startPointY = pointPx.y
+ route.beginHigh = Number(item.locationDeepPx)
+ route.beginWidth = Number(item.locationWidePx)
+ route.actualStartPointX = actualPoint.actualLocationX
+ route.actualStartPointY = actualPoint.actualLocationY
+ }
+ 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
+ }
+ })
- addEditHistory()
+ addEditHistory()
+ } else {
+ message.warning('未采集到该AGV点位信息')
+ }
} else {
//新增一个节点
state.allMapPointInfo.push({
@@ -2170,8 +2174,6 @@ const getMapList = async () => {
imgBgObj.area = res.area
imgBgObj.width = yamlJson.width
imgBgObj.height = yamlJson.height
- // imgBgObj.width = 1423
- // imgBgObj.height = 1406
imgBgObj.origin = yamlJson.origin
imgBgObj.resolution = yamlJson.resolution
// 调转换成png的接口
@@ -2194,6 +2196,7 @@ const getAllNodeList = async () => {
let list = await MapApi.getPositionMapItemList({
positionMapId: imgBgObj.positionMapId
})
+ console.log(imgBgObj.width)
state.allMapPointInfo = []
state.currentIndex = 0
list.forEach((item) => {