import React, { useState } from 'react'; import { Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker, Divider, Progress, Badge, Select, Tooltip, Avatar } from 'antd'; import { ReloadOutlined, PlusOutlined, ArrowUpOutlined, ArrowDownOutlined, CheckCircleOutlined, CloudOutlined, SunOutlined, MoneyCollectOutlined, CalendarOutlined, DropOutlined, DownloadOutlined, InfoCircleOutlined, EnvironmentOutlined, RocketOutlined, UserOutlined, WindOutlined, PercentageOutlined, GlobalOutlined, AimOutlined, FilterOutlined, FullscreenOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons'; import { Line, Pie, Column, DualAxes } from '@ant-design/charts'; import { Droplets, Zap, TrendingUp, Calendar, DollarSign, LayoutGrid, ChevronRight, Bot, User, CloudRain, Thermometer, Wind, Info, ShieldCheck, Leaf } from 'lucide-react'; import { UniversalBarChart, UniversalLineChart, UniversalPieChart } from '../components/recharts'; const { Title, Text } = Typography; const { RangePicker } = DatePicker; const { Option } = Select; // 模拟数据 const smartCleanPlanData = [ { 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%' }, ]; const workOrderPreviewData = [ { 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: '待创建' }, ]; 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 }, ]; const pieChartData = [ { name: '灰尘积累', value: 6120, color: '#165DFF' }, { name: '鸟粪遮挡', value: 1480, color: '#F53F3F' }, { name: '沙尘沉积', value: 1120, color: '#F7BA1E' }, { name: '其他', value: 600, color: '#86909C' }, ]; 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 }, ], ]; 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 }, ]; export default function CleanOptimizationPage() { const cardStyle = { borderRadius: 12, border: '1px solid #f0f0f0', boxShadow: '0 4px 12px rgba(0,0,0,0.05)', overflow: 'hidden' }; const renderPriorityTag = (priority: string) => { const config: Record = { '高': { color: '#ff4d4f', bg: '#fff1f0' }, '中': { color: '#faad14', bg: '#fff7e6' }, '低': { color: '#52c41a', bg: '#f6ffed' }, }; return {priority}; }; return (
{[ { title: '污染指数', value: '68.5', unit: '', tag: '中等', tagColor: '#52c41a', trend: '较昨日 ▼ 5.3', trendColor: '#ff4d4f', icon: , color: '#faad14', bg: '#fff7e6' }, { title: '建议清洗区块数', value: '8 / 20', unit: '', trend: '占比 40%', icon: , color: '#1890ff', bg: '#e6f7ff' }, { title: '预计发电提升', value: '12,850', unit: 'kWh', trend: '占当前日发电量 14.2%', icon: , color: '#1890ff', bg: '#f0f5ff' }, { title: '预计收益提升', value: '¥ 7,286', unit: '', trend: '按电价 0.568 元/kWh 计算', icon: , color: '#faad14', bg: '#fff7e6' }, { title: '上次清洗时间', value: '2025-05-12', unit: '', trend: '距今 12 天', icon: , color: '#1890ff', bg: '#f0f5ff' }, { title: '清洗成本预估', value: '¥ 3,200', unit: '', trend: '预计单次清洗总成本', icon: , color: '#1890ff', bg: '#e6f7ff' }, ].map((item, index) => (
{item.title}
{item.value}
{item.unit && ( {item.unit} )} {item.tag && ( {item.tag} )}
{item.trend}
{React.cloneElement(item.icon, { style: { fontSize: 20, color: item.color } })}
))}
{/* 标题与操作栏 */}
清洗优化管理 更新时间:2025-05-24 09:30
{/* 左侧:分析图表 */} 污染趋势分析} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
污染指数
污染指数
阈值
发电损失构成 (近 7 天)} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
总损失电量
9,320
kWh
清洗前后对比分析 (近一次)} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> 清洗收益深度测算} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
预计发电提升
12,850 kWh
电价 (含税)
0.568 元/kWh
预计净收益
7,286 元
ROI (投资回报)
227%
回收周期 0.44 天
{/* 中间:地图分布与工单预览 */} 电站污染分布与建议清洗区块分布图} bordered={false} style={{ ...cardStyle, }} bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }} >
污染等级:
{/* 地图背景图与浮动标签 */}
{/* 模拟区块叠加层 */}
{/* 具体的污染区块标签 */} {[ { 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 => (
区块 {block.id}
{block.score}
))} {/* 右侧悬浮控制按钮 */}
清洗工单智能预览} extra={} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }} > {s} }, { title: '操作', key: 'action', render: () => }, ]} dataSource={workOrderPreviewData} pagination={false} size="small" className="compact-table" /> {/* 右侧:决策建议与参考 */} 智能清洗策略建议} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}>
算法模型:多因子加权综合优化模型 (v2.0)
{p}, width: 65 }, { title: '建议区块', dataIndex: 'area', key: 'area' }, { title: '预计提升', dataIndex: 'boost', key: 'boost', render: (b) => {b} }, { title: '天气适宜度', dataIndex: 'weather', key: 'weather', render: (w) => {w} }, ]} dataSource={smartCleanPlanData} pagination={false} size="small" className="compact-table" /> 清洗技术方案推荐} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
智能机器人方案
全自动清洗,适合大面积平整区块,效率极高。
预计用水: 18 吨
人工精细化方案
灵活处理遮挡及严重污垢区域,适合复杂地形。
预计用水: 32 吨
天气与资源环境参考 (计划 01)} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
05-26 (周一)
多云 18~28℃
05-27 (周二)
晴 19~30℃
风速: 2.1m/s (适宜)
降水: 10% (低)
水源: 充足 (50t)
清洗作业影响综合评估} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> {[ { icon: , bg: '#E8F3FF', label: '预计用水量', value: '18 吨', sub: '节水 30% (机器人)', subColor: '#00B42A' }, { icon: , bg: '#E8F3FF', label: '预计总耗时', value: '12 小时', sub: '并行作业 2 组', subColor: '#86909C' }, { icon: , bg: '#E8FFEA', label: '碳减排贡献', value: '6.85 吨', sub: 'CO₂ 减排量', subColor: '#86909C' }, { icon: , bg: '#FFF7E8', label: '作业风险评估', value: '低风险', valueColor: '#00B42A', sub: '安全可控', subColor: '#86909C' }, ].map((item, idx) => (
{item.icon}
{item.label}
{item.value}
{item.sub}
))}
以上决策建议基于历史数据、实时气象及发电损失模型综合计算。实际执行效果可能受天气骤变、现场突发障碍等不确定因素影响。
); }