页面样式还原

This commit is contained in:
mmc
2026-05-14 15:54:40 +08:00
parent adf4c37b95
commit 468f1a5cf0
5 changed files with 680 additions and 265 deletions

View File

@@ -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); }

View File

@@ -1,6 +1,8 @@
.weather-sunny {
text-align: center;
font-size: 18px;
width: 80px;
height: 80px;
}
.sun {

View File

@@ -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: <NodeIndexOutlined /> },
{ title: '执行中任务', value: '6', unit: '个', desc: '进行中', color: '#165DFF', icon: <NodeIndexOutlined /> },
{ title: '待审批任务', value: '4', unit: '个', trend: '较昨日 -1', color: '#FF7D00', icon: <SafetyCertificateOutlined /> },
{ title: '任务完成率', value: '92', unit: '%', trend: '较昨日 +6%', color: '#00B42A', icon: <CheckCircleOutlined /> },
{ title: 'AI 优化收益', value: '+7.8', unit: '%', trend: '较昨日 +1.2%', color: '#722ED1', icon: <RiseOutlined /> },
{ title: '覆盖装备', value: '4类 / 9台', unit: '', desc: '全部在线', color: '#165DFF', icon: <RobotOutlined /> },
{
title: '今日航线计划',
value: '18',
unit: '条',
trend: '较昨日 +2',
trendColor: '#00B42A',
icon: <LayoutGrid size={22} />,
color: '#165DFF',
bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
},
{
title: '执行中任务',
value: '6',
unit: '个',
desc: '进行中',
icon: <Plane size={22} />,
color: '#165DFF',
bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
},
{
title: '待审批任务',
value: '4',
unit: '个',
trend: '较昨日 -1',
trendColor: '#F53F3F',
icon: <Calendar size={22} />,
color: '#FF7D00',
bg: 'linear-gradient(135deg, #FFF7E6 0%, #FFE4BA 100%)'
},
{
title: '任务完成率',
value: '92',
unit: '%',
trend: '较昨日 +6%',
trendColor: '#00B42A',
icon: <CheckCircle2 size={22} />,
color: '#00B42A',
bg: 'linear-gradient(135deg, #E8FFEA 0%, #AFF0B5 100%)'
},
{
title: 'AI 优化收益',
value: '+7.8',
unit: '%',
trend: '较昨日 +1.2%',
trendColor: '#00B42A',
icon: <TrendingUp size={22} />,
color: '#722ED1',
bg: 'linear-gradient(135deg, #F9F0FF 0%, #EFDBFF 100%)'
},
{
title: '覆盖装备',
value: '4 类 / 9 台',
unit: '',
desc: '全部在线',
icon: <Satellite size={22} />,
color: '#165DFF',
bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
},
];
return (
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '0px 24px' }}>
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px' }}>
{/* 顶部统计卡片 */}
<Row gutter={12} style={{ marginBottom: 16 }}>
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
{topCards.map((item, index) => (
<Col span={4} key={index}>
<Card bordered={false} bodyStyle={{ padding: 16 }} style={cardStyle}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 40, height: 40, background: `${item.color}15`, borderRadius: 8, display: 'flex', justifyContent: 'center', alignItems: 'center', color: item.color, fontSize: 20 }}>
<Col xs={12} sm={8} md={4} key={index}>
<Card bordered={false} bodyStyle={{ padding: '16px 20px' }} style={cardStyle}>
<div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
<div style={{
width: 44, height: 44,
background: item.bg,
borderRadius: 12,
display: 'flex', justifyContent: 'center', alignItems: 'center',
color: item.color
}}>
{item.icon}
</div>
<div>
<div style={{ fontSize: 12, color: '#86909C' }}>{item.title}</div>
<div style={{ flex: 1 }}>
<div style={{ fontSize: fontSmall, color: '#86909C', marginBottom: 2 }}>{item.title}</div>
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>
<span style={{ fontSize: 20, fontWeight: 700, color: '#1D2129' }}>{item.value}</span>
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.unit}</span>
<span style={{ fontSize: fontLarge, fontWeight: 700, color: '#1D2129' }}>{item.value}</span>
<span style={{ fontSize: fontSmall, color: '#4E5969' }}>{item.unit}</span>
</div>
<div style={{ fontSize: 11, color: item.trend?.includes('+') ? '#00B42A' : '#F53F3F' }}>
<div style={{ fontSize: 10, color: item.trendColor || '#86909C', fontWeight: 500 }}>
{item.trend || item.desc}
</div>
</div>
@@ -58,58 +139,96 @@ export default function WayLinePage() {
</Row>
{/* 中间主要内容区 */}
<Row gutter={12} style={{ marginBottom: 16 }}>
<Row gutter={16} style={{ marginBottom: 16 }}>
{/* 左侧:航线编辑与路径规划 */}
<Col span={14}>
<Col xs={24} xl={14}>
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>航线编辑与路径规划</span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700, color: '#1D2129' }}>航线编辑与路径规划</span>}
extra={
<Space>
<Button size="small" icon={<PlusOutlined />}>新增航线</Button>
<Button size="small" icon={<ImportOutlined />}>导入模板</Button>
<Button size="small" icon={<NodeIndexOutlined />}>路径优化</Button>
<Button size="small" icon={<SafetyCertificateOutlined />}>风险检查</Button>
<Button size="small" icon={<SaveOutlined />}>保存草稿</Button>
<Button size="small" icon={<FullscreenOutlined />} />
<Space size={8}>
<Button size="small" icon={<PlusOutlined />} style={{ borderRadius: 6 }}>新增航线</Button>
<Button size="small" icon={<ImportOutlined />} style={{ borderRadius: 6 }}>导入模板</Button>
<Button size="small" icon={<NodeIndexOutlined />} style={{ borderRadius: 6 }}>路径优化</Button>
<Button size="small" icon={<SafetyCertificateOutlined />} style={{ borderRadius: 6 }}>风险检查</Button>
<Button size="small" icon={<SaveOutlined />} style={{ borderRadius: 6 }}>保存草稿</Button>
<Button size="small" icon={<Maximize2 size={14} />} style={{ borderRadius: 6 }} />
</Space>
}
bordered={false}
bodyStyle={{ padding: 0, position: 'relative' }}
style={{ ...cardStyle, marginBottom: "16px" }}
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden' }}
style={{ ...cardStyle, marginBottom: 16 }}
>
{/* 模拟地图区域 */}
<div style={{ width: '100%', height: 500, background: '#e8f3ff url(https://picsum.photos/seed/solarfarm_map/1200/800) center/cover', position: 'relative' }}>
{/* 左侧图例 */}
<div style={{ position: 'absolute', top: 16, left: 16, background: 'rgba(255,255,255,0.9)', padding: 12, borderRadius: 4, width: 140 }}>
<div style={{ fontSize: 12, display: 'flex', flexDirection: 'column', gap: 8 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 12, height: 2, background: '#165DFF' }}></span> 无人机航线</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 12, height: 2, background: '#FF7D00' }}></span> 巡检机器人路线</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 12, height: 2, background: '#00B42A' }}></span> 除草路线</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 12, height: 2, background: '#13C2C2' }}></span> 清洗航线</div>
<Divider style={{ margin: '4px 0' }} />
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><div style={{ width: 16, height: 16, background: '#165DFF', borderRadius: '50%', display: 'flex', justifyContent: 'center', alignItems: 'center', color: '#fff', fontSize: 10 }}>H</div> 无人机机场</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>< ThunderboltOutlined style={{ color: '#00B42A' }} /> 充电点</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><CloudSyncOutlined style={{ color: '#165DFF' }} /> 补水点</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><WarningOutlined style={{ color: '#F53F3F' }} /> 禁飞区</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><div style={{ width: 12, height: 12, border: '1px dashed #F53F3F' }} /> 高优先级巡检区</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><div style={{ width: 12, height: 12, background: 'rgba(255,125,0,0.3)' }} /> 障碍物区域</div>
{/* 地图区域 */}
<div style={{ width: '100%', height: 500, background: '#e8f3ff url(https://picsum.photos/seed/solar_map_v2/1600/1000) center/cover', position: 'relative' }}>
{/* SVG 航线与区域覆盖 */}
<svg style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', pointerEvents: 'none' }}>
{/* 航线 1 (蓝色) */}
<path d="M100,120 L200,80 L350,150 L500,100 L650,180" fill="none" stroke="#165DFF" strokeWidth="3" strokeDasharray="8,4" />
{/* 航线 2 (橙色) */}
<path d="M220,300 Q350,220 480,350 T700,280" fill="none" stroke="#FF7D00" strokeWidth="3" />
{/* 航线 3 (绿色) */}
<path d="M400,80 L550,140 L700,100" fill="none" stroke="#00B42A" strokeWidth="3" strokeDasharray="4,2" />
{/* 航点标记 */}
<circle cx="100" cy="120" r="6" fill="#165DFF" stroke="#fff" strokeWidth="2" />
<circle cx="200" cy="80" r="6" fill="#165DFF" stroke="#fff" strokeWidth="2" />
<circle cx="350" cy="150" r="6" fill="#165DFF" stroke="#fff" strokeWidth="2" />
{/* 区域覆盖 */}
<rect x="550" y="50" width="120" height="80" fill="rgba(245,63,63,0.2)" stroke="#F53F3F" strokeWidth="1" strokeDasharray="4,2" />
<rect x="300" y="280" width="150" height="100" fill="rgba(22,93,255,0.1)" stroke="#165DFF" strokeWidth="1" strokeDasharray="4,4" />
<path d="M100,350 L250,350 L250,450 L100,450 Z" fill="rgba(255,125,0,0.15)" stroke="#FF7D00" strokeWidth="1" />
</svg>
{/* 左侧图例 - 拟真样式 */}
<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 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 14, height: 2, background: '#165DFF', borderRadius: 1 }}></span> 无人机航线</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 14, height: 2, background: '#FF7D00', borderRadius: 1 }}></span> 巡检机器人路线</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 14, height: 2, background: '#00B42A', borderRadius: 1 }}></span> 除草路线</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><span style={{ width: 14, height: 2, background: '#13C2C2', borderRadius: 1 }}></span> 清洗航线</div>
<Divider style={{ margin: '6px 0' }} />
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<div style={{ width: 18, height: 18, background: '#165DFF', borderRadius: '50%', display: 'flex', justifyContent: 'center', alignItems: 'center', color: '#fff', fontSize: 10, fontWeight: 700 }}>H</div>
<span>无人机机场</span>
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}><Zap size={14} color="#00B42A" fill="#00B42A" /> <span>充电点</span></div>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}><Waves size={14} color="#165DFF" /> <span>补水点</span></div>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}><AlertCircle size={14} color="#F53F3F" /> <span>禁飞区</span></div>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}><div style={{ width: 14, height: 14, border: '1px dashed #F53F3F', background: 'rgba(245,63,63,0.1)' }} /> <span>高优先巡检区</span></div>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}><div style={{ width: 14, height: 14, background: 'rgba(255,125,0,0.2)', border: '1px solid #FF7D00' }} /> <span>障碍物区域</span></div>
</div>
</div>
{/* 地图上的模拟标注 */}
<div style={{ position: 'absolute', top: '20%', left: '20%', color: '#fff', textAlign: 'center' }}>
<div style={{ background: '#165DFF', borderRadius: '50%', width: 24, height: 24, display: 'inline-flex', justifyContent: 'center', alignItems: 'center' }}>H</div>
<div style={{ fontSize: 10, background: 'rgba(0,0,0,0.5)', padding: '0 4px' }}>无人机机场 A01</div>
{/* 地图交互层 */}
<div style={{ position: 'absolute', top: '22%', left: '16%', color: '#fff', textAlign: 'center' }}>
<div style={{ background: '#165DFF', borderRadius: '50%', width: 28, height: 28, display: 'flex', justifyContent: 'center', alignItems: 'center', fontSize: 12, fontWeight: 700, boxShadow: '0 0 10px rgba(22,93,255,0.6)', border: '2px solid #fff' }}>H</div>
<div style={{ fontSize: 10, background: 'rgba(29,33,41,0.8)', padding: '2px 8px', borderRadius: 4, marginTop: 4 }}>无人机机场 A01</div>
</div>
<div style={{ position: 'absolute', top: '40%', left: '50%', border: '2px dashed #F53F3F', width: 120, height: 80, display: 'flex', justifyContent: 'center', alignItems: 'center', color: '#fff' }}>
<div style={{ fontSize: 10, background: 'rgba(0,0,0,0.5)', padding: '0 4px' }}>高优先级巡检区 B-12</div>
<div style={{ position: 'absolute', top: '42%', left: '46%', textAlign: 'center' }}>
<div style={{ border: '2px dashed #F53F3F', background: 'rgba(245,63,63,0.2)', width: 140, height: 90, borderRadius: 8, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span style={{ fontSize: 11, fontWeight: 700, color: '#fff', textShadow: '0 1px 2px rgba(0,0,0,0.8)' }}>高优先级巡检区 B-12</span>
</div>
</div>
{/* 右下角地图缩放控制 */}
<div style={{ position: 'absolute', bottom: 20, right: 20, display: 'flex', flexDirection: 'column', gap: 8 }}>
<div style={{ background: '#fff', borderRadius: 8, padding: 8, display: 'flex', flexDirection: 'column', gap: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.1)' }}>
<AimOutlined style={{ fontSize: 18, color: '#4E5969', cursor: 'pointer' }} />
<Divider style={{ margin: 0 }} />
<PlusOutlined style={{ fontSize: 18, color: '#4E5969', cursor: 'pointer' }} />
<Divider style={{ margin: 0 }} />
<div style={{ width: 18, height: 2, background: '#C9CDD4' }}></div>
</div>
</div>
</div>
</Card>
{/* 航点列表 */}
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>航点列表 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>航线:FL-03 (无人机热斑巡检)</Text></span>}
extra={<PlusOutlined style={{ cursor: 'pointer' }} />}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>航点列表 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}>航线:FL-03 (无人机热斑巡检)</Text></span>}
extra={<PlusOutlined style={{ cursor: 'pointer', color: '#165DFF' }} />}
bordered={false}
bodyStyle={{ padding: 0 }}
style={cardStyle}
@@ -117,7 +236,7 @@ export default function WayLinePage() {
<Table
size="small"
pagination={false}
scroll={{ y: 240 }}
scroll={{ y: 220 }}
dataSource={[
{ key: '1', point: 'WP-01', coord: '30.32921, 120.12345', action: '起飞', height: 35, speed: 6.0, stay: 0, remark: '从机场起飞' },
{ key: '2', point: 'WP-02', coord: '区块 B-01', action: '拍摄', height: 35, speed: 6.0, stay: 2, remark: '组件可见光' },
@@ -125,16 +244,14 @@ export default function WayLinePage() {
{ key: '4', point: 'WP-04', coord: '区块 B-09', action: '悬停', height: 35, speed: 0.0, stay: 10, remark: '重点检查' },
{ key: '5', point: 'WP-05', coord: '区块 B-12', action: '热成像', height: 35, speed: 6.0, stay: 3, remark: '高优先区' },
{ key: '6', point: 'WP-06', coord: '区块 B-16', action: '拍摄', height: 35, speed: 6.0, stay: 2, remark: '组件可见光' },
{ key: '7', point: 'WP-07', coord: '区块 B-20', action: '悬停', height: 35, speed: 0.0, stay: 10, remark: '末端确认' },
{ key: '8', point: 'WP-08', coord: '30.32910, 120.12380', action: '返航', height: 35, speed: 6.0, stay: 0, remark: '返回机场' },
]}
columns={[
{ title: '航点', dataIndex: 'point', width: 60 },
{ title: '坐标/区域', dataIndex: 'coord', width: 100, ellipsis: true },
{ title: '动作', dataIndex: 'action', width: 60 },
{ title: '高度(m)', dataIndex: 'height', width: 60 },
{ title: '速度(m/s)', dataIndex: 'speed', width: 80 },
{ title: '停留(s)', dataIndex: 'stay', width: 60 },
{ title: '航点', dataIndex: 'point', width: 80, render: (t) => <Text strong>{t}</Text> },
{ title: '坐标/区域', dataIndex: 'coord', width: 120, ellipsis: true },
{ title: '动作', dataIndex: 'action', width: 80, render: (a) => <Tag color={a === '起飞' ? 'blue' : a === '悬停' ? 'orange' : 'cyan'} bordered={false} style={{ margin: 0 }}>{a}</Tag> },
{ 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() {
</Col>
{/* 右侧:任务编排、参数与天气 */}
<Col span={10}>
<Col xs={24} xl={10}>
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>任务编排与 AI 建议</span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>任务编排与 AI 建议</span>}
bordered={false}
bodyStyle={{ padding: 12 }}
style={{ ...cardStyle, marginBottom: 12 }}
bodyStyle={{ padding: '12px 16px' }}
style={{ ...cardStyle, marginBottom: 16 }}
>
<Table
size="small"
@@ -160,38 +277,39 @@ export default function WayLinePage() {
{ key: '5', id: 'FL-07', device: 'UAV-A01', type: 'AI 复检航线', level: '低', time: '16:30 - 17:10', duration: '0h40m', status: '待审批' },
]}
columns={[
{ title: '任务编号', dataIndex: 'id', width: 80, render: (t) => <Text style={{ color: '#165DFF' }}>{t}</Text> },
{ title: '装备', dataIndex: 'device' },
{ title: '编号', dataIndex: 'id', width: 70, render: (t) => <Text style={{ color: '#165DFF', fontWeight: 600 }}>{t}</Text> },
{ title: '装备', dataIndex: 'device', width: 80 },
{ title: '类型', dataIndex: 'type', ellipsis: true },
{ title: '优先级', dataIndex: 'level', render: (l) => <span style={{ color: l === '高' ? '#F53F3F' : l === '中' ? '#FF7D00' : '#86909C' }}>▲ {l}</span> },
{ title: '建议时间', dataIndex: 'time' },
{ title: '预计时长', dataIndex: 'duration' },
{ title: '状态', dataIndex: 'status', render: (s) => <Text style={{ color: s.includes('建议') ? '#165DFF' : '#86909C' }}>{s}</Text> },
{ title: '优先级', dataIndex: 'level', width: 80, render: (l) => <span style={{ color: l === '高' ? '#F53F3F' : l === '中' ? '#FF7D00' : '#86909C', fontSize: 11, fontWeight: 600 }}>▲ {l}</span> },
{ title: '建议时间', dataIndex: 'time', width: 110 },
{ title: '状态', dataIndex: 'status', width: 90, render: (s) => <Text style={{ color: s.includes('建议') ? '#165DFF' : '#86909C', fontSize: 11, fontWeight: 500 }}>{s}</Text> },
]}
/>
<div style={{ background: '#F2F3F5', padding: '8px 12px', borderRadius: 4, marginTop: 12, display: 'flex', gap: 12, fontSize: 12 }}>
<span style={{ fontWeight: 700 }}>AI 建议:</span>
<Space split={<Divider type="vertical" />}>
<span><CheckCircleOutlined style={{ color: '#165DFF' }} /> 推荐优先执行 FL-03 航线</span>
<span><ClockCircleOutlined style={{ color: '#165DFF' }} /> 14:00-16:00 风速最佳</span>
<span><WarningOutlined style={{ color: '#FF7D00' }} /> 区块 B-12 存在高温风险</span>
</Space>
<div style={{ background: '#F8F9FB', padding: '10px 14px', borderRadius: 8, marginTop: 14, border: '1px solid #F1F2F5' }}>
<div style={{ display: 'flex', gap: 12, fontSize: fontSmall, alignItems: 'center' }}>
<span style={{ fontWeight: 700, color: '#1D2129' }}>AI 建议:</span>
<Space split={<Divider type="vertical" style={{ margin: 0 }} />}>
<Space size={4}><CheckCircle2 size={13} color="#165DFF" /> <span>推荐优先执行 FL-03 航线</span></Space>
<Space size={4}><Clock size={13} color="#165DFF" /> <span>14:00-16:00 风速最佳</span></Space>
<Space size={4}><AlertCircle size={13} color="#FF7D00" /> <span>区块 B-12 存在高温风险</span></Space>
</Space>
</div>
</div>
<Row gutter={12} style={{ marginTop: 12 }}>
<Col span={8}><Button type="primary" block style={{ background: '#165DFF' }}>一键排程</Button></Col>
<Col span={8}><Button type="primary" block style={{ background: '#165DFF' }}>智能分配</Button></Col>
<Col span={8}><Button type="primary" block style={{ background: '#165DFF' }}>生成工单</Button></Col>
<Row gutter={12} style={{ marginTop: 16 }}>
<Col span={8}><Button type="primary" block style={{ background: '#165DFF', height: 36, borderRadius: 18, fontWeight: 600 }}>一键排程</Button></Col>
<Col span={8}><Button type="primary" block style={{ background: '#165DFF', height: 36, borderRadius: 18, fontWeight: 600 }}>智能分配</Button></Col>
<Col span={8}><Button type="primary" block style={{ background: '#165DFF', height: 36, borderRadius: 18, fontWeight: 600 }}>生成工单</Button></Col>
</Row>
</Card>
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>航线参数 / 作业参数</span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>航线参数 / 作业参数</span>}
extra={<Text type="secondary" style={{ fontSize: 12 }}>当前航线:FL-03</Text>}
bordered={false}
bodyStyle={{ padding: 12 }}
style={{ ...cardStyle, marginBottom: 12 }}
bodyStyle={{ padding: '16px' }}
style={{ ...cardStyle, marginBottom: 16 }}
>
<Row gutter={[24, 12]}>
<Row gutter={[24, 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) => (
<Col span={6} key={idx}>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>{item.label}</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<Input size="small" defaultValue={item.value} style={{ width: 40, height: 22, padding: '0 4px', fontSize: 12 }} />
<span style={{ fontSize: 11 }}>{item.unit}</span>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 6 }}>{item.label}</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<Input size="small" defaultValue={item.value} style={{ width: '100%', height: 26, borderRadius: 4, textAlign: 'center', fontWeight: 600 }} />
<span style={{ fontSize: 11, color: '#4E5969' }}>{item.unit}</span>
</div>
</Col>
))}
</Row>
<Divider style={{ margin: '12px 0' }} />
<Space size="large">
<Space>
<span style={{ fontSize: 12 }}>避障开关</span>
<Divider style={{ margin: '16px 0' }} />
<div style={{ display: 'flex', gap: 32 }}>
<Space size={8}>
<span style={{ fontSize: fontNormal, color: '#4E5969' }}>避障开关</span>
<Switch size="small" defaultChecked />
</Space>
<Space>
<span style={{ fontSize: 12 }}>夜航限制</span>
<Space size={8}>
<span style={{ fontSize: fontNormal, color: '#4E5969' }}>夜航限制</span>
<Switch size="small" />
</Space>
</Space>
</div>
</Card>
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>天气窗口与执行约束</span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>天气窗口与执行约束</span>}
bordered={false}
bodyStyle={{ padding: 12 }}
bodyStyle={{ padding: '16px' }}
style={cardStyle}
>
<Row gutter={12} align="middle">
<Col span={5}>
<div style={{ textAlign: 'center', background: '#F6FFED', padding: '8px 4px', borderRadius: 4, border: '1px solid #B7EB8F' }}>
<div style={{ fontSize: 11, color: '#52C41A', fontWeight: 700 }}>适宜执行</div>
<div style={{ width: 16, height: 16, background: '#52C41A', borderRadius: '50%', margin: '4px auto', display: 'flex', justifyContent: 'center', alignItems: 'center', color: '#fff', fontSize: 10 }}><CheckCircleOutlined /></div>
<div style={{ fontSize: 10, color: '#86909C' }}>适宜执行</div>
<Row gutter={16} align="middle">
<Col span={6}>
<div style={{ textAlign: 'center', background: '#F6FFED', padding: '12px 8px', borderRadius: 10, border: '1px solid #B7EB8F' }}>
<div style={{ fontSize: 11, color: '#52C41A', fontWeight: 700, marginBottom: 8 }}>适宜执行</div>
<CheckCircle2 size={24} color="#52C41A" style={{ margin: '0 auto 8px' }} />
<div style={{ fontSize: 10, color: '#86909C' }}>适宜航行</div>
</div>
</Col>
{[
{ label: '风速', value: '2.8 m/s', desc: '适宜', icon: <CloudSyncOutlined />, color: '#165DFF' },
{ label: '温度', value: '28℃', desc: '适宜', icon: < ThunderboltOutlined />, color: '#FF7D00' },
{ label: '降水概率', value: '10%', desc: '极低', icon: <CloudOutlined />, color: '#165DFF' },
{ label: 'GNSS质量', value: '良好', desc: '适宜', icon: <EnvironmentOutlined />, color: '#00B42A' },
].map((item, idx) => (
<Col span={4.5} key={idx} style={{ flex: 1 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
<div style={{ color: item.color, fontSize: 16 }}>{item.icon}</div>
<div>
<div style={{ fontSize: 10, color: '#86909C' }}>{item.label}</div>
<div style={{ fontSize: 12, fontWeight: 700 }}>{item.value}</div>
<div style={{ fontSize: 10, color: '#86909C' }}>{item.desc}</div>
</div>
</div>
</Col>
))}
<Col span={18}>
<Row gutter={[16, 16]}>
{[
{ label: '风速', value: '2.8 m/s', desc: '适宜', icon: <Wind size={16} />, color: '#165DFF' },
{ label: '温度', value: '28℃', desc: '适宜', icon: <Thermometer size={16} />, color: '#FF7D00' },
{ label: '降水概率', value: '10%', desc: '极低', icon: <Droplets size={16} />, color: '#165DFF' },
{ label: 'GNSS 质量', value: '良好', desc: '适宜', icon: <Satellite size={16} />, color: '#00B42A' },
].map((item, idx) => (
<Col span={12} key={idx}>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<div style={{ width: 32, height: 32, borderRadius: 8, background: '#F7F8FA', display: 'flex', justifyContent: 'center', alignItems: 'center', color: item.color }}>
{item.icon}
</div>
<div>
<div style={{ fontSize: 10, color: '#86909C' }}>{item.label}</div>
<div style={{ fontSize: fontNormal, fontWeight: 700, color: '#1D2129' }}>{item.value}</div>
<div style={{ fontSize: 10, color: '#52C41A', fontWeight: 500 }}>{item.desc}</div>
</div>
</div>
</Col>
))}
</Row>
</Col>
</Row>
<div style={{ marginTop: 12, display: 'flex', justifyContent: 'space-between', fontSize: 11, color: '#86909C' }}>
<span><InfoCircleOutlined style={{ color: '#FF7D00' }} /> 16:30 后风速升高,建议提前完成任务</span>
<span><ClockCircleOutlined style={{ color: '#165DFF' }} /> 预计 14:00-16:00 为最佳执行窗口</span>
<div style={{ marginTop: 16, display: 'flex', flexDirection: 'column', gap: 6, fontSize: 11, color: '#86909C', borderTop: '1px solid #F1F2F5', paddingTop: 12 }}>
<Space size={6}><AlertCircle size={14} color="#FF7D00" /> <span>16:30 后风速升高,建议提前完成任务</span></Space>
<Space size={6}><Clock size={14} color="#165DFF" /> <span>预计 14:00-16:00 为最佳执行窗口</span></Space>
</div>
</Card>
</Col>
</Row>
{/* 底部内容区 */}
<Row gutter={12}>
<Row gutter={16}>
{/* 甘特图/排班视图 */}
<Col span={14}>
<Col xs={24} xl={14}>
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>任务甘特视图 / 排班视图 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>今日 (2025-05-24)</Text></span>}
extra={<SettingOutlined style={{ cursor: 'pointer' }} />}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>任务甘特视图 / 排班视图 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}>今日 (2025-05-24)</Text></span>}
extra={<MoreOutlined style={{ cursor: 'pointer', fontSize: 18 }} />}
bordered={false}
bodyStyle={{ padding: 12 }}
style={{ ...cardStyle, height: '100%' }} // 👈 高度 100%
bodyStyle={{ padding: 16 }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ height: 260, position: 'relative', border: '1px solid #F2F3F5', borderRadius: 4, padding: 8 }}>
{/* 模拟时间轴头部 */}
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 10, color: '#86909C', borderBottom: '1px solid #F2F3F5', paddingBottom: 4 }}>
<div style={{ width: 100 }}></div>
<div style={{ position: 'relative', border: '1px solid #F2F3F5', borderRadius: 8, padding: '16px 12px' }}>
{/* 时间轴头部 */}
<div style={{ display: 'flex', fontSize: 10, color: '#86909C', borderBottom: '1px solid #F2F3F5', paddingBottom: 10, textAlign: 'center' }}>
<div style={{ width: 140 }}></div>
<div style={{ flex: 1, display: 'flex', justifyContent: 'space-around' }}>
<span>08:00</span><span>10:00</span><span>12:00</span><span>14:00</span><span>16:00</span><span>18:00</span>
</div>
</div>
{/* 模拟甘特条 */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 12, marginTop: 12 }}>
{/* 甘特条 */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 16, marginTop: 16 }}>
{[
{ 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) => (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 100, fontSize: 10, color: '#4E5969' }}>{row.label}</div>
<div style={{ flex: 1, height: 32, background: '#F7F8FA', borderRadius: 4, position: 'relative' }}>
<div style={{ width: 140, paddingRight: 12 }}>
<div style={{ fontSize: 11, fontWeight: 600, color: '#1D2129' }}>{row.label}</div>
<div style={{ fontSize: 10, color: '#86909C' }}>{row.sub}</div>
</div>
<div style={{ flex: 1, height: 40, background: '#F7F8FA', borderRadius: 6, position: 'relative' }}>
{row.tasks.map((task, tidx) => (
<div key={tidx} style={{ position: 'absolute', left: task.start, width: task.width, height: '100%', background: task.color, opacity: 0.8, borderRadius: 4, color: '#fff', fontSize: 9, padding: '2px 4px', display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
<div>{task.title}</div>
<div>10:00-11:20</div>
<div key={tidx} style={{
position: 'absolute', left: task.start, width: task.width, height: '100%',
background: task.color, borderRadius: 6, color: '#fff',
padding: '4px 8px', display: 'flex', flexDirection: 'column', justifyContent: 'center',
boxShadow: '0 2px 6px rgba(0,0,0,0.1)', zIndex: 2
}}>
<div style={{ fontSize: 10, fontWeight: 700, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{task.title}</div>
<div style={{ fontSize: 9, opacity: 0.9 }}>{task.time}</div>
</div>
))}
</div>
</div>
))}
</div>
{/* 垂直当前时间红线 */}
<div style={{ position: 'absolute', left: '35%', top: 0, bottom: 0, width: 1, background: '#F53F3F', zIndex: 1 }} />
{/* 当前时间红线 */}
<div style={{ position: 'absolute', left: '38%', top: 0, bottom: 0, width: 2, background: '#F53F3F', zIndex: 1, opacity: 0.6 }}>
<div style={{ width: 6, height: 6, borderRadius: '50%', background: '#F53F3F', position: 'absolute', top: -3, left: -2 }} />
</div>
</div>
</Card>
</Col>
{/* 任务看板 */}
<Col span={10}>
<Col xs={24} xl={10}>
<Card
title={<span style={{ fontSize: 14, fontWeight: 700 }}>工作任务看板</span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>工作任务看板</span>}
bordered={false}
bodyStyle={{ padding: 12 }}
style={{ ...cardStyle, height: '100%', display: 'flex', flexDirection: 'column' }} // 👈 高度 100%
bodyStyle={{ padding: 16 }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ flex: 1, display: 'flex', flexDirection: 'column' }}> {/* 👈 自动撑满 */}
<Row gutter={8}>
{[
{ 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 span={8} key={idx}>
<div style={{ background: col.bg, borderRadius: 4, padding: 8, height: '100%', minHeight: 260 }}>
<div style={{ fontSize: 12, fontWeight: 700, marginBottom: 8 }}>{col.title}</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
{col.list.map((task, tidx) => (
<div key={tidx} style={{ background: '#fff', borderRadius: 4, padding: 8, boxShadow: '0 1px 2px rgba(0,0,0,0.05)' }}>
<div style={{ fontSize: 11, fontWeight: 700, color: '#165DFF' }}>{task.id} {task.name}</div>
<div style={{ fontSize: 10, color: '#86909C', marginTop: 4 }}>装备: {task.device} | 负责人: {task.handler}</div>
{task.gain && <div style={{ fontSize: 10, color: '#00B42A', marginTop: 4 }}>预计收益: {task.gain}</div>}
{task.time && <div style={{ fontSize: 10, color: '#86909C', marginTop: 2 }}>完成时间: {task.time}</div>}
</div>
))}
</div>
<Row gutter={10}>
{[
{
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 span={8} key={idx}>
<div style={{ background: col.bg, borderRadius: 10, padding: 10, height: '100%', minHeight: 280 }}>
<div style={{ fontSize: 12, fontWeight: 700, marginBottom: 12, display: 'flex', justifyContent: 'space-between', color: col.color }}>
<span>{col.title} ({col.count})</span>
</div>
</Col>
))}
</Row>
</div>
<div style={{ textAlign: 'right', marginTop: 8 }}>
<Button type="link" size="small">查看全部 <ArrowRightOutlined /></Button>
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
{col.list.map((task, tidx) => (
<div key={tidx} style={{ background: '#fff', borderRadius: 8, padding: 10, boxShadow: '0 2px 4px rgba(0,0,0,0.04)', border: '1px solid #F1F2F5' }}>
<div style={{ fontSize: 11, fontWeight: 700, color: '#165DFF', marginBottom: 6 }}>{task.id} {task.name}</div>
<div style={{ fontSize: 10, color: '#86909C' }}>
<div style={{ marginBottom: 2 }}>装备: {task.device || 'UAV-A01'}</div>
{task.target && <div style={{ marginBottom: 2 }}>目标: {task.target}</div>}
{task.gain && <div style={{ color: '#00B42A', fontWeight: 600 }}>预计收益: ↑ {task.gain}</div>}
{task.time && <div style={{ marginTop: 2 }}>完成时间: {task.time}</div>}
</div>
</div>
))}
</div>
</div>
</Col>
))}
</Row>
<div style={{ textAlign: 'center', marginTop: 12 }}>
<Button type="link" size="small" style={{ fontSize: 12, color: '#86909C' }}>查看全部 <ArrowRightOutlined style={{ fontSize: 10 }} /></Button>
</div>
</Card>
</Col>