feat: 加载机器人

This commit is contained in:
zhanghao 2026-08-06 11:21:51 +08:00
parent 2715d02c22
commit 2ae34b1f9f
2 changed files with 6 additions and 3 deletions

View File

@ -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 {

View File

@ -112,7 +112,7 @@ const getRobot = async () => {
if (res.code === 200) {
robotList.value = res.rows
getRobot()
// getRobot()
}
}