diff --git a/env.js b/env.js index 5ab24ea..244a22c 100644 --- a/env.js +++ b/env.js @@ -41,10 +41,13 @@ const envConfig = { //mqtt_url: "ws://1.95.137.212:8083/mqtt", //geoserver_url: "http://1.95.137.212:59018/geoserver" + baseURL: 'http://1.95.137.212:59003',//http://192.168.2.56:8081 + WS_URL: 'ws://1.95.137.212:59005/ws/', - baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081 + + //baseURL: 'http://1.95.137.212:8081',//http://192.168.2.56:8081 //baseURL: 'https://serviceri.satabot.com', - WS_URL: 'ws://1.95.137.212:9002/ws/', + //WS_URL: 'ws://1.95.137.212:9002/ws/', mqtt_url: "ws://1.95.137.212:8083/mqtt", geoserver_url: "http://1.95.137.212:7900/geoserver" }, diff --git a/src/components/Map.jsx b/src/components/Map.jsx index 33ad77f..32f3fce 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -640,7 +640,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine, !isNaN(Number(realtimePosition.lon)) && !isNaN(Number(realtimePosition.lat)); - const hasTrack = points && points.length > 0; + const hasTrack = (points && points.length > 0) || polyPoints?.length > 0; if (hasRealtime) return "realtime"; if (hasTrack) return "track"; diff --git a/src/components/devices/RobotTaskPage.tsx b/src/components/devices/RobotTaskPage.tsx index 556ec6e..80d594a 100644 --- a/src/components/devices/RobotTaskPage.tsx +++ b/src/components/devices/RobotTaskPage.tsx @@ -178,7 +178,8 @@ export default function RobotTaskPage() { } catch (err) { console.error('解析任务路径数据失败:', err); } - setPoints(pathPoints); + setRouteMode('coverage') + setPolyPoints(pathPoints); } } catch (err) { console.error('获取任务路径失败:', err); @@ -554,7 +555,7 @@ export default function RobotTaskPage() { setSelectedRobotForExecute(null); // 调用接口检查是否有路径点 - const res = await getSingleRouteList({ id: route.id }); + const res = await getSingleRouteList({ id: route?.id }); let hasPathPoints = false; if (res?.code === 200 && res?.data) {