From 3fc6dd23520ee17f0cc63a89dc188595cc1177cf Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 27 May 2026 13:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=88=AA=E7=BA=BF=E4=BB=BB=E5=8A=A1=E5=8F=82?= =?UTF-8?q?=E6=95=B0=20=20=20=E6=A8=A1=E5=9D=97=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/devices/WayLinePage.tsx | 35 +++++++++++++++++--------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/components/devices/WayLinePage.tsx b/src/components/devices/WayLinePage.tsx index 4010218..7245eb8 100644 --- a/src/components/devices/WayLinePage.tsx +++ b/src/components/devices/WayLinePage.tsx @@ -675,23 +675,36 @@ export default function WayLinePage({ planedevices }) { 航线参数 / 作业参数} - extra={当前航线:FL-03} + extra={当前航线:{selectedTask?.name || '-'}} bordered={false} bodyStyle={{ padding: '16px' }} style={{ ...cardStyle, marginBottom: 8 }} >
{[ - { label: '飞行高度', value: taskDetail.rth_altitude, unit: 'm' }, - { label: '速度', value: '6', unit: 'm/s' }, - { label: '航向重叠', value: '75', unit: '%' }, - { label: '旁向重叠', value: '65', unit: '%' }, + { label: '飞行高度', value: taskDetail?.rth_altitude ?? '-', unit: 'm' }, + { label: '返航模式', value: taskDetail?.rth_mode === 'preset' ? '预设' : taskDetail?.rth_mode === 'optimal' ? '智能' : '-', unit: '' }, + { label: '航线精度', value: taskDetail?.wayline_precision_type === 'gps' ? 'GPS' : taskDetail?.wayline_precision_type === 'rtk' ? 'RTK' : '-', 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: taskDetail.task_type, unit: '' }, + { + label: '重复类型', value: + 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) => (
{item.label}
- {item.value} + {item.value} {item.unit}
@@ -732,7 +745,6 @@ export default function WayLinePage({ planedevices }) { icon={} onClick={() => updateTaskStatus(selectedTask?.uuid, 'suspended')} loading={loading} - // 统一样式:高度36 + 圆角18 + 字重600 + 图标文字居中 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} - // 统一样式:主色#165DFF + 高度36 + 圆角18 + 字重600 style={{ background: '#165DFF', height: 28, borderRadius: 18, fontWeight: 600, display: 'inline-flex', alignItems: 'center', gap: 4 }} > {selectedTask?.status === 'suspended' ? '继续任务' : '执行任务'}