From 0b514dbace4804dea9a0ab34bc5e8af21e5babf3 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Mon, 11 May 2026 08:43:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=E7=A9=BA=E7=AB=B9=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.css | 7 ++ src/pages/Devices.tsx | 280 ++++++++++++++++++++++++++++++++---------- 2 files changed, 222 insertions(+), 65 deletions(-) diff --git a/src/index.css b/src/index.css index 04a824e..dca89de 100644 --- a/src/index.css +++ b/src/index.css @@ -48,6 +48,13 @@ opacity: 1; font-weight: 800; } +.ant-card-head{ + min-height:44px !important +} +.ant-card-body{ + padding-top:12px !important; + +} @keyframes sunRotate { diff --git a/src/pages/Devices.tsx b/src/pages/Devices.tsx index decbac8..fefc658 100644 --- a/src/pages/Devices.tsx +++ b/src/pages/Devices.tsx @@ -181,30 +181,30 @@ export default function EquipmentCooperationPage() { - {/* 装备调度列表 */} - 装备调度列表} bordered={false} style={{ borderRadius: 12, marginBottom: 16 }}> - {s} }, - { title: '模式', dataIndex: 'mode', width: 80 }, - { title: '电量', dataIndex: 'battery', width: 80, render: (v) => }, - { title: '位置', dataIndex: 'position', width: 100 }, - { title: '当前任务', dataIndex: 'task', width: 120 }, - { title: '通讯状态', dataIndex: 'comm', width: 80, render: (v) => }, - { title: '操作', key: 'action', width: 100, render: () => + 装备调度列表} bordered={false} style={{ borderRadius: 12, marginBottom: 16 }}> +
{s} }, + { title: '模式', dataIndex: 'mode', width: 80 }, + { title: '电量', dataIndex: 'battery', width: 80, render: (v) => }, + { title: '位置', dataIndex: 'position', width: 100 }, + { title: '当前任务', dataIndex: 'task', width: 120 }, + { title: '通讯状态', dataIndex: 'comm', width: 80, render: (v) => }, + { title: '操作', key: 'action', width: 100, render: () => 任务执行时间线} bordered={false} style={{ borderRadius: 12 }} extra={
今天 2025-05-24
}> @@ -218,35 +218,10 @@ export default function EquipmentCooperationPage() {
- - 环境与飞行条件} bordered={false} style={{ borderRadius: 12 }}> - -
风速
2.6 m/s 轻风
-
温度
28.7℃ 适宜
-
辐照度
812 W/m² 较高
-
降雨概率
10% 低
-
GNSS状态
正常 定位稳定
- -
禁飞状态
-
-
未禁飞
- -
- - -
-
- -
-
适宜执行
-
可正常开展作业
-
-
- -
- - + + + {/* 右侧:设备控制面板 */} @@ -567,22 +542,197 @@ export default function EquipmentCooperationPage() { + 环境与飞行条件} + bordered={false} + style={{ borderRadius: 12, marginBottom: 16 }} + bodyStyle={{ paddingBottom: "12px" }} + > +
+ {/* 左边六个数据项,统一加外边框和右边框分隔线 */} +
+ {/* 风速 */} +
+
风速
+
2.6 m/s
+
轻风
+
+ {/* 温度 */} +
+
温度
+
28.7℃
+
适宜
+
+ {/* 辐照度 */} +
+
辐照度
+
812W/m²
+
较高
+
+ {/* 降雨概率 */} +
+
降雨概率
+
10%
+
低
+
+ {/* GNSS状态 */} +
+
GNSS状态
+
正常
+
定位稳定
+
+ {/* 禁飞状态 */} +
+
禁飞状态
+
未禁飞
+
可执行
+
+
+ + {/* 右侧“适宜执行”卡片,保留边框 */} +
+
适宜执行
+
+ +
+
可正常开展作业
+
+
+
{/* 控制日志/告警记录 */} - 控制日志 / 告警记录} bordered={false} style={{ borderRadius: 12 }} extra={}> -
- {logs.map((log, idx) => ( -
-
-
{log.time}
-
- {log.type} -
{log.device} - {log.desc}
-
-
- {log.level && {log.level}} -
- ))} + 控制日志 / 告警记录} + bordered={false} + style={{ borderRadius: 12 }} + extra={ +
+ +
+ } + > +
{text} + }, + { + title: '设备', + dataIndex: 'device', + width: 120, + render: (text) => {text} + }, + { + title: '类型', + dataIndex: 'type', + width: 80, + render: (text) => { + let color = '#52c41a'; + if (text === '告警') color = '#fa8c16'; + if (text === '事件') color = '#1890ff'; + return ( +
+ + {text} +
+ ); + } + }, + { + title: '描述', + dataIndex: 'desc', + render: (text) => {text} + }, + { + title: '', + width: 80, + render: (_, record) => record.level ? ( + + {record.level} + + ) : null + } + ]} + /> +
+