From 468f1a5cf085b18adc46db12611328c981471e88 Mon Sep 17 00:00:00 2001
From: mmc <1556375442@qq.com>
Date: Thu, 14 May 2026 15:54:40 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E8=BF=98?=
=?UTF-8?q?=E5=8E=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Weather/WeatherCloudy.css | 4 +
src/components/Weather/WeatherSunny.css | 2 +
src/components/devices/WayLinePage.tsx | 528 +++++++++++++++--------
src/pages/AIAnalysis.tsx | 136 ++++--
src/pages/Home.tsx | 275 +++++++++---
5 files changed, 680 insertions(+), 265 deletions(-)
diff --git a/src/components/Weather/WeatherCloudy.css b/src/components/Weather/WeatherCloudy.css
index 8731c4f..1eeeb16 100644
--- a/src/components/Weather/WeatherCloudy.css
+++ b/src/components/Weather/WeatherCloudy.css
@@ -16,6 +16,10 @@
left: 60px;
animation: floatCloud 4s ease-in-out infinite;
}
+.weather-box{
+ width: 80px;
+ height: 80px;
+}
@keyframes floatCloud {
0%, 100% { transform: translateX(0); }
diff --git a/src/components/Weather/WeatherSunny.css b/src/components/Weather/WeatherSunny.css
index 5c2a973..7f97a6e 100644
--- a/src/components/Weather/WeatherSunny.css
+++ b/src/components/Weather/WeatherSunny.css
@@ -1,6 +1,8 @@
.weather-sunny {
text-align: center;
font-size: 18px;
+ width: 80px;
+ height: 80px;
}
.sun {
diff --git a/src/components/devices/WayLinePage.tsx b/src/components/devices/WayLinePage.tsx
index bb291aa..f67b8a9 100644
--- a/src/components/devices/WayLinePage.tsx
+++ b/src/components/devices/WayLinePage.tsx
@@ -8,46 +8,127 @@ import {
SaveOutlined, FullscreenOutlined, EnvironmentOutlined, RobotOutlined,
BranchesOutlined, CloudOutlined, ThunderboltOutlined, CheckCircleOutlined,
InfoCircleOutlined, ClockCircleOutlined, RiseOutlined, FallOutlined,
- SettingOutlined, WarningOutlined, ArrowRightOutlined, CloudSyncOutlined
+ SettingOutlined, WarningOutlined, ArrowRightOutlined, CloudSyncOutlined,
+ SearchOutlined, MoreOutlined, AimOutlined
} from '@ant-design/icons';
+import {
+ Plane,
+ Navigation,
+ Wind,
+ Thermometer,
+ Droplets,
+ Satellite,
+ LayoutGrid,
+ Clock,
+ CheckCircle2,
+ AlertCircle,
+ Zap,
+ Waves,
+ Calendar,
+ User,
+ TrendingUp,
+ GripVertical,
+ Maximize2,
+ Target
+} from 'lucide-react';
const { Text, Title } = Typography;
export default function WayLinePage() {
- const [activeMainTab, setActiveTab] = useState('wayline');
+ // 响应式字体大小
+ const fontSmall = 'clamp(10px, 0.7vw, 11px)';
+ const fontNormal = 'clamp(12px, 0.75vw, 13px)';
+ const fontTitle = 'clamp(14px, 0.85vw, 16px)';
+ const fontLarge = 'clamp(18px, 1.1vw, 24px)';
- const cardStyle = { borderRadius: 8, border: 'none', boxShadow: '0 2px 8px rgba(0,0,0,0.05)' };
+ const cardStyle = { borderRadius: 12, border: 'none', boxShadow: '0 2px 12px rgba(0,0,0,0.04)' };
- // 模拟数据
+ // 顶部统计卡片数据
const topCards = [
- { title: '今日航线计划', value: '18', unit: '条', trend: '较昨日 +2', color: '#165DFF', icon: },
- { title: '执行中任务', value: '6', unit: '个', desc: '进行中', color: '#165DFF', icon: },
- { title: '待审批任务', value: '4', unit: '个', trend: '较昨日 -1', color: '#FF7D00', icon: },
- { title: '任务完成率', value: '92', unit: '%', trend: '较昨日 +6%', color: '#00B42A', icon: },
- { title: 'AI 优化收益', value: '+7.8', unit: '%', trend: '较昨日 +1.2%', color: '#722ED1', icon: },
- { title: '覆盖装备', value: '4类 / 9台', unit: '', desc: '全部在线', color: '#165DFF', icon: },
+ {
+ title: '今日航线计划',
+ value: '18',
+ unit: '条',
+ trend: '较昨日 +2',
+ trendColor: '#00B42A',
+ icon: ,
+ color: '#165DFF',
+ bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
+ },
+ {
+ title: '执行中任务',
+ value: '6',
+ unit: '个',
+ desc: '进行中',
+ icon: ,
+ color: '#165DFF',
+ bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
+ },
+ {
+ title: '待审批任务',
+ value: '4',
+ unit: '个',
+ trend: '较昨日 -1',
+ trendColor: '#F53F3F',
+ icon: ,
+ color: '#FF7D00',
+ bg: 'linear-gradient(135deg, #FFF7E6 0%, #FFE4BA 100%)'
+ },
+ {
+ title: '任务完成率',
+ value: '92',
+ unit: '%',
+ trend: '较昨日 +6%',
+ trendColor: '#00B42A',
+ icon: ,
+ color: '#00B42A',
+ bg: 'linear-gradient(135deg, #E8FFEA 0%, #AFF0B5 100%)'
+ },
+ {
+ title: 'AI 优化收益',
+ value: '+7.8',
+ unit: '%',
+ trend: '较昨日 +1.2%',
+ trendColor: '#00B42A',
+ icon: ,
+ color: '#722ED1',
+ bg: 'linear-gradient(135deg, #F9F0FF 0%, #EFDBFF 100%)'
+ },
+ {
+ title: '覆盖装备',
+ value: '4 类 / 9 台',
+ unit: '',
+ desc: '全部在线',
+ icon: ,
+ color: '#165DFF',
+ bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
+ },
];
return (
-
-
-
+
{/* 顶部统计卡片 */}
-
+
{topCards.map((item, index) => (
-
-
-
-
+
+
+
+
{item.icon}
-
-
{item.title}
+
+
{item.title}
- {item.value}
- {item.unit}
+ {item.value}
+ {item.unit}
-
+
{item.trend || item.desc}
@@ -58,58 +139,96 @@ export default function WayLinePage() {
{/* 中间主要内容区 */}
-
+
{/* 左侧:航线编辑与路径规划 */}
-
+
航线编辑与路径规划}
+ title={航线编辑与路径规划}
extra={
-
- }>新增航线
- }>导入模板
- }>路径优化
- }>风险检查
- }>保存草稿
- } />
+
+ } style={{ borderRadius: 6 }}>新增航线
+ } style={{ borderRadius: 6 }}>导入模板
+ } style={{ borderRadius: 6 }}>路径优化
+ } style={{ borderRadius: 6 }}>风险检查
+ } style={{ borderRadius: 6 }}>保存草稿
+ } style={{ borderRadius: 6 }} />
}
bordered={false}
- bodyStyle={{ padding: 0, position: 'relative' }}
- style={{ ...cardStyle, marginBottom: "16px" }}
+ bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden' }}
+ style={{ ...cardStyle, marginBottom: 16 }}
>
- {/* 模拟地图区域 */}
-
- {/* 左侧图例 */}
-
-
-
无人机航线
-
巡检机器人路线
-
除草路线
-
清洗航线
-
-
-
< ThunderboltOutlined style={{ color: '#00B42A' }} /> 充电点
-
补水点
-
禁飞区
-
-
+ {/* 地图区域 */}
+
+ {/* SVG 航线与区域覆盖 */}
+
+
+ {/* 左侧图例 - 拟真样式 */}
+
+
+
无人机航线
+
巡检机器人路线
+
除草路线
+
清洗航线
+
+
+
充电点
+
补水点
+
+
+
- {/* 地图上的模拟标注 */}
-
-
H
-
无人机机场 A01
+ {/* 地图交互层 */}
+
-
-
高优先级巡检区 B-12
+
+
+ {/* 右下角地图缩放控制 */}
+
+
+ {/* 航点列表 */}
航点列表 航线:FL-03 (无人机热斑巡检)}
- extra={}
+ title={航点列表 航线:FL-03 (无人机热斑巡检)}
+ extra={}
bordered={false}
bodyStyle={{ padding: 0 }}
style={cardStyle}
@@ -117,7 +236,7 @@ export default function WayLinePage() {
{t} },
+ { title: '坐标/区域', dataIndex: 'coord', width: 120, ellipsis: true },
+ { title: '动作', dataIndex: 'action', width: 80, render: (a) => {a} },
+ { title: '高度(m)', dataIndex: 'height', width: 70 },
+ { title: '速度(m/s)', dataIndex: 'speed', width: 90 },
+ { title: '停留(s)', dataIndex: 'stay', width: 70 },
{ title: '备注', dataIndex: 'remark', ellipsis: true },
]}
/>
@@ -142,12 +259,12 @@ export default function WayLinePage() {
{/* 右侧:任务编排、参数与天气 */}
-
+
任务编排与 AI 建议}
+ title={任务编排与 AI 建议}
bordered={false}
- bodyStyle={{ padding: 12 }}
- style={{ ...cardStyle, marginBottom: 12 }}
+ bodyStyle={{ padding: '12px 16px' }}
+ style={{ ...cardStyle, marginBottom: 16 }}
>
{t} },
- { title: '装备', dataIndex: 'device' },
+ { title: '编号', dataIndex: 'id', width: 70, render: (t) => {t} },
+ { title: '装备', dataIndex: 'device', width: 80 },
{ title: '类型', dataIndex: 'type', ellipsis: true },
- { title: '优先级', dataIndex: 'level', render: (l) => ▲ {l} },
- { title: '建议时间', dataIndex: 'time' },
- { title: '预计时长', dataIndex: 'duration' },
- { title: '状态', dataIndex: 'status', render: (s) => {s} },
+ { title: '优先级', dataIndex: 'level', width: 80, render: (l) => ▲ {l} },
+ { title: '建议时间', dataIndex: 'time', width: 110 },
+ { title: '状态', dataIndex: 'status', width: 90, render: (s) => {s} },
]}
/>
-
-
AI 建议:
-
}>
-
推荐优先执行 FL-03 航线
-
14:00-16:00 风速最佳
-
区块 B-12 存在高温风险
-
+
+
+
AI 建议:
+
}>
+
推荐优先执行 FL-03 航线
+
14:00-16:00 风速最佳
+
区块 B-12 存在高温风险
+
+
-
-
-
-
+
+
+
+
航线参数 / 作业参数}
+ title={航线参数 / 作业参数}
extra={当前航线:FL-03}
bordered={false}
- bodyStyle={{ padding: 12 }}
- style={{ ...cardStyle, marginBottom: 12 }}
+ bodyStyle={{ padding: '16px' }}
+ style={{ ...cardStyle, marginBottom: 16 }}
>
-
+
{[
{ label: '飞行高度', value: '35', unit: 'm' },
{ label: '速度', value: '6', unit: 'm/s' },
@@ -203,150 +321,186 @@ export default function WayLinePage() {
{ label: '巡检采样频率', value: '2', unit: 'Hz' },
].map((item, idx) => (
- {item.label}
-
-
-
{item.unit}
+
{item.label}
+
+
+ {item.unit}
))}
-
-
-
- 避障开关
+
+
+
+ 避障开关
-
- 夜航限制
+
+ 夜航限制
-
+
天气窗口与执行约束}
+ title={天气窗口与执行约束}
bordered={false}
- bodyStyle={{ padding: 12 }}
+ bodyStyle={{ padding: '16px' }}
style={cardStyle}
>
-
-
-
-
适宜执行
-
-
适宜执行
+
+
+
- {[
- { label: '风速', value: '2.8 m/s', desc: '适宜', icon: , color: '#165DFF' },
- { label: '温度', value: '28℃', desc: '适宜', icon: < ThunderboltOutlined />, color: '#FF7D00' },
- { label: '降水概率', value: '10%', desc: '极低', icon: , color: '#165DFF' },
- { label: 'GNSS质量', value: '良好', desc: '适宜', icon: , color: '#00B42A' },
- ].map((item, idx) => (
-
-
-
{item.icon}
-
-
{item.label}
-
{item.value}
-
{item.desc}
-
-
-
- ))}
+
+
+ {[
+ { label: '风速', value: '2.8 m/s', desc: '适宜', icon: , color: '#165DFF' },
+ { label: '温度', value: '28℃', desc: '适宜', icon: , color: '#FF7D00' },
+ { label: '降水概率', value: '10%', desc: '极低', icon: , color: '#165DFF' },
+ { label: 'GNSS 质量', value: '良好', desc: '适宜', icon: , color: '#00B42A' },
+ ].map((item, idx) => (
+
+
+
+ {item.icon}
+
+
+
{item.label}
+
{item.value}
+
{item.desc}
+
+
+
+ ))}
+
+
-
-
16:30 后风速升高,建议提前完成任务
-
预计 14:00-16:00 为最佳执行窗口
+
+
16:30 后风速升高,建议提前完成任务
+
预计 14:00-16:00 为最佳执行窗口
{/* 底部内容区 */}
-
-
+
{/* 甘特图/排班视图 */}
-
+
任务甘特视图 / 排班视图 今日 (2025-05-24)}
- extra={}
+ title={任务甘特视图 / 排班视图 今日 (2025-05-24)}
+ extra={}
bordered={false}
- bodyStyle={{ padding: 12 }}
- style={{ ...cardStyle, height: '100%' }} // 👈 高度 100%
+ bodyStyle={{ padding: 16 }}
+ style={{ ...cardStyle, height: '100%' }}
>
-
- {/* 模拟时间轴头部 */}
-
-
+
+ {/* 时间轴头部 */}
+
+
08:0010:0012:0014:0016:0018:00
- {/* 模拟甘特条 */}
-
+ {/* 甘特条 */}
+
{[
- { label: '无人机机场 A01 (UAV-A01)', tasks: [{ start: '25%', width: '15%', title: 'FL-03 巡检', color: '#165DFF' }, { start: '70%', width: '10%', title: 'FL-07 复检', color: '#165DFF' }] },
- { label: '巡检机器人 RBT-01', tasks: [{ start: '40%', width: '15%', title: 'RB-02 巡检', color: '#FF7D00' }] },
- { label: '除草机器人 GR-01', tasks: [{ start: '10%', width: '25%', title: 'GR-04 阵列除草', color: '#00B42A' }] },
- { label: '清洗无人机 UAV-C01', tasks: [{ start: '60%', width: '20%', title: 'CL-05 组件清洗', color: '#13C2C2' }] },
+ { label: '无人机机场 A01', sub: '(UAV-A01)', tasks: [{ start: '25%', width: '18%', title: 'FL-03 热斑巡检', time: '10:00-11:20', color: '#165DFF' }, { start: '75%', width: '12%', title: 'FL-07 复检', time: '16:30-17:10', color: '#165DFF' }] },
+ { label: '巡检机器人 RBT-01', sub: '', tasks: [{ start: '45%', width: '15%', title: 'RB-02 围栏巡检', time: '11:30-12:30', color: '#FF7D00' }] },
+ { label: '除草机器人 GR-01', sub: '', tasks: [{ start: '10%', width: '22%', title: 'GR-04 阵列除草', time: '09:30-11:30', color: '#00B42A' }] },
+ { label: '清洗无人机 UAV-C01', sub: '', tasks: [{ start: '65%', width: '20%', title: 'CL-05 组件清洗', time: '14:00-16:00', color: '#13C2C2' }] },
].map((row, idx) => (
-
{row.label}
-
+
+
{row.label}
+
{row.sub}
+
+
{row.tasks.map((task, tidx) => (
-
-
{task.title}
-
10:00-11:20
+
+
{task.title}
+
{task.time}
))}
))}
- {/* 垂直当前时间红线 */}
-
+ {/* 当前时间红线 */}
+
{/* 任务看板 */}
-
+
工作任务看板}
+ title={工作任务看板}
bordered={false}
- bodyStyle={{ padding: 12 }}
- style={{ ...cardStyle, height: '100%', display: 'flex', flexDirection: 'column' }} // 👈 高度 100%
+ bodyStyle={{ padding: 16 }}
+ style={{ ...cardStyle, height: '100%' }}
>
- {/* 👈 自动撑满 */}
-
- {[
- { title: '待执行 (3)', bg: '#F7F8FA', list: [{ id: 'FL-07', name: 'AI 复检航线', device: 'UAV-A01', handler: '王工' }, { id: 'CL-05', name: '组件清洗', device: 'UAV-C01', handler: '李工' }] },
- { title: '执行中 (2)', bg: '#E8F3FF', list: [{ id: 'FL-03', name: '无人机热斑巡检', device: 'UAV-A01', handler: '王工', gain: '+8.2%' }, { id: 'GR-04', name: '阵列除草', device: 'GR-01', handler: '赵工' }] },
- { title: '已完成 (4)', bg: '#E8FFEA', list: [{ id: 'FL-01', name: '组件巡检', device: 'UAV-A01', handler: '王工', gain: '+7.1%', time: '08:20' }, { id: 'CL-01', name: '组件清洗', device: 'UAV-C01', handler: '李工', gain: '+5.9%', time: '07:45' }] },
- ].map((col, idx) => (
-
-
-
{col.title}
-
- {col.list.map((task, tidx) => (
-
-
{task.id} {task.name}
-
装备: {task.device} | 负责人: {task.handler}
- {task.gain &&
预计收益: {task.gain}
}
- {task.time &&
完成时间: {task.time}
}
-
- ))}
-
+
+ {[
+ {
+ title: '待执行', count: 3, color: '#4E5969', bg: '#F7F8FA',
+ list: [
+ { id: 'FL-07', name: 'AI 复检航线', device: 'UAV-A01', target: '区块 B-01-B-20' },
+ { id: 'CL-05', name: '组件清洗', device: 'UAV-C01', target: '区块 C-01-C-18' },
+ { id: 'RB-03', name: '围栏巡检', device: 'RBT-01', target: '围栏全线' }
+ ]
+ },
+ {
+ title: '执行中', count: 2, color: '#165DFF', bg: '#E8F3FF',
+ list: [
+ { id: 'FL-03', name: '无人机巡检', device: 'UAV-A01', target: '区块 B-01-B-20', gain: '8.2%' },
+ { id: 'GR-04', name: '阵列除草', device: 'GR-01', target: '区块 D-01-D-16', gain: '6.5%' }
+ ]
+ },
+ {
+ title: '已完成', count: 4, color: '#00B42A', bg: '#E8FFEA',
+ list: [
+ { id: 'FL-01', name: '组件巡检', device: 'UAV-A01', time: '08:20', gain: '7.1%' },
+ { id: 'CL-01', name: '组件清洗', device: 'UAV-C01', time: '07:45', gain: '5.9%' }
+ ]
+ },
+ ].map((col, idx) => (
+
+
+
+ {col.title} ({col.count})
-
- ))}
-
-
-
-
-
+
+ {col.list.map((task, tidx) => (
+
+
{task.id} {task.name}
+
+
装备: {task.device || 'UAV-A01'}
+ {task.target &&
目标: {task.target}
}
+ {task.gain &&
预计收益: ↑ {task.gain}
}
+ {task.time &&
完成时间: {task.time}
}
+
+
+ ))}
+
+
+
+ ))}
+
+
diff --git a/src/pages/AIAnalysis.tsx b/src/pages/AIAnalysis.tsx
index 6c87700..ada7e5e 100644
--- a/src/pages/AIAnalysis.tsx
+++ b/src/pages/AIAnalysis.tsx
@@ -144,19 +144,30 @@ export default function AIDiagnosisPage() {
overflow: 'hidden'
};
- // 状态标签渲染
const renderStatusTag = (status: string) => {
- const colorMap: Record
= {
- '异常': '#F53F3F',
- '正常': '#00B42A',
- '轻微': '#F7BA1E',
- };
- return {status};
+ let color = '';
+ if (status === '异常') color = '#ff4d4f';
+ else if (status === '轻微') color = '#1677ff';
+ else if (status === '正常') color = '#52c41a';
+ return {status};
};
+ // 影响程度标签渲染
const renderImpactTag = (impact: string) => {
- const colorMap: Record = { '高': '#F53F3F', '中': '#FF7D00', '低': '#00B42A' };
- return {impact};
+ let color = '';
+ if (impact === '高') color = '#ff4d4f';
+ else if (impact === '中') color = '#fa8c16';
+ else if (impact === '低') color = '#52c41a';
+ return {impact};
+ };
+
+ // 优先级标签渲染(建议措施用)
+ const renderPriorityTag = (priority: string) => {
+ let color = '';
+ if (priority === '高') color = '#ff4d4f';
+ else if (priority === '中') color = '#fa8c16';
+ else if (priority === '低') color = '#52c41a';
+ return {priority};
};
return (
@@ -488,49 +499,122 @@ export default function AIDiagnosisPage() {
bodyStyle={{ padding: 0 }}
style={{ ...cardStyle, height: '100%' }}
>
+ {/* AI诊断总结 */}
- AI 智能诊断总结
- 实时更新
+ AI 诊断总结
+ 更新时间: 2025-05-20 09:45
+
+
+ {/* AI建议与处置 */}
-
- AI 建议与智能处置
-
+
+ AI 建议与处置
{g}, width: 70 },
+ {
+ title: '建议措施',
+ dataIndex: 'measure',
+ key: 'measure',
+ ellipsis: true
+ },
+ {
+ title: '优先级',
+ dataIndex: 'priority',
+ key: 'priority',
+ render: renderPriorityTag,
+ width: 70
+ },
+ {
+ title: '预计收益',
+ dataIndex: 'gain',
+ key: 'gain',
+ render: (g) => {g},
+ width: 80
+ },
+ {
+ title: '置信度',
+ dataIndex: 'confidence',
+ key: 'confidence',
+ width: 70
+ },
{
title: '操作',
key: 'action',
- width: 80,
- render: (text, record) => (
-