From 2ae34b1f9ffd5826da6d0e83829502bde33ab237 Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Thu, 6 Aug 2026 11:21:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A0=E8=BD=BD=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/cockpit/components/MapCanvas.vue | 7 +++++-- src/views/inspection/cockpit/components/MapOverview.vue | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/inspection/cockpit/components/MapCanvas.vue b/src/views/inspection/cockpit/components/MapCanvas.vue index 3d15dfc..38bc2bc 100644 --- a/src/views/inspection/cockpit/components/MapCanvas.vue +++ b/src/views/inspection/cockpit/components/MapCanvas.vue @@ -350,9 +350,12 @@ const centerCanvasView = () => { } const loadSourceMap = async () => { + const connectedRobot = props.robotList.find(item => item.connectStatus == 1); + if (!connectedRobot) return; + const res = await getMapJson({ - robotId: props.robotList[0].id, - mapName: props.robotList[0].robotMapName + robotId: connectedRobot.id, + mapName: connectedRobot.robotMapName }); if (res.code === 200) { try { diff --git a/src/views/inspection/cockpit/components/MapOverview.vue b/src/views/inspection/cockpit/components/MapOverview.vue index f99b580..4ba008f 100644 --- a/src/views/inspection/cockpit/components/MapOverview.vue +++ b/src/views/inspection/cockpit/components/MapOverview.vue @@ -112,7 +112,7 @@ const getRobot = async () => { if (res.code === 200) { robotList.value = res.rows - getRobot() + // getRobot() } }