接入无人机mqtt

This commit is contained in:
mmc
2026-06-01 15:18:01 +08:00
parent b72ab41b81
commit 480e05c0d6
5 changed files with 25 additions and 18 deletions

View File

@@ -100,8 +100,11 @@ export default function RobotTaskPage({ devices }) {
};
useEffect(() => {
console.log('selectedPathWork changed:', selectedPathWork);
if (JSON.parse(selectedPathWork.jsonData)?.path?.length == 0) {
utils.message.warning('该路线暂无路径点数据');
}
setPoints(selectedPathWork ? JSON.parse(selectedPathWork.jsonData)?.path || [] : []);
}, [selectedPathWork])
}, [selectedPathWork]);
// 获取路线列表
const fetchRouteList = async () => {

View File

@@ -235,6 +235,8 @@ export default class DeviceController {
}
case 'switchResult': {
console.log(msg, "msg2222222222")
this.clearControlTimeout();
this.isRequestControl = false;
@@ -270,6 +272,7 @@ export default class DeviceController {
}
case 'switchPermission': {
console.log(msg, "msg111111111111111")
const platform = (
msg.platform || ''
).toLowerCase();