592 lines
26 KiB
TypeScript
592 lines
26 KiB
TypeScript
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<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}`, margin: 0, borderRadius: 4 }}>{priority}</Tag>;
|
||
};
|
||
|
||
return (
|
||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '12px 0px', boxSizing: 'border-box' }}>
|
||
<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>
|
||
|
||
|
||
<Row
|
||
gutter={[8, 8]}
|
||
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) => (
|
||
<Col key={index} style={{ minWidth: '168px', flex: '1 0 auto', maxWidth: "250px" }}>
|
||
<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>
|
||
</div>
|
||
|
||
<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 } })}
|
||
</div>
|
||
</div>
|
||
</Card>
|
||
</Col>
|
||
))}
|
||
</Row>
|
||
{/* 标题与操作栏 */}
|
||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
|
||
<Space size={8}>
|
||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', }}>清洗优化管理</Typography.Title>
|
||
<InfoCircleOutlined style={{ color: '#86909C' }} />
|
||
</Space>
|
||
<Space>
|
||
<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>
|
||
</Select>
|
||
<Button type="primary" icon={<DownloadOutlined />}>导出报告</Button>
|
||
</Space>
|
||
</div>
|
||
|
||
<Row gutter={[8, 8]} style={{ display: 'flex', alignItems: 'stretch' }}>
|
||
{/* 左侧:分析图表 */}
|
||
<Col xs={24} xl={6} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||
<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>
|
||
<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,
|
||
},
|
||
]}
|
||
/>
|
||
</Card>
|
||
|
||
<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 }}>
|
||
<div style={{ position: 'relative', height: "100%" }}>
|
||
<UniversalPieChart
|
||
data={pieChartData}
|
||
height={220}
|
||
innerRadius={50}
|
||
outerRadius={80}
|
||
showLabel={false}
|
||
/>
|
||
<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>
|
||
</div>
|
||
</div>
|
||
</Card>
|
||
|
||
<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 }}>
|
||
<UniversalBarChart
|
||
data={compareChartData}
|
||
xKey="date"
|
||
height={220}
|
||
barSize={18}
|
||
series={[
|
||
{
|
||
key: 'before',
|
||
name: '清洗前发电量(kWh)',
|
||
color: '#1890ff',
|
||
},
|
||
{
|
||
key: 'after',
|
||
name: '清洗后发电量(kWh)',
|
||
color: '#52c41a',
|
||
},
|
||
]}
|
||
/>
|
||
</Card>
|
||
|
||
<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>
|
||
</Col>
|
||
<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>
|
||
</Col>
|
||
<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>
|
||
</Col>
|
||
<Col span={12}>
|
||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>ROI (投资回报)</div>
|
||
<div style={{ fontSize: 20, fontWeight: 800, color: '#00B42A' }}>227%</div>
|
||
</Col>
|
||
</Row>
|
||
<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>
|
||
</Card>
|
||
</Col>
|
||
|
||
{/* 中间:地图分布与工单预览 */}
|
||
<Col xs={24} xl={11} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||
<Card
|
||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>电站污染分布与建议清洗区块分布图</span>}
|
||
bordered={false}
|
||
style={{ ...cardStyle, }}
|
||
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }}
|
||
>
|
||
<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)" />
|
||
</Space>
|
||
</div>
|
||
|
||
{/* 地图背景图与浮动标签 */}
|
||
<div style={{ position: 'relative', width: '100%', height: '100%', background: '#e5e6eb' }}>
|
||
<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' }} />
|
||
|
||
{/* 模拟区块叠加层 */}
|
||
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', background: 'rgba(0,0,0,0.1)' }} />
|
||
|
||
{/* 具体的污染区块标签 */}
|
||
{[
|
||
{ 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' }} />
|
||
</div>
|
||
</div>
|
||
</Card>
|
||
|
||
<Card
|
||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>清洗工单智能预览</span>}
|
||
extra={<Button type="link" size="small">查看更多 <ChevronRight size={14} /></Button>}
|
||
bordered={false}
|
||
style={cardStyle}
|
||
bodyStyle={{ padding: 0 }}
|
||
>
|
||
<Table
|
||
columns={[
|
||
{ 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> },
|
||
]}
|
||
dataSource={workOrderPreviewData}
|
||
pagination={false}
|
||
size="small"
|
||
className="compact-table"
|
||
/>
|
||
</Card>
|
||
</Col>
|
||
|
||
{/* 右侧:决策建议与参考 */}
|
||
<Col xs={24} xl={7} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||
<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>
|
||
</div>
|
||
<Table
|
||
columns={[
|
||
{ 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> },
|
||
]}
|
||
dataSource={smartCleanPlanData}
|
||
pagination={false}
|
||
size="small"
|
||
className="compact-table"
|
||
/>
|
||
</Card>
|
||
|
||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗技术方案推荐</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||
<Row gutter={12}>
|
||
<Col span={12}>
|
||
<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>
|
||
</div>
|
||
</div>
|
||
</Col>
|
||
<Col span={12}>
|
||
<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>
|
||
</div>
|
||
</div>
|
||
</Col>
|
||
</Row>
|
||
</Card>
|
||
|
||
<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}>
|
||
<Col span={8}>
|
||
<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>
|
||
</div>
|
||
</Col>
|
||
<Col span={8}>
|
||
<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>
|
||
</div>
|
||
</Col>
|
||
<Col span={8}>
|
||
<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>
|
||
</div>
|
||
<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>
|
||
</div>
|
||
<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>
|
||
</div>
|
||
</div>
|
||
</Col>
|
||
</Row>
|
||
</Card>
|
||
|
||
<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>
|
||
</div>
|
||
</Col>
|
||
))}
|
||
</Row>
|
||
<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>
|
||
</div>
|
||
</Card>
|
||
</Col>
|
||
</Row>
|
||
</div>
|
||
);
|
||
}
|
||
|