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

581 lines
28 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-11 12:40:31 +08:00
Divider, Progress, Badge, Select, Tooltip
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,
PercentageOutlined, GlobalOutlined, AimOutlined
2026-05-07 22:04:27 +08:00
} from '@ant-design/icons';
2026-05-11 12:40:31 +08:00
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';
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: '待创建' },
];
// 图表配置数据
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: '阈值' },
2026-05-07 22:04:27 +08:00
];
2026-05-11 12:40:31 +08:00
const lossPieData = [
{ type: '灰尘积累', value: 6120 },
{ type: '鸟粪遮挡', value: 1480 },
{ type: '沙尘沉积', value: 1120 },
{ type: '其他', value: 600 },
];
2026-05-07 22:04:27 +08:00
2026-05-11 12:40:31 +08:00
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)' },
];
2026-05-07 22:04:27 +08:00
2026-05-11 12:40:31 +08:00
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 },
];
2026-05-07 22:04:27 +08:00
export default function CleanOptimizationPage() {
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' },
};
return <Tag color={config[priority]?.bg} style={{ color: config[priority]?.color, border: `1px solid ${config[priority]?.color}` }}>{priority}</Tag>;
2026-05-07 22:04:27 +08:00
};
return (
2026-05-11 12:40:31 +08:00
<div style={{ background: '#f0f2f5', minHeight: '100vh', padding: '16px 24px' }}>
2026-05-07 22:04:27 +08:00
{/* 顶部指标卡片 */}
2026-05-11 12:40:31 +08:00
<Row gutter={12} style={{ marginBottom: 16 }}>
2026-05-07 22:04:27 +08:00
<Col span={4}>
2026-05-11 12:40:31 +08:00
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Text type="secondary" style={{ fontSize: 13 }}>污染指数</Text>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, margin: '4px 0' }}>
<Text style={{ fontSize: 24, fontWeight: 'bold' }}>68.5</Text>
<Tag color="#52c41a" style={{ borderRadius: 10, margin: 0 }}>中等</Tag>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<div style={{ fontSize: 12 }}>
<Text type="secondary">较昨日</Text>
<Text style={{ color: '#ff4d4f', marginLeft: 4, fontWeight: 'bold' }}>▼ 5.3</Text>
</div>
</div>
<div style={{ width: 40, height: 40, borderRadius: '50%', background: '#fff7e6', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<SunOutlined style={{ color: '#faad14', fontSize: 20 }} />
</div>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
<Col span={4}>
2026-05-11 12:40:31 +08:00
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Text type="secondary" style={{ fontSize: 13 }}>建议清洗区块数</Text>
<div style={{ margin: '4px 0' }}>
<Text style={{ fontSize: 24, fontWeight: 'bold' }}>8 / 20</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<div style={{ fontSize: 12 }}>
<Text type="secondary">占比 40%</Text>
</div>
</div>
<div style={{ width: 40, height: 40, borderRadius: '50%', background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<LayoutGrid size={20} color="#1890ff" />
</div>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
<Col span={4}>
2026-05-11 12:40:31 +08:00
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Text type="secondary" style={{ fontSize: 13 }}>预计发电提升</Text>
<div style={{ margin: '4px 0' }}>
<Text style={{ fontSize: 24, fontWeight: 'bold', color: '#1890ff' }}>12,850</Text>
<Text style={{ fontSize: 14, marginLeft: 4 }}>kWh</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<div style={{ fontSize: 12 }}>
<Text type="secondary">占当前日发电量 14.2%</Text>
</div>
</div>
<div style={{ width: 40, height: 40, borderRadius: '50%', background: '#f0f5ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<TrendingUp size={20} color="#1890ff" />
</div>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
<Col span={4}>
2026-05-11 12:40:31 +08:00
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Text type="secondary" style={{ fontSize: 13 }}>预计收益提升</Text>
<div style={{ margin: '4px 0' }}>
<Text style={{ fontSize: 24, fontWeight: 'bold', color: '#faad14' }}>¥ 7,286</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<div style={{ fontSize: 12 }}>
<Text type="secondary">按电价 0.568 元/kWh 计算</Text>
</div>
</div>
<div style={{ width: 40, height: 40, borderRadius: '50%', background: '#fff7e6', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<DollarSign size={20} color="#faad14" />
</div>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
<Col span={4}>
2026-05-11 12:40:31 +08:00
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Text type="secondary" style={{ fontSize: 13 }}>上次清洗时间</Text>
<div style={{ margin: '4px 0' }}>
2026-05-11 13:15:28 +08:00
<Text style={{ fontSize: 24, fontWeight: 'bold' }}>2025-05-12</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<div style={{ fontSize: 12 }}>
<Text type="secondary">距今 12 天</Text>
</div>
</div>
<div style={{ width: 40, height: 40, borderRadius: '50%', background: '#f0f5ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Calendar size={20} color="#1890ff" />
</div>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
<Col span={4}>
2026-05-11 12:40:31 +08:00
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Text type="secondary" style={{ fontSize: 13 }}>清洗成本预估</Text>
<div style={{ margin: '4px 0' }}>
<Text style={{ fontSize: 24, fontWeight: 'bold', color: '#faad14' }}>¥ 3,200</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<div style={{ fontSize: 12 }}>
<Text type="secondary">预计单次清洗总成本</Text>
</div>
</div>
<div style={{ width: 40, height: 40, borderRadius: '50%', background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Droplets size={20} color="#1890ff" />
</div>
</div>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
</Row>
2026-05-11 12:40:31 +08:00
{/* 标题栏 */}
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
<Title level={4} style={{ margin: 0 }}>清洗优化管理</Title>
<InfoCircleOutlined style={{ color: '#bfbfbf' }} />
</div>
<Space>
<Text type="secondary" style={{ fontSize: 12 }}>
<ReloadOutlined style={{ marginRight: 4 }} /> 更新时间:2025-05-24 09:30
</Text>
<Button icon={<ReloadOutlined />}>刷新</Button>
<Select defaultValue="7d" style={{ width: 100 }}>
<Option value="7d">近 7 天</Option>
</Select>
<Button type="primary" icon={<DownloadOutlined />}>导出报告</Button>
</Space>
</div>
<Row gutter={12} style={{ display: 'flex', alignItems: 'stretch' }}>
{/* 左侧:四个图表 */}
<Col span={5} style={{ display: 'flex', flexDirection: 'column' }}>
<Card title={<Text strong>污染趋势</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
<Line
data={pollutionTrendData}
xField="date"
yField="value"
seriesField="type"
color={['#1890ff', '#ff4d4f']}
lineStyle={(type) => {
if (type === '阈值') return { lineDash: [4, 4] };
return {};
}}
legend={{ position: 'top-right' }}
height={120}
padding={[10, 10, 30, 30]}
/>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-11 12:40:31 +08:00
<Card title={<Text strong>发电损失分析 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(近 7 天)</Text></Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
<div style={{ height: 160, display: 'flex', alignItems: 'center' }}>
2026-05-07 22:04:27 +08:00
<Pie
2026-05-11 12:40:31 +08:00
data={lossPieData}
angleField="value"
colorField="type"
radius={1}
innerRadius={0.6}
legend={{
position: 'right',
layout: 'vertical',
itemValueLabel: {
formatter: (text, item) => {
const total = lossPieData.reduce((a, b) => a + b.value, 0);
const percent = ((item.value / total) * 100).toFixed(1);
return `${item.value.toLocaleString()} kWh (${percent}%)`;
}
}
}}
2026-05-07 22:04:27 +08:00
height={140}
/>
2026-05-11 12:40:31 +08:00
<div style={{ position: 'absolute', left: '26%', top: '48%', textAlign: 'center', transform: 'translate(-50%, -50%)' }}>
<div style={{ fontSize: 10, color: '#8c8c8c' }}>总损失电量</div>
<div style={{ fontSize: 14, fontWeight: 'bold' }}>9,320</div>
<div style={{ fontSize: 10, color: '#8c8c8c' }}>kWh</div>
2026-05-07 22:04:27 +08:00
</div>
</div>
</Card>
2026-05-11 12:40:31 +08:00
<Card title={<Text strong>清洗前后对比 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(近一次清洗)</Text></Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
<Column
data={compareBarData}
xField="date"
yField="value"
isGroup
seriesField="type"
color={['#1890ff', '#52c41a']}
height={140}
legend={{ position: 'top', layout: 'horizontal' }}
padding={[30, 10, 30, 30]}
/>
</Card>
<Card title={<Text strong>清洗收益测算 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(本次建议清洗)</Text></Text>} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
<Row gutter={[0, 12]}>
<Col span={6}>
<div style={{ fontSize: 10, color: '#8c8c8c' }}>预计发电提升</div>
<div style={{ fontSize: 14, fontWeight: 'bold' }}>12,850 <Text style={{ fontSize: 10 }}>kWh</Text></div>
</Col>
<Col span={6}>
<div style={{ fontSize: 10, color: '#8c8c8c' }}>电价 (含税)</div>
<div style={{ fontSize: 14, fontWeight: 'bold' }}>0.568 <Text style={{ fontSize: 10 }}>元/kWh</Text></div>
</Col>
<Col span={6}>
<div style={{ fontSize: 10, color: '#8c8c8c' }}>预计收益</div>
<div style={{ fontSize: 14, fontWeight: 'bold', color: '#52c41a' }}>7,286 <Text style={{ fontSize: 10, color: '#52c41a' }}>元</Text></div>
</Col>
<Col span={6}>
<div style={{ fontSize: 10, color: '#8c8c8c' }}>投资回报率 (ROI)</div>
<div style={{ fontSize: 20, fontWeight: 'bold', color: '#52c41a' }}>227%</div>
</Col>
<Col span={24}>
<Divider style={{ margin: '8px 0' }} />
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 12 }}>
<Text type="secondary" style={{ fontSize: 12 }}>回收周期</Text>
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>0.44 <Text style={{ fontSize: 12 }}>天</Text></Text>
</div>
</Col>
</Row>
2026-05-07 22:04:27 +08:00
</Card>
</Col>
2026-05-11 12:40:31 +08:00
{/* 中间:地图 + 工单表格 */}
<Col span={12} style={{ display: 'flex', flexDirection: 'column' }}>
2026-05-07 22:04:27 +08:00
<Card
2026-05-11 12:40:31 +08:00
title={<Text strong>电站污染分布与建议清洗区块</Text>}
2026-05-07 22:04:27 +08:00
bordered={false}
2026-05-11 12:40:31 +08:00
style={{ borderRadius: 8, marginBottom: 12, flex: 1, display: 'flex', flexDirection: 'column' }}
bodyStyle={{ padding: 0, flex: 1, position: 'relative' }}
2026-05-07 22:04:27 +08:00
>
2026-05-11 12:40:31 +08:00
<div style={{ padding: '8px 16px', display: 'flex', justifyContent: 'space-between', borderBottom: '1px solid #f0f0f0' }}>
<Space size={16} style={{ fontSize: 12 }}>
<span style={{ color: '#8c8c8c' }}>污染等级:</span>
<Badge color="#ff4d4f" text="优先清洗 (>75)" />
<Badge color="#faad14" text="较高 (50-75)" />
<Badge color="#ffec3d" text="中等 (25-50)" />
<Badge color="#b7eb8f" text="较低 (10-25)" />
<Badge color="#52c41a" text="清洁 (<10)" />
</Space>
</div>
<div style={{ position: 'relative', flex: 1, background: '#e6f7ff', overflow: 'hidden', minHeight: 480 }}>
{/* 模拟地图底图 */}
<img src="https://api.placeholder.com/800x500?text=Power+Station+Aerial+View" style={{ width: '100%', height: '100%', objectFit: 'cover', opacity: 0.8 }} />
2026-05-07 22:04:27 +08:00
2026-05-11 12:40:31 +08:00
{/* 区块标记 */}
<div style={{ position: 'absolute', top: '15%', left: '25%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 01</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>82.3</div>
</div>
<div style={{ position: 'absolute', top: '15%', left: '40%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 02</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>76.8</div>
</div>
<div style={{ position: 'absolute', top: '15%', left: '55%', padding: '4px 8px', background: 'rgba(250, 173, 20, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 03</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>63.2</div>
</div>
<div style={{ position: 'absolute', top: '20%', left: '70%', padding: '4px 8px', background: 'rgba(82, 196, 26, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 08</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>19.7</div>
</div>
2026-05-07 22:04:27 +08:00
2026-05-11 12:40:31 +08:00
<div style={{ position: 'absolute', top: '35%', left: '15%', padding: '4px 8px', background: 'rgba(250, 173, 20, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 04</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>33.6</div>
</div>
<div style={{ position: 'absolute', top: '38%', left: '35%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 05</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>68.7</div>
</div>
<div style={{ position: 'absolute', top: '40%', left: '48%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
<div style={{ fontSize: 10 }}>区块 15</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>82.9</div>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
{/* 地图控制按钮 */}
<div style={{ position: 'absolute', top: 20, right: 20, display: 'flex', flexDirection: 'column', gap: 8 }}>
<Button icon={<AimOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>图例</Button>
<Button icon={<RocketOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>筛选</Button>
<Button icon={<PlusOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>缩放+</Button>
<Button icon={<ReloadOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>复位</Button>
2026-05-07 22:04:27 +08:00
</div>
</div>
</Card>
<Card
2026-05-11 12:40:31 +08:00
title={<Text strong>清洗工单预览</Text>}
2026-05-07 22:04:27 +08:00
bordered={false}
2026-05-11 12:40:31 +08:00
style={{ borderRadius: 8, flex: 'none' }}
extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
bodyStyle={{ padding: 0 }}
2026-05-07 22:04:27 +08:00
>
2026-05-11 12:40:31 +08:00
<Table
columns={[
{ title: '区块', dataIndex: 'area', width: 100 },
{ title: '优先级', dataIndex: 'priority', width: 80, render: renderPriorityTag },
{ title: '预计工时', dataIndex: 'duration', width: 100 },
{ title: '负责人', dataIndex: 'handler', width: 100 },
{ title: '计划时间', dataIndex: 'planTime', width: 180 },
{ title: '状态', dataIndex: 'status', width: 80, render: (s) => <Text type="secondary">{s}</Text> },
{ title: '操作', key: 'action', width: 80, render: () => <Button type="link" size="small">创建工单</Button> },
]}
dataSource={workOrderPreviewData}
pagination={false}
size="small"
/>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-11 12:40:31 +08:00
</Col>
{/* 右侧:建议 + 方案 + 天气 + 评估 */}
<Col span={7} style={{ display: 'flex', flexDirection: 'column' }}>
<Card title={<Text strong>智能清洗建议</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: 0 }}>
<div style={{ padding: '8px 16px', background: '#fafafa', borderBottom: '1px solid #f0f0f0' }}>
<Text type="secondary" style={{ fontSize: 12 }}>算法模型:多因子综合优化模型</Text>
2026-05-07 22:04:27 +08:00
</div>
2026-05-11 12:40:31 +08:00
<Table
columns={[
{ title: '推荐计划', dataIndex: 'id', width: 80 },
{ title: '优先级', dataIndex: 'priority', width: 60, render: (p) => <Text style={{ color: p === '高' ? '#ff4d4f' : p === '中' ? '#faad14' : '#52c41a' }}>{p}</Text> },
{ title: '建议区块', dataIndex: 'area', width: 100 },
{ title: '预计提升', dataIndex: 'boost', width: 100 },
{ title: '天气适宜度', dataIndex: 'weather', width: 90, render: (w) => <Space size={4}>{w} <SunOutlined style={{ color: '#faad14', fontSize: 12 }} /></Space> },
{ title: '建议时间', key: 'time', width: 100, render: (_, record, index) => <Text style={{ fontSize: 11 }}>05-{26 + index} - 05-{27 + index}</Text> },
]}
dataSource={smartCleanPlanData}
pagination={false}
size="small"
/>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-11 12:40:31 +08:00
<Card title={<Text strong>清洗方案建议</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
<Row gutter={12}>
<Col span={12}>
<div style={{ border: '1px solid #f0f0f0', borderRadius: 8, padding: '12px', background: '#f9f0ff' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
<div style={{ width: 32, height: 32, borderRadius: '50%', background: '#722ed1', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Bot size={18} color="#fff" />
</div>
<Text strong style={{ fontSize: 13 }}>清洗机器人方案</Text>
</div>
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 8 }}>自动化清洗,效率高,适合大面积、平整区域</Text>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<Text type="secondary" style={{ fontSize: 11 }}>预计用水:</Text>
<Text strong style={{ fontSize: 11 }}>18 吨</Text>
</div>
</div>
</Col>
<Col span={12}>
<div style={{ border: '1px solid #f0f0f0', borderRadius: 8, padding: '12px', background: '#e6f7ff' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
<div style={{ width: 32, height: 32, borderRadius: '50%', background: '#1890ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<User size={18} color="#fff" />
</div>
<Text strong style={{ fontSize: 13 }}>人工清洗方案</Text>
</div>
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 8 }}>灵活作业,适合局部、遮挡严重或复杂区域</Text>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<Text type="secondary" style={{ fontSize: 11 }}>预计用水:</Text>
<Text strong style={{ fontSize: 11 }}>32 吨</Text>
</div>
</div>
</Col>
</Row>
2026-05-07 22:04:27 +08:00
</Card>
2026-05-11 12:40:31 +08:00
<Card title={<Text strong>天气与资源参考 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(计划 01)</Text></Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
<Row gutter={16}>
<Col span={8}>
<div style={{ textAlign: 'center', padding: '8px', background: '#fafafa', borderRadius: 8 }}>
<div style={{ fontSize: 11, color: '#8c8c8c' }}>05-26</div>
<SunOutlined style={{ fontSize: 20, color: '#faad14', margin: '4px 0' }} />
<div style={{ fontSize: 11 }}>多云</div>
<div style={{ fontSize: 11, fontWeight: 'bold' }}>18~28℃</div>
</div>
</Col>
<Col span={8}>
<div style={{ textAlign: 'center', padding: '8px', background: '#fafafa', borderRadius: 8 }}>
<div style={{ fontSize: 11, color: '#8c8c8c' }}>05-27</div>
<SunOutlined style={{ fontSize: 20, color: '#faad14', margin: '4px 0' }} />
<div style={{ fontSize: 11 }}>晴</div>
<div style={{ fontSize: 11, fontWeight: 'bold' }}>19~30℃</div>
</div>
</Col>
<Col span={8}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<Wind size={14} color="#8c8c8c" />
<div style={{ fontSize: 10 }}>风速 <Text strong>2.1 m/s</Text></div>
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<CloudRain size={14} color="#8c8c8c" />
<div style={{ fontSize: 10 }}>降水率 <Text strong>10%</Text></div>
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<Droplets size={14} color="#1890ff" />
<div style={{ fontSize: 10 }}>水源可用 <Text strong>充足</Text></div>
</div>
</div>
</Col>
</Row>
</Card>
2026-05-07 22:04:27 +08:00
2026-05-11 12:40:31 +08:00
<Card title={<Text strong>清洗影响评估</Text>} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
<Row gutter={[12, 12]}>
<Col span={12}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Droplets size={18} color="#1890ff" />
</div>
<div>
<div style={{ fontSize: 11, color: '#8c8c8c' }}>预计用水量</div>
<div style={{ fontSize: 14, fontWeight: 'bold' }}>18 <Text style={{ fontSize: 11 }}>吨</Text></div>
<div style={{ fontSize: 9, color: '#52c41a' }}>节水率 30% (机器人)</div>
</div>
</div>
</Col>
<Col span={12}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#f0f5ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Calendar size={18} color="#1890ff" />
</div>
<div>
<div style={{ fontSize: 11, color: '#8c8c8c' }}>预计耗时</div>
<div style={{ fontSize: 14, fontWeight: 'bold' }}>12 <Text style={{ fontSize: 11 }}>小时</Text></div>
<div style={{ fontSize: 9, color: '#8c8c8c' }}>并行作业 2 组</div>
</div>
</div>
</Col>
<Col span={12}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#f6ffed', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Zap size={18} color="#52c41a" />
</div>
<div>
<div style={{ fontSize: 11, color: '#8c8c8c' }}>碳减排量</div>
<div style={{ fontSize: 14, fontWeight: 'bold' }}>6.85 <Text style={{ fontSize: 11 }}>吨</Text></div>
<div style={{ fontSize: 9, color: '#8c8c8c' }}>CO₂ 减排量</div>
</div>
</div>
</Col>
<Col span={12}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#fff7e6', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Info size={18} color="#faad14" />
</div>
<div>
<div style={{ fontSize: 11, color: '#8c8c8c' }}>作业风险</div>
<div style={{ fontSize: 14, fontWeight: 'bold', color: '#52c41a' }}>低风险</div>
<div style={{ fontSize: 9, color: '#8c8c8c' }}>安全可控</div>
</div>
</div>
</Col>
</Row>
<div style={{ marginTop: 12, display: 'flex', alignItems: 'center', gap: 4 }}>
<InfoCircleOutlined style={{ fontSize: 10, color: '#bfbfbf' }} />
<Text type="secondary" style={{ fontSize: 9 }}>以上建议基于历史数据、实时气象及发电损失模型综合计算。实际效果可能因天气和现场情况有所差异。</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>
);
}