优化一加载 显示的地图内容

This commit is contained in:
mmc
2026-08-28 15:26:38 +08:00
parent 0ec7b3ea88
commit 674721504d
3 changed files with 9 additions and 5 deletions

7
env.js
View File

@@ -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"
},

View File

@@ -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";

View File

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