diff --git a/src/components/AgrtcRoomRobot.tsx b/src/components/AgrtcRoomRobot.tsx index adee0fb..de5704d 100644 --- a/src/components/AgrtcRoomRobot.tsx +++ b/src/components/AgrtcRoomRobot.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useRef, useState } from "react"; import AgoraRTC, { IAgoraRTCClient, IRemoteVideoTrack } from "agora-rtc-sdk-ng"; import { Badge, message } from "antd"; -const APP_ID = "875f6494d87548e783fefbf33f598c97"; -const TOKEN = "007eJxTYIjPuZr09PC0znd6+z0MMyL6ZHb68OetXW+kO1vHU2ZNtYECg4W5aZqZiaVJCpBhYpFqbmGclpqWlGZsnGZqaZFsaT6pZH5WQyAjA7e+LysjAwSC+JwMxmYlqcUlugZGDAwAbuYeJg=="; +const APP_ID = "7887b4db6033410d9ac3264b40ca9c1a"; +const TOKEN = "007eJxTYKjmeKazOKdUZ5qMsU389u45l6ruuuQlze8o+OZWHdBUHK3AYG5hYZ5kkpJkZmBsbGJokGKZmGxsZGaSZGKQnGiZbJh4dsuSrIZARoYFWw4zMTJAIIjPxWBiqFuSkVqUm5jDwAAA1JUhaw=="; export default function AgrtcRoomRobot({ CHANNEL }) { const [uid] = useState(() => Number(Math.floor(Math.random() * 100000))); const [connected, setConnected] = useState(false); diff --git a/src/components/Map.jsx b/src/components/Map.jsx index e3ddab6..1e794d0 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -335,12 +335,12 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine, polygonRef.current = null; } catch (e) { } } - if (planLineRef.current) { - try { - viewer.entities.remove(planLineRef.current); - planLineRef.current = null; - } catch (e) { } - } + //if (planLineRef.current) { + // try { + // viewer.entities.remove(planLineRef.current); + // planLineRef.current = null; + // } catch (e) { } + //} const validPoints = points?.filter(p => { diff --git a/src/components/devices/DeviceStatusPage.tsx b/src/components/devices/DeviceStatusPage.tsx index 2495b94..dd0ae33 100644 --- a/src/components/devices/DeviceStatusPage.tsx +++ b/src/components/devices/DeviceStatusPage.tsx @@ -1235,18 +1235,9 @@ export default function DeviceStatusPage() { ) ) : mowerView === 'front' ? (
- {device?.hasHost ? ( - - ) : ( - - )} + {/**/} + +
) : (
diff --git a/src/components/devices/RobotTaskPage.tsx b/src/components/devices/RobotTaskPage.tsx index a14c200..fd92911 100644 --- a/src/components/devices/RobotTaskPage.tsx +++ b/src/components/devices/RobotTaskPage.tsx @@ -312,7 +312,7 @@ export default function RobotTaskPage() { if (runningPoolTask) return; // 查找正在执行中的任务 - const runningTask = taskPoolList.find(item => ['EXECUTING', 'PAUSE'].includes(item.taskStaus)); + const runningTask = taskPoolList.find(item => ['EXECUTING', 'PAUSE', "NEW"].includes(item.taskStaus)); if (!runningTask) return; //fetchRouteDetail(runningTask?.id); @@ -339,7 +339,6 @@ export default function RobotTaskPage() { }, [devices, taskPoolList, executingRobot, runningPoolTask]); useEffect(() => { - console.log('runningPoolTask, proPoints', runningPoolTask, proPoints); if (!runningPoolTask?.id || !proPoints?.taskId) return; if (runningPoolTask?.id == proPoints?.taskId) { setPoints(proPoints?.data || []); @@ -533,7 +532,7 @@ export default function RobotTaskPage() { // 只有当任务是执行状态,并且没有连接的设备时,才自动连接 - if ((runningPoolTask.taskStaus == 'EXECUTING' || runningPoolTask.taskStaus == 'PAUSE') && !executingRobot) { + if ((runningPoolTask.taskStaus == 'EXECUTING' || runningPoolTask.taskStaus == 'PAUSE' || runningPoolTask.taskStaus == 'NEW') && !executingRobot) { const targetDevice = devices?.find(d => d.serialNumber === runningPoolTask.deviceId); if (targetDevice) { setExecute(true); @@ -622,7 +621,7 @@ export default function RobotTaskPage() { fetchTaskPoolList(); fetchTaskHistoryList(); if (isFirstConnect.current) { isFirstConnect.current = false; controllerRef.current?.connectDevice(selectedRobotForExecute); } else { controllerRef.current?.switchDevice(selectedRobotForExecute); } - setShowVideo(true); // 连接成功后自动打开视频 + //setShowVideo(true); // 连接成功后自动打开视频 } else { setExecute(false); @@ -937,7 +936,15 @@ export default function RobotTaskPage() { { title: t('devices.device'), dataIndex: 'deviceId', - width: 320, + width: 180, + }, + { + title: t('devices.taskId'), + dataIndex: 'id', + }, + { + title: t('devices.routeId'), + dataIndex: 'routeId', }, { title: t('roles.status'), diff --git a/src/locales/en/index.ts b/src/locales/en/index.ts index afc6935..dba4ad9 100644 --- a/src/locales/en/index.ts +++ b/src/locales/en/index.ts @@ -1270,6 +1270,8 @@ const en = { fixed2EquipmentFixed2NameFixed2: 'Equipment Name ', statusFixed2: '通讯 Status Fixed2', + taskId: "taskId", + routeId: "routeId", videoFixed2: ' Airport video', diff --git a/src/locales/zh/index.ts b/src/locales/zh/index.ts index 393625d..712507a 100644 --- a/src/locales/zh/index.ts +++ b/src/locales/zh/index.ts @@ -871,7 +871,7 @@ const zh = { satelliteCount: '卫星数量 {{count}}', savePathTitle: '保存路径标题', savePlan: '保存计划', - saving: '节省', + saving: '保存中...', searchDeviceName: '搜索设备名称', searchWaylinePlaceholder: '搜索航线占位', selectDevice: '选择设备', @@ -1283,6 +1283,8 @@ const zh = { statusFixed2: '通讯状态', videoFixed2: '机场视频', + taskId: "任务ID", + routeId: "路线ID", fixed2TaskSuspended2Fixed2CompletedFixed2: '任务已完成', diff --git a/src/main.tsx b/src/main.tsx index eeafc73..46d257c 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -9,10 +9,10 @@ import './index.css'; createRoot(document.getElementById('root')!).render( - - - - - , + {/**/} + + + + {/*,*/} );