feat: 加载机器人
This commit is contained in:
parent
2715d02c22
commit
2ae34b1f9f
@ -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 {
|
||||
|
||||
@ -112,7 +112,7 @@ const getRobot = async () => {
|
||||
|
||||
if (res.code === 200) {
|
||||
robotList.value = res.rows
|
||||
getRobot()
|
||||
// getRobot()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user