页面显示定位质量等数据,接收到结束信号并显示机器人下发任务 执行 暂停恢复成功 控制地图是否绘制实时轨迹
This commit is contained in:
@@ -786,7 +786,7 @@ export default function WayLinePage({ onRefresh }) {
|
||||
// 任务状态更新逻辑
|
||||
const updateTaskStatus = async (taskId: string, status: string) => {
|
||||
if (!taskId) {
|
||||
utils.message.warning('请先选择航线任务');
|
||||
utils.message.warning('请先选择任务');
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
@@ -863,7 +863,7 @@ 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 realtimePosition={realtimePosition}
|
||||
<CesiumMap realtimePosition={realtimePosition} drawRealTime={true}
|
||||
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 }}>
|
||||
@@ -1070,16 +1070,18 @@ export default function WayLinePage({ onRefresh }) {
|
||||
type="primary"
|
||||
icon={<Play size={16} />}
|
||||
onClick={() => {
|
||||
if (selectedTask?.status === 'suspended') {
|
||||
updateTaskStatus(selectedTask?.uuid, 'restored');
|
||||
} else {
|
||||
updateTaskStatus(selectedTask?.uuid, 'executing');
|
||||
}
|
||||
//if (selectedTask?.status === 'suspended') {
|
||||
updateTaskStatus(selectedTask?.uuid, 'restored');
|
||||
//}
|
||||
//else {
|
||||
// updateTaskStatus(selectedTask?.uuid, 'executing');
|
||||
//}
|
||||
}}
|
||||
loading={loading}
|
||||
style={{ background: '#165DFF', height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
|
||||
>
|
||||
{selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'}
|
||||
恢复任务
|
||||
{/*{selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'}*/}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user