import React, { useState } from 'react'; import { Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker, Divider, Progress, Badge, Select, Tooltip } from 'antd'; import { ReloadOutlined, PlusOutlined, ArrowUpOutlined, ArrowDownOutlined, CheckCircleOutlined, CloudOutlined, SunOutlined, MoneyCollectOutlined, CalendarOutlined, DropOutlined, DownloadOutlined, InfoCircleOutlined, EnvironmentOutlined, RocketOutlined, UserOutlined, WindOutlined, PercentageOutlined, GlobalOutlined, AimOutlined } from '@ant-design/icons'; import { Line, Pie, Column } from '@ant-design/charts'; import { Droplets, Zap, TrendingUp, Calendar, DollarSign, LayoutGrid, ChevronRight, Bot, User, CloudRain, Thermometer, Wind, Info } from 'lucide-react'; 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 pollutionTrendData = [ { date: '05-18', value: 78, type: '污染指数' }, { date: '05-19', value: 72, type: '污染指数' }, { date: '05-20', value: 65, type: '污染指数' }, { date: '05-21', value: 75, type: '污染指数' }, { date: '05-22', value: 68, type: '污染指数' }, { date: '05-23', value: 60, type: '污染指数' }, { date: '05-24', value: 68.5, type: '污染指数' }, { date: '05-18', value: 75, type: '阈值' }, { date: '05-19', value: 75, type: '阈值' }, { date: '05-20', value: 75, type: '阈值' }, { date: '05-21', value: 75, type: '阈值' }, { date: '05-22', value: 75, type: '阈值' }, { date: '05-23', value: 75, type: '阈值' }, { date: '05-24', value: 75, type: '阈值' }, ]; const lossPieData = [ { type: '灰尘积累', value: 6120 }, { type: '鸟粪遮挡', value: 1480 }, { type: '沙尘沉积', value: 1120 }, { type: '其他', value: 600 }, ]; const compareBarData = [ { date: 'D-7', value: 800, type: '清洗前发电量(kWh)' }, { date: 'D-7', value: 1200, type: '清洗后发电量(kWh)' }, { date: 'D-6', value: 850, type: '清洗前发电量(kWh)' }, { date: 'D-6', value: 1250, type: '清洗后发电量(kWh)' }, { date: 'D-5', value: 900, type: '清洗前发电量(kWh)' }, { date: 'D-5', value: 1300, type: '清洗后发电量(kWh)' }, { date: 'D-4', value: 880, type: '清洗前发电量(kWh)' }, { date: 'D-4', value: 1280, type: '清洗后发电量(kWh)' }, { date: 'D-3', value: 920, type: '清洗前发电量(kWh)' }, { date: 'D-3', value: 1320, type: '清洗后发电量(kWh)' }, { date: 'D-2', value: 950, type: '清洗前发电量(kWh)' }, { date: 'D-2', value: 1350, type: '清洗后发电量(kWh)' }, { date: 'D-1', value: 980, type: '清洗前发电量(kWh)' }, { date: 'D-1', value: 1380, type: '清洗后发电量(kWh)' }, ]; const boostRateData = [ { 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 }, ]; export default function CleanOptimizationPage() { const renderPriorityTag = (priority: string) => { const config: Record = { '高': { color: '#ff4d4f', bg: '#fff1f0' }, '中': { color: '#faad14', bg: '#fff7e6' }, '低': { color: '#52c41a', bg: '#f6ffed' }, }; return {priority}; }; return (
{/* 顶部指标卡片 */}
污染指数
68.5 中等
较昨日 ▼ 5.3
建议清洗区块数
8 / 20
占比 40%
预计发电提升
12,850 kWh
占当前日发电量 14.2%
预计收益提升
¥ 7,286
按电价 0.568 元/kWh 计算
上次清洗时间
2025-05-12
距今 12 天
清洗成本预估
¥ 3,200
预计单次清洗总成本
{/* 标题栏 */}
清洗优化管理
更新时间:2025-05-24 09:30
{/* 左侧:四个图表 */} 污染趋势} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> { if (type === '阈值') return { lineDash: [4, 4] }; return {}; }} legend={{ position: 'top-right' }} height={120} padding={[10, 10, 30, 30]} /> 发电损失分析 (近 7 天)} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
{ const total = lossPieData.reduce((a, b) => a + b.value, 0); const percent = ((item.value / total) * 100).toFixed(1); return `${item.value.toLocaleString()} kWh (${percent}%)`; } } }} height={140} />
总损失电量
9,320
kWh
清洗前后对比 (近一次清洗)} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> 清洗收益测算 (本次建议清洗)} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
预计发电提升
12,850 kWh
电价 (含税)
0.568 元/kWh
预计收益
7,286 元
投资回报率 (ROI)
227%
回收周期 0.44 天
{/* 中间:地图 + 工单表格 */} 电站污染分布与建议清洗区块} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 1, display: 'flex', flexDirection: 'column' }} bodyStyle={{ padding: 0, flex: 1, position: 'relative' }} >
污染等级:
{/* 模拟地图底图 */} {/* 区块标记 */}
区块 01
82.3
区块 02
76.8
区块 03
63.2
区块 08
19.7
区块 04
33.6
区块 05
68.7
区块 15
82.9
{/* 地图控制按钮 */}
清洗工单预览} bordered={false} style={{ borderRadius: 8, flex: 'none' }} extra={} bodyStyle={{ padding: 0 }} > {s} }, { title: '操作', key: 'action', width: 80, render: () => }, ]} dataSource={workOrderPreviewData} pagination={false} size="small" /> {/* 右侧:建议 + 方案 + 天气 + 评估 */} 智能清洗建议} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: 0 }}>
算法模型:多因子综合优化模型
{p} }, { title: '建议区块', dataIndex: 'area', width: 100 }, { title: '预计提升', dataIndex: 'boost', width: 100 }, { title: '天气适宜度', dataIndex: 'weather', width: 90, render: (w) => {w} }, { title: '建议时间', key: 'time', width: 100, render: (_, record, index) => 05-{26 + index} - 05-{27 + index} }, ]} dataSource={smartCleanPlanData} pagination={false} size="small" /> 清洗方案建议} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
清洗机器人方案
自动化清洗,效率高,适合大面积、平整区域
预计用水: 18 吨
人工清洗方案
灵活作业,适合局部、遮挡严重或复杂区域
预计用水: 32 吨
天气与资源参考 (计划 01)} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
05-26
多云
18~28℃
05-27
晴
19~30℃
风速 2.1 m/s
降水率 10%
水源可用 充足
清洗影响评估} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
预计用水量
18 吨
节水率 30% (机器人)
预计耗时
12 小时
并行作业 2 组
碳减排量
6.85 吨
CO₂ 减排量
作业风险
低风险
安全可控
以上建议基于历史数据、实时气象及发电损失模型综合计算。实际效果可能因天气和现场情况有所差异。
); }