Files
web-Iot/src/pages/CleanOptimization.tsx

592 lines
26 KiB
TypeScript
Raw Normal View History

2026-05-07 22:04:27 +08:00
import React, { useState } from 'react';
import {
Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker,
2026-05-14 12:44:18 +08:00
Divider, Progress, Badge, Select, Tooltip, Avatar
2026-05-07 22:04:27 +08:00
} from 'antd';
import {
2026-05-11 12:40:31 +08:00
ReloadOutlined, PlusOutlined, ArrowUpOutlined, ArrowDownOutlined,
CheckCircleOutlined, CloudOutlined, SunOutlined, MoneyCollectOutlined,
CalendarOutlined, DropOutlined, DownloadOutlined, InfoCircleOutlined,
EnvironmentOutlined, RocketOutlined, UserOutlined, WindOutlined,
2026-05-14 12:44:18 +08:00
PercentageOutlined, GlobalOutlined, AimOutlined, FilterOutlined,
FullscreenOutlined, ZoomInOutlined, ZoomOutOutlined
2026-05-07 22:04:27 +08:00
} from '@ant-design/icons';
2026-05-14 12:44:18 +08:00
import { Line, Pie, Column, DualAxes } from '@ant-design/charts';
2026-05-11 12:40:31 +08:00
import {
Droplets,
Zap,
TrendingUp,
Calendar,
DollarSign,
LayoutGrid,
ChevronRight,
Bot,
User,
CloudRain,
Thermometer,
Wind,
2026-05-14 12:44:18 +08:00
Info,
ShieldCheck,
Leaf
2026-05-11 12:40:31 +08:00
} from 'lucide-react';
2026-05-14 15:15:50 +08:00
import { UniversalBarChart, UniversalLineChart, UniversalPieChart } from '../components/recharts';
2026-05-07 22:04:27 +08:00
const { Title, Text } = Typography;
2026-05-11 12:40:31 +08:00
const { RangePicker } = DatePicker;
const { Option } = Select;
2026-05-07 22:04:27 +08:00
// 模拟数据
const smartCleanPlanData = [
2026-05-11 12:40:31 +08:00
{ id: '计划 01', priority: '高', area: '区块 15, 01', boost: '4,250 kWh', weather: '88%' },
{ id: '计划 02', priority: '高', area: '区块 02, 11', boost: '3,180 kWh', weather: '85%' },
{ id: '计划 03', priority: '中', area: '区块 05, 12', boost: '2,210 kWh', weather: '80%' },
{ id: '计划 04', priority: '中', area: '区块 07, 03', boost: '1,620 kWh', weather: '78%' },
{ id: '计划 05', priority: '低', area: '区块 17, 13', boost: '1,210 kWh', weather: '82%' },
2026-05-07 22:04:27 +08:00
];
const workOrderPreviewData = [
2026-05-11 12:40:31 +08:00
{ area: '区块 15', priority: '高', duration: '4.0 h', handler: '李工', planTime: '2025-05-26 - 05-27', status: '待创建' },
{ area: '区块 01', priority: '高', duration: '3.5 h', handler: '李工', planTime: '2025-05-26 - 05-27', status: '待创建' },
{ area: '区块 02', priority: '高', duration: '2.8 h', handler: '王工', planTime: '2025-05-28 - 05-29', status: '待创建' },
{ area: '区块 11', priority: '高', duration: '2.6 h', handler: '王工', planTime: '2025-05-28 - 05-29', status: '待创建' },
{ area: '区块 05', priority: '中', duration: '2.2 h', handler: '赵工', planTime: '2025-05-29 - 05-30', status: '待创建' },
];
2026-05-14 15:15:50 +08:00
const pollutionLineData = [
{ date: '05-18', pollution: 78, threshold: 75 },
{ date: '05-19', pollution: 72, threshold: 75 },
{ date: '05-20', pollution: 65, threshold: 75 },
{ date: '05-21', pollution: 75, threshold: 75 },
{ date: '05-22', pollution: 68, threshold: 75 },
{ date: '05-23', pollution: 60, threshold: 75 },
{ date: '05-24', pollution: 68.5, threshold: 75 },
2026-05-07 22:04:27 +08:00
];
2026-05-14 15:15:50 +08:00
const pieChartData = [
{ name: '灰尘积累', value: 6120, color: '#165DFF' },
{ name: '鸟粪遮挡', value: 1480, color: '#F53F3F' },
{ name: '沙尘沉积', value: 1120, color: '#F7BA1E' },
{ name: '其他', value: 600, color: '#86909C' },
2026-05-11 12:40:31 +08:00
];
2026-05-07 22:04:27 +08:00
2026-05-14 12:44:18 +08:00
const dualAxesData = [
[
{ date: 'D-7', value: 800, type: '清洗前发电量' },
{ date: 'D-7', value: 1200, type: '清洗后发电量' },
{ date: 'D-6', value: 850, type: '清洗前发电量' },
{ date: 'D-6', value: 1250, type: '清洗后发电量' },
{ date: 'D-5', value: 900, type: '清洗前发电量' },
{ date: 'D-5', value: 1300, type: '清洗后发电量' },
{ date: 'D-4', value: 880, type: '清洗前发电量' },
{ date: 'D-4', value: 1280, type: '清洗后发电量' },
{ date: 'D-3', value: 920, type: '清洗前发电量' },
{ date: 'D-3', value: 1320, type: '清洗后发电量' },
{ date: 'D-2', value: 950, type: '清洗前发电量' },
{ date: 'D-2', value: 1350, type: '清洗后发电量' },
{ date: 'D-1', value: 980, type: '清洗前发电量' },
{ date: 'D-1', value: 1380, type: '清洗后发电量' },
],
[
{ date: 'D-7', rate: 35 },
{ date: 'D-6', rate: 32 },
{ date: 'D-5', rate: 30 },
{ date: 'D-4', rate: 28 },
{ date: 'D-3', rate: 31 },
{ date: 'D-2', rate: 29 },
{ date: 'D-1', rate: 33 },
],
];
2026-05-14 15:15:50 +08:00
const compareChartData = [
{ date: 'D-7', before: 800, after: 1200 },
{ date: 'D-6', before: 850, after: 1250 },
{ date: 'D-5', before: 900, after: 1300 },
{ date: 'D-4', before: 880, after: 1280 },
{ date: 'D-3', before: 920, after: 1320 },
{ date: 'D-2', before: 950, after: 1350 },
{ date: 'D-1', before: 980, after: 1380 },
2026-05-11 12:40:31 +08:00
];
2026-05-07 22:04:27 +08:00
export default function CleanOptimizationPage() {
2026-05-14 12:44:18 +08:00
const cardStyle = {
borderRadius: 12,
border: '1px solid #f0f0f0',
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
overflow: 'hidden'
};
2026-05-07 22:04:27 +08:00
const renderPriorityTag = (priority: string) => {
2026-05-11 12:40:31 +08:00
const config: Record<string, any> = {
'高': { color: '#ff4d4f', bg: '#fff1f0' },
'中': { color: '#faad14', bg: '#fff7e6' },
'低': { color: '#52c41a', bg: '#f6ffed' },
};
2026-05-14 12:44:18 +08:00
return <Tag color={config[priority]?.bg} style={{ color: config[priority]?.color, border: `1px solid ${config[priority]?.color}`, margin: 0, borderRadius: 4 }}>{priority}</Tag>;
2026-05-07 22:04:27 +08:00
};
return (
2026-05-15 15:39:28 +08:00
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '12px 0px', boxSizing: 'border-box' }}>
2026-05-14 12:44:18 +08:00
<style>
{`
.compact-table .ant-table-thead > tr > th {
background: #f8fafc;
padding: 8px 12px !important;
font-size: 12px;
color: #4E5969;
}
.compact-table .ant-table-tbody > tr > td {
padding: 8px 12px !important;
font-size: 12px;
}
.map-block {
transition: all 0.3s;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.map-block:hover {
transform: scale(1.05);
box-shadow: 0 8px 16px rgba(0,0,0,0.3);
z-index: 10;
}
`}
</style>
2026-05-15 15:39:28 +08:00
2026-05-14 09:37:15 +08:00
<Row
2026-05-14 17:23:12 +08:00
gutter={[8, 8]}
2026-05-14 09:37:15 +08:00
style={{
marginBottom: 16,
flexWrap: 'wrap',
}}
>
{[
{
title: '污染指数',
value: '68.5',
unit: '',
tag: '中等',
tagColor: '#52c41a',
trend: '较昨日 ▼ 5.3',
trendColor: '#ff4d4f',
icon: <SunOutlined />,
color: '#faad14',
bg: '#fff7e6'
},
{
title: '建议清洗区块数',
value: '8 / 20',
unit: '',
trend: '占比 40%',
icon: <LayoutGrid />,
color: '#1890ff',
bg: '#e6f7ff'
},
{
title: '预计发电提升',
value: '12,850',
unit: 'kWh',
trend: '占当前日发电量 14.2%',
icon: <TrendingUp />,
color: '#1890ff',
bg: '#f0f5ff'
},
{
title: '预计收益提升',
value: '¥ 7,286',
unit: '',
trend: '按电价 0.568 元/kWh 计算',
icon: <DollarSign />,
color: '#faad14',
bg: '#fff7e6'
},
{
title: '上次清洗时间',
value: '2025-05-12',
unit: '',
trend: '距今 12 天',
icon: <Calendar />,
color: '#1890ff',
bg: '#f0f5ff'
},
{
title: '清洗成本预估',
value: '¥ 3,200',
unit: '',
trend: '预计单次清洗总成本',
icon: <Droplets />,
color: '#1890ff',
bg: '#e6f7ff'
},
].map((item, index) => (
2026-05-14 17:23:12 +08:00
<Col key={index} style={{ minWidth: '168px', flex: '1 0 auto', maxWidth: "250px" }}>
2026-05-14 09:37:15 +08:00
<Card
bordered={false}
bodyStyle={{ padding: '16px' }}
style={{ borderRadius: 8, height: 120 }}
>
<div style={{ display: 'flex', justifyContent: 'space-between', height: '100%' }}>
<div style={{ display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
<div style={{ fontSize: 13, color: '#86909C', marginBottom: 4 }}>{item.title}</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, marginBottom: 4 }}>
<div style={{ fontSize: 24, fontWeight: 700, color: item.color }}>
{item.value}
</div>
{item.unit && (
<span style={{ fontSize: 14, color: '#4E5969' }}>{item.unit}</span>
)}
{item.tag && (
<Tag
color={item.tagColor}
style={{
borderRadius: 10,
margin: 0,
padding: '0 8px',
fontSize: 12
}}
>
{item.tag}
</Tag>
)}
</div>
<div style={{ fontSize: 12, color: item.trendColor || '#86909C' }}>
{item.trend}
</div>
2026-05-07 22:04:27 +08:00
</div>
2026-05-14 09:37:15 +08:00
<div style={{
width: 40,
height: 40,
borderRadius: '50%',
background: item.bg,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0
}}>
{React.cloneElement(item.icon, { style: { fontSize: 20, color: item.color } })}
2026-05-11 12:40:31 +08:00
</div>
</div>
2026-05-14 09:37:15 +08:00
</Card>
</Col>
))}
2026-05-07 22:04:27 +08:00
</Row>
2026-05-14 12:44:18 +08:00
{/* 标题与操作栏 */}
2026-05-14 17:23:12 +08:00
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
2026-05-14 12:44:18 +08:00
<Space size={8}>
2026-05-15 15:39:28 +08:00
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', }}>清洗优化管理</Typography.Title>
2026-05-14 12:44:18 +08:00
<InfoCircleOutlined style={{ color: '#86909C' }} />
</Space>
2026-05-11 12:40:31 +08:00
<Space>
2026-05-14 12:44:18 +08:00
<Text type="secondary" style={{ fontSize: 12 }}><ReloadOutlined /> 更新时间:2025-05-24 09:30</Text>
<Button icon={<ReloadOutlined />}>刷新数据</Button>
<Select defaultValue="7d" style={{ width: 110 }}>
<Option value="7d">最近 7 天</Option>
<Option value="30d">最近 30 天</Option>
2026-05-11 12:40:31 +08:00
</Select>
<Button type="primary" icon={<DownloadOutlined />}>导出报告</Button>
</Space>
</div>
2026-05-14 17:23:12 +08:00
<Row gutter={[8, 8]} style={{ display: 'flex', alignItems: 'stretch' }}>
2026-05-14 12:44:18 +08:00
{/* 左侧:分析图表 */}
2026-05-14 17:23:12 +08:00
<Col xs={24} xl={6} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>污染趋势分析</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
<span>污染指数</span>
<Space size={12}>
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 8, background: '#165DFF', marginRight: 4 }}></div>污染指数</span>
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 2, borderBottom: '1px dashed #F53F3F', marginRight: 4 }}></div>阈值</span>
</Space>
</div>
2026-05-14 15:15:50 +08:00
<UniversalLineChart
data={pollutionLineData}
xKey="date"
height={180}
dot
series={[
{
key: 'pollution',
name: '污染指数',
color: '#1890ff',
strokeWidth: 3,
},
{
key: 'threshold',
name: '阈值',
color: '#ff4d4f',
dashed: true,
strokeWidth: 2,
},
]}
2026-05-11 12:40:31 +08:00
/>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>发电损失构成 <Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>(近 7 天)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
2026-05-14 15:15:50 +08:00
<div style={{ position: 'relative', height: "100%" }}>
<UniversalPieChart
data={pieChartData}
height={220}
innerRadius={50}
outerRadius={80}
showLabel={false}
2026-05-07 22:04:27 +08:00
/>
2026-05-14 12:44:18 +08:00
<div style={{ position: 'absolute', left: '30%', top: '50%', transform: 'translate(-50%, -50%)', textAlign: 'center' }}>
<div style={{ fontSize: 10, color: '#86909C' }}>总损失电量</div>
<div style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>9,320</div>
<div style={{ fontSize: 10, color: '#86909C' }}>kWh</div>
2026-05-07 22:04:27 +08:00
</div>
</div>
</Card>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗前后对比分析 <Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>(近一次)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
2026-05-14 15:15:50 +08:00
<UniversalBarChart
data={compareChartData}
xKey="date"
height={220}
barSize={18}
series={[
{
key: 'before',
name: '清洗前发电量(kWh)',
color: '#1890ff',
},
{
key: 'after',
name: '清洗后发电量(kWh)',
color: '#52c41a',
},
]}
2026-05-11 12:40:31 +08:00
/>
</Card>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗收益深度测算</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计发电提升</div>
<div style={{ fontSize: 15, fontWeight: 800 }}>12,850 <span style={{ fontSize: 11, fontWeight: 400 }}>kWh</span></div>
2026-05-11 12:40:31 +08:00
</Col>
2026-05-14 12:44:18 +08:00
<Col span={12}>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>电价 (含税)</div>
<div style={{ fontSize: 15, fontWeight: 800 }}>0.568 <span style={{ fontSize: 11, fontWeight: 400 }}>元/kWh</span></div>
2026-05-11 12:40:31 +08:00
</Col>
2026-05-14 12:44:18 +08:00
<Col span={12}>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计净收益</div>
<div style={{ fontSize: 15, fontWeight: 800, color: '#00B42A' }}>7,286 <span style={{ fontSize: 11, fontWeight: 400 }}>元</span></div>
2026-05-11 12:40:31 +08:00
</Col>
2026-05-14 12:44:18 +08:00
<Col span={12}>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>ROI (投资回报)</div>
<div style={{ fontSize: 20, fontWeight: 800, color: '#00B42A' }}>227%</div>
2026-05-11 12:40:31 +08:00
</Col>
</Row>
2026-05-14 12:44:18 +08:00
<Divider style={{ margin: '16px 0' }} />
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', background: '#f8fafc', padding: '10px 16px', borderRadius: 8 }}>
<span style={{ fontSize: 12, color: '#86909C' }}>回收周期</span>
<span style={{ fontSize: 18, fontWeight: 800 }}>0.44 <Text style={{ fontSize: 12 }}>天</Text></span>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
2026-05-14 12:44:18 +08:00
{/* 中间:地图分布与工单预览 */}
2026-05-14 17:23:12 +08:00
<Col xs={24} xl={11} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
2026-05-07 22:04:27 +08:00
<Card
2026-05-14 12:44:18 +08:00
title={<span style={{ fontSize: 15, fontWeight: 700 }}>电站污染分布与建议清洗区块分布图</span>}
2026-05-07 22:04:27 +08:00
bordered={false}
2026-05-14 16:25:10 +08:00
style={{ ...cardStyle, }}
2026-05-14 12:44:18 +08:00
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }}
2026-05-07 22:04:27 +08:00
>
2026-05-14 12:44:18 +08:00
<div style={{ background: '#f8fafc', padding: '10px 20px', display: 'flex', justifyContent: 'space-between', borderBottom: '1px solid #f0f0f0', flexWrap: 'wrap', gap: 8 }}>
<Space size={16} wrap style={{ fontSize: 11 }}>
<span style={{ color: '#86909C' }}>污染等级:</span>
<Badge color="#F53F3F" text="优先清洗 (>75)" />
<Badge color="#FF7D00" text="较高 (50-75)" />
<Badge color="#F7BA1E" text="中等 (25-50)" />
<Badge color="#D1FF6B" text="较低 (10-25)" />
<Badge color="#00B42A" text="清洁 (<10)" />
2026-05-11 12:40:31 +08:00
</Space>
</div>
2026-05-07 22:04:27 +08:00
2026-05-14 12:44:18 +08:00
{/* 地图背景图与浮动标签 */}
2026-05-14 17:23:12 +08:00
<div style={{ position: 'relative', width: '100%', height: '100%', background: '#e5e6eb' }}>
2026-05-14 12:44:18 +08:00
<img src="https://images.unsplash.com/photo-1509391366360-2e959784a276?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
2026-05-07 22:04:27 +08:00
2026-05-14 12:44:18 +08:00
{/* 模拟区块叠加层 */}
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', background: 'rgba(0,0,0,0.1)' }} />
2026-05-07 22:04:27 +08:00
2026-05-14 12:44:18 +08:00
{/* 具体的污染区块标签 */}
{[
{ id: '01', score: '82.3', top: '25%', left: '30%', color: '#F53F3F' },
{ id: '02', score: '76.8', top: '20%', left: '45%', color: '#F53F3F' },
{ id: '03', score: '63.2', top: '22%', left: '60%', color: '#FF7D00' },
{ id: '08', score: '19.7', top: '28%', left: '75%', color: '#00B42A' },
{ id: '04', score: '33.6', top: '45%', left: '20%', color: '#F7BA1E' },
{ id: '05', score: '68.7', top: '42%', left: '38%', color: '#F53F3F' },
{ id: '15', score: '82.9', top: '48%', left: '55%', color: '#F53F3F' },
{ id: '19', score: '44.4', top: '55%', left: '65%', color: '#F7BA1E' },
{ id: '11', score: '44.8', top: '65%', left: '42%', color: '#F7BA1E' },
{ id: '13', score: '28.6', top: '75%', left: '30%', color: '#F7BA1E' },
{ id: '19', score: '24.5', top: '78%', left: '50%', color: '#D1FF6B' },
{ id: '20', score: '17.8', top: '85%', left: '40%', color: '#00B42A' },
].map(block => (
<div key={block.id} className="map-block" style={{ position: 'absolute', top: block.top, left: block.left, background: block.color, color: '#fff', padding: '4px 10px', borderRadius: 6, border: '1.5px solid #fff', textAlign: 'center', minWidth: 60 }}>
<div style={{ fontSize: 9, opacity: 0.9 }}>区块 {block.id}</div>
<div style={{ fontSize: 13, fontWeight: 800 }}>{block.score}</div>
</div>
))}
{/* 右侧悬浮控制按钮 */}
<div style={{ position: 'absolute', top: 20, right: 20, display: 'flex', flexDirection: 'column', gap: 10 }}>
<Button icon={<AimOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
<Button icon={<FilterOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
<Button icon={<ZoomInOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
<Button icon={<ZoomOutOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
<Button icon={<ReloadOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
2026-05-07 22:04:27 +08:00
</div>
</div>
</Card>
<Card
2026-05-14 12:44:18 +08:00
title={<span style={{ fontSize: 15, fontWeight: 700 }}>清洗工单智能预览</span>}
extra={<Button type="link" size="small">查看更多 <ChevronRight size={14} /></Button>}
2026-05-07 22:04:27 +08:00
bordered={false}
2026-05-14 12:44:18 +08:00
style={cardStyle}
2026-05-11 12:40:31 +08:00
bodyStyle={{ padding: 0 }}
2026-05-07 22:04:27 +08:00
>
2026-05-11 12:40:31 +08:00
<Table
columns={[
2026-05-14 12:44:18 +08:00
{ title: '区块', dataIndex: 'area', key: 'area' },
{ title: '优先级', dataIndex: 'priority', key: 'priority', render: renderPriorityTag },
{ title: '预计工时', dataIndex: 'duration', key: 'duration' },
{ title: '负责人', dataIndex: 'handler', key: 'handler' },
{ title: '计划时间', dataIndex: 'planTime', key: 'planTime' },
{ title: '状态', dataIndex: 'status', key: 'status', render: (s) => <Tag color="blue" variant="outline" style={{ borderRadius: 4 }}>{s}</Tag> },
{ title: '操作', key: 'action', render: () => <Button type="primary" size="small" style={{ borderRadius: 4 }}>创建工单</Button> },
2026-05-11 12:40:31 +08:00
]}
dataSource={workOrderPreviewData}
pagination={false}
size="small"
2026-05-14 12:44:18 +08:00
className="compact-table"
2026-05-11 12:40:31 +08:00
/>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-11 12:40:31 +08:00
</Col>
2026-05-14 12:44:18 +08:00
{/* 右侧:决策建议与参考 */}
2026-05-14 17:23:12 +08:00
<Col xs={24} xl={7} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>智能清洗策略建议</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}>
<div style={{ background: '#f8fafc', padding: '8px 16px', borderBottom: '1px solid #f0f0f0' }}>
<Text type="secondary" style={{ fontSize: 11 }}>算法模型:多因子加权综合优化模型 (v2.0)</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<Table
columns={[
2026-05-14 12:44:18 +08:00
{ title: '推荐计划', dataIndex: 'id', key: 'id', width: 85 },
{ title: '优先级', dataIndex: 'priority', key: 'priority', render: (p) => <span style={{ color: p === '高' ? '#F53F3F' : '#F7BA1E', fontWeight: 600 }}>{p}</span>, width: 65 },
{ title: '建议区块', dataIndex: 'area', key: 'area' },
{ title: '预计提升', dataIndex: 'boost', key: 'boost', render: (b) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{b}</span> },
{ title: '天气适宜度', dataIndex: 'weather', key: 'weather', render: (w) => <Space size={4}>{w} <SunOutlined style={{ color: '#F7BA1E' }} /></Space> },
2026-05-11 12:40:31 +08:00
]}
dataSource={smartCleanPlanData}
pagination={false}
size="small"
2026-05-14 12:44:18 +08:00
className="compact-table"
2026-05-11 12:40:31 +08:00
/>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗技术方案推荐</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
2026-05-11 12:40:31 +08:00
<Row gutter={12}>
<Col span={12}>
2026-05-14 12:44:18 +08:00
<div style={{ background: '#F9F0FF', borderRadius: 12, padding: 16, border: '1px solid #D3ADF7', height: '100%' }}>
<Space align="center" style={{ marginBottom: 12 }}>
<div style={{ width: 32, height: 32, background: '#722ED1', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><Bot size={18} color="#fff" /></div>
<Text strong style={{ fontSize: 13, color: '#391085' }}>智能机器人方案</Text>
</Space>
<div style={{ fontSize: 11, color: '#531DAB', marginBottom: 12, lineHeight: 1.5 }}>全自动清洗,适合大面积平整区块,效率极高。</div>
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11 }}>
<span style={{ color: '#8c8c8c' }}>预计用水:</span>
<Text strong>18 吨</Text>
2026-05-11 12:40:31 +08:00
</div>
</div>
</Col>
<Col span={12}>
2026-05-14 12:44:18 +08:00
<div style={{ background: '#E6F7FF', borderRadius: 12, padding: 16, border: '1px solid #91D5FF', height: '100%' }}>
<Space align="center" style={{ marginBottom: 12 }}>
<div style={{ width: 32, height: 32, background: '#1890FF', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><User size={18} color="#fff" /></div>
<Text strong style={{ fontSize: 13, color: '#003A8C' }}>人工精细化方案</Text>
</Space>
<div style={{ fontSize: 11, color: '#0050B3', marginBottom: 12, lineHeight: 1.5 }}>灵活处理遮挡及严重污垢区域,适合复杂地形。</div>
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11 }}>
<span style={{ color: '#8c8c8c' }}>预计用水:</span>
<Text strong>32 吨</Text>
2026-05-11 12:40:31 +08:00
</div>
</div>
</Col>
</Row>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>天气与资源环境参考 <Text type="secondary" style={{ fontSize: 12, fontWeight: 400 }}>(计划 01)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Row gutter={12}>
2026-05-11 12:40:31 +08:00
<Col span={8}>
2026-05-14 12:44:18 +08:00
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
<div style={{ fontSize: 11, color: '#86909C' }}>05-26 (周一)</div>
<SunOutlined style={{ fontSize: 24, color: '#F7BA1E', margin: '8px 0' }} />
<div style={{ fontSize: 12, fontWeight: 700 }}>多云 18~28℃</div>
2026-05-11 12:40:31 +08:00
</div>
</Col>
<Col span={8}>
2026-05-14 12:44:18 +08:00
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
<div style={{ fontSize: 11, color: '#86909C' }}>05-27 (周二)</div>
<SunOutlined style={{ fontSize: 24, color: '#F7BA1E', margin: '8px 0' }} />
<div style={{ fontSize: 12, fontWeight: 700 }}>晴 19~30℃</div>
2026-05-11 12:40:31 +08:00
</div>
</Col>
<Col span={8}>
2026-05-14 12:44:18 +08:00
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, justifyContent: 'center', height: '100%' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<Wind size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>风速: <b style={{ color: '#00B42A' }}>2.1m/s (适宜)</b></span>
2026-05-11 12:40:31 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<CloudRain size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>降水: <b style={{ color: '#86909C' }}>10% (低)</b></span>
2026-05-11 12:40:31 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<Droplets size={14} style={{ color: '#165DFF' }} /><span style={{ fontSize: 11 }}>水源: <b style={{ color: '#165DFF' }}>充足 (50t)</b></span>
2026-05-11 12:40:31 +08:00
</div>
</div>
</Col>
</Row>
</Card>
2026-05-07 22:04:27 +08:00
2026-05-14 12:44:18 +08:00
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗作业影响综合评估</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Row gutter={[16, 16]}>
{[
{ icon: <Droplets size={18} color="#165DFF" />, bg: '#E8F3FF', label: '预计用水量', value: '18 吨', sub: '节水 30% (机器人)', subColor: '#00B42A' },
{ icon: <Calendar size={18} color="#165DFF" />, bg: '#E8F3FF', label: '预计总耗时', value: '12 小时', sub: '并行作业 2 组', subColor: '#86909C' },
{ icon: <Leaf size={18} color="#00B42A" />, bg: '#E8FFEA', label: '碳减排贡献', value: '6.85 吨', sub: 'CO₂ 减排量', subColor: '#86909C' },
{ icon: <ShieldCheck size={18} color="#F7BA1E" />, bg: '#FFF7E8', label: '作业风险评估', value: '低风险', valueColor: '#00B42A', sub: '安全可控', subColor: '#86909C' },
].map((item, idx) => (
<Col span={12} key={idx}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 40, height: 40, background: item.bg, borderRadius: 10, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>{item.icon}</div>
<div>
<div style={{ fontSize: 11, color: '#86909C' }}>{item.label}</div>
<div style={{ fontSize: 14, fontWeight: 800, color: item.valueColor || '#1D2129' }}>{item.value}</div>
<div style={{ fontSize: 9, color: item.subColor }}>{item.sub}</div>
</div>
2026-05-11 12:40:31 +08:00
</div>
2026-05-14 12:44:18 +08:00
</Col>
))}
2026-05-11 12:40:31 +08:00
</Row>
2026-05-14 12:44:18 +08:00
<div style={{ marginTop: 20, padding: 12, background: '#f8fafc', borderRadius: 8, display: 'flex', gap: 8, alignItems: 'flex-start' }}>
<InfoCircleOutlined style={{ fontSize: 12, color: '#86909C', marginTop: 2 }} />
<Text type="secondary" style={{ fontSize: 10, lineHeight: 1.5 }}>
以上决策建议基于历史数据、实时气象及发电损失模型综合计算。实际执行效果可能受天气骤变、现场突发障碍等不确定因素影响。
</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
</Card>
</Col>
</Row>
2026-05-07 22:04:27 +08:00
</div>
);
}
2026-05-14 12:44:18 +08:00