diff --git a/src/components/devices/DroneVideoPlayer.tsx b/src/components/devices/DroneVideoPlayer.tsx index 8dccd51..08f3c45 100644 --- a/src/components/devices/DroneVideoPlayer.tsx +++ b/src/components/devices/DroneVideoPlayer.tsx @@ -47,7 +47,7 @@ const DroneVideoPlayer: React.FC = ({ switchingLock.current = true; setLoading(true); try { - const cameraIndex = device.gateway_camera_list[0]?.camera_index || ""; // 目前先默认用第一个摄像头 + const cameraIndex = device?.gateway_camera_list[0]?.camera_index || ""; // 目前先默认用第一个摄像头 if (!cameraIndex) { setStreamData(null); utils.message.warning(`未找到${cameraPosition === 'indoor' ? '室内' : '室外'}摄像头配置`); diff --git a/src/components/devices/WayLinePage.tsx b/src/components/devices/WayLinePage.tsx index 30cf379..495a392 100644 --- a/src/components/devices/WayLinePage.tsx +++ b/src/components/devices/WayLinePage.tsx @@ -387,6 +387,9 @@ export default function WayLinePage({ planedevices }) { pagination={false} scroll={{ y: 'auto', maxHeight: 260 }} style={{ height: '100%' }} + rowClassName={(record) => + selectedTask?.uuid === record.uuid ? 'table-row-highlight' : '' + } onRow={(record) => ({ onClick: () => handleRowClick(record), style: { cursor: 'pointer' } diff --git a/src/index.css b/src/index.css index 124a25e..83db8c5 100644 --- a/src/index.css +++ b/src/index.css @@ -128,6 +128,14 @@ h4, .ant-typography h4 { font-size: clamp(1rem, 1.5vw, 1.25rem) !important; } padding: 2px 4px !important; /* 减小表格边距 */ } +.table-row-highlight > td { + background-color: #e6f4ff !important; +} + +.table-row-highlight .ant-table-cell-fix-left, +.table-row-highlight .ant-table-cell-fix-right { + background-color: #e6f4ff !important; +}