航线任务参数 模块完成
This commit is contained in:
@@ -675,23 +675,36 @@ export default function WayLinePage({ planedevices }) {
|
|||||||
|
|
||||||
<Card
|
<Card
|
||||||
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>航线参数 / 作业参数</span>}
|
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>航线参数 / 作业参数</span>}
|
||||||
extra={<Text type="secondary" style={{ fontSize: 12 }}>当前航线:FL-03</Text>}
|
extra={<Text type="secondary" style={{ fontSize: 12 }}>当前航线:{selectedTask?.name || '-'}</Text>}
|
||||||
bordered={false}
|
bordered={false}
|
||||||
bodyStyle={{ padding: '16px' }}
|
bodyStyle={{ padding: '16px' }}
|
||||||
style={{ ...cardStyle, marginBottom: 8 }}
|
style={{ ...cardStyle, marginBottom: 8 }}
|
||||||
>
|
>
|
||||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '8px', marginBottom: 8 }}>
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '8px', marginBottom: 8 }}>
|
||||||
{[
|
{[
|
||||||
{ label: '飞行高度', value: taskDetail.rth_altitude, unit: 'm' },
|
{ label: '飞行高度', value: taskDetail?.rth_altitude ?? '-', unit: 'm' },
|
||||||
{ label: '速度', value: '6', unit: 'm/s' },
|
{ label: '返航模式', value: taskDetail?.rth_mode === 'preset' ? '预设' : taskDetail?.rth_mode === 'optimal' ? '智能' : '-', unit: '' },
|
||||||
{ label: '航向重叠', value: '75', unit: '%' },
|
{ label: '航线精度', value: taskDetail?.wayline_precision_type === 'gps' ? 'GPS' : taskDetail?.wayline_precision_type === 'rtk' ? 'RTK' : '-', unit: '' },
|
||||||
{ label: '旁向重叠', value: '65', unit: '%' },
|
{ label: '断点续飞', value: taskDetail?.resumable_status === 'auto' ? '自动' : taskDetail?.resumable_status === 'manual' ? '手动' : '-', unit: '' },
|
||||||
|
{ label: '安全返航电量', value: taskDetail?.min_battery_capacity ?? '-', unit: '%' },
|
||||||
{
|
{
|
||||||
label: '安全返航电量', value: taskDetail.min_battery_capacity, unit: '%'
|
label: '任务类型', value:
|
||||||
|
taskDetail?.task_type === 'immediate' ? '立即任务' :
|
||||||
|
taskDetail?.task_type === 'timed' ? '定时任务' :
|
||||||
|
taskDetail?.task_type === 'recurring' ? '重复任务' :
|
||||||
|
taskDetail?.task_type === 'continuous' ? '连续任务' : '-',
|
||||||
|
unit: ''
|
||||||
},
|
},
|
||||||
{ label: '清洗喷洒量', value: '120', unit: 'ml/㎡' },
|
{
|
||||||
{ label: '除草宽幅', value: '1.2', unit: 'm' },
|
label: '重复类型', value:
|
||||||
{ label: '任务类型', value: taskDetail.task_type, unit: '' },
|
taskDetail?.repeat_type === 'nonrepeating' ? '不重复' :
|
||||||
|
taskDetail?.repeat_type === 'daily' ? '每天' :
|
||||||
|
taskDetail?.repeat_type === 'weekly' ? '每周' :
|
||||||
|
taskDetail?.repeat_type === 'absolute_monthly' ? '按月(日期)' :
|
||||||
|
taskDetail?.repeat_type === 'relative_monthly' ? '按月(星期)' : '-',
|
||||||
|
unit: ''
|
||||||
|
},
|
||||||
|
{ label: '失控动作', value: taskDetail?.out_of_control_action_in_flight === 'return_home' ? '返航' : '-', unit: '' },
|
||||||
].map((item, idx) => (
|
].map((item, idx) => (
|
||||||
<div
|
<div
|
||||||
key={idx}
|
key={idx}
|
||||||
@@ -706,7 +719,7 @@ export default function WayLinePage({ planedevices }) {
|
|||||||
>
|
>
|
||||||
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
|
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
|
||||||
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>
|
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>
|
||||||
<span style={{ fontSize: 16, fontWeight: 700, color: '#1D2129' }}>{item.value}</span>
|
<span style={{ fontSize: 14, fontWeight: 600, color: '#1D2129' }}>{item.value}</span>
|
||||||
<span style={{ fontSize: 11, color: '#86909C' }}>{item.unit}</span>
|
<span style={{ fontSize: 11, color: '#86909C' }}>{item.unit}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -732,7 +745,6 @@ export default function WayLinePage({ planedevices }) {
|
|||||||
icon={<Square size={16} />}
|
icon={<Square size={16} />}
|
||||||
onClick={() => updateTaskStatus(selectedTask?.uuid, 'suspended')}
|
onClick={() => updateTaskStatus(selectedTask?.uuid, 'suspended')}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
// 统一样式:高度36 + 圆角18 + 字重600 + 图标文字居中
|
|
||||||
style={{ height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
|
style={{ height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
|
||||||
>
|
>
|
||||||
挂起任务
|
挂起任务
|
||||||
@@ -749,7 +761,6 @@ export default function WayLinePage({ planedevices }) {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
// 统一样式:主色#165DFF + 高度36 + 圆角18 + 字重600
|
|
||||||
style={{ background: '#165DFF', height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
|
style={{ background: '#165DFF', height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }}
|
||||||
>
|
>
|
||||||
{selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'}
|
{selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'}
|
||||||
|
|||||||
Reference in New Issue
Block a user