优化一些 周六的内容
This commit is contained in:
@@ -1235,18 +1235,9 @@ export default function DeviceStatusPage() {
|
||||
)
|
||||
) : mowerView === 'front' ? (
|
||||
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
|
||||
{device?.hasHost ? (
|
||||
<AgrtcRoomRobot CHANNEL={device?.serialNumber || ''} />
|
||||
) : (
|
||||
<VideoPlayer
|
||||
deviceId={device?.serialNumber}
|
||||
idx={1}
|
||||
className="w-full h-full object-contain"
|
||||
video={robotVideo}
|
||||
error={error}
|
||||
ready={ready}
|
||||
/>
|
||||
)}
|
||||
{/*<AgrtcRoomRobot CHANNEL={device?.serialNumber || ''} />*/}
|
||||
<AgrtcRoomRobot CHANNEL={"41-thermal"} />
|
||||
|
||||
</div>
|
||||
) : (
|
||||
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user