航线任务 无人机实时轨迹优化显示 优化websocket优化 设备状态界面显示
This commit is contained in:
@@ -556,6 +556,16 @@ export default function WayLinePage({ onRefresh }) {
|
||||
useEffect(() => {
|
||||
getBoardTask();
|
||||
}, [boardDrone, boardDateRange, planedevices?.length]);
|
||||
const realtimePosition = React.useMemo(() => {
|
||||
|
||||
if (persistentDroneData?.longitude && persistentDroneData?.latitude) {
|
||||
return {
|
||||
lon: persistentDroneData.longitude,
|
||||
lat: persistentDroneData.latitude,
|
||||
heading: persistentDroneData.heading || 0,
|
||||
};
|
||||
}
|
||||
}, [persistentDroneData]);
|
||||
|
||||
// 任务状态标签
|
||||
const getStatusTag = (status) => {
|
||||
@@ -634,6 +644,7 @@ export default function WayLinePage({ onRefresh }) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 执行航线按钮点击(改为图标)
|
||||
const handleExecuteClick = (e, wayline) => {
|
||||
e.stopPropagation();
|
||||
@@ -852,7 +863,8 @@ export default function WayLinePage({ onRefresh }) {
|
||||
style={{ ...cardStyle, marginBottom: 10 }}
|
||||
>
|
||||
<div style={{ width: '100%', height: 420, background: '#e8f3ff url(https://picsum.photos/seed/solar_map_v2/1600/1000) center/cover', position: 'relative' }}>
|
||||
<CesiumMap devices={planedevices} points={points} focusLocation={focusLocation} from="device-control" />
|
||||
<CesiumMap realtimePosition={realtimePosition}
|
||||
points={points} focusLocation={focusLocation} from="device-control" realtimeType='plane' />
|
||||
<div style={{ position: 'absolute', top: 16, left: 16, background: 'rgba(255,255,255,0.92)', backdropFilter: 'blur(8px)', padding: '14px 16px', borderRadius: 10, width: 150, boxShadow: '0 4px 12px rgba(0,0,0,0.1)' }}>
|
||||
<div style={{ fontSize: fontSmall, display: 'flex', flexDirection: 'column', gap: 10 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 14, height: 2, background: '#165DFF' }}></span> 无人机航线</div>
|
||||
|
||||
Reference in New Issue
Block a user