This commit is contained in:
mmc
2026-05-11 12:40:31 +08:00
parent 0bd1fc42d3
commit 020023c8f5
3 changed files with 888 additions and 778 deletions

View File

@@ -59,6 +59,10 @@
.ant-select-selector{ .ant-select-selector{
border-radius:8px !important; border-radius:8px !important;
} }
.ant-btn{
border-radius:8px !important;
}
@keyframes sunRotate { @keyframes sunRotate {

View File

@@ -1,487 +1,580 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { import {
Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker, Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker,
Divider, Divider, Progress, Badge, Select, Tooltip
Flex
} from 'antd'; } from 'antd';
import { import {
ReloadOutlined, PlusOutlined, ArrowUpOutlined, CheckCircleOutlined, ReloadOutlined, PlusOutlined, ArrowUpOutlined, ArrowDownOutlined,
CloudOutlined, SunOutlined, MoneyCollectOutlined, CalendarOutlined, DropOutlined CheckCircleOutlined, CloudOutlined, SunOutlined, MoneyCollectOutlined,
CalendarOutlined, DropOutlined, DownloadOutlined, InfoCircleOutlined,
EnvironmentOutlined, RocketOutlined, UserOutlined, WindOutlined,
PercentageOutlined, GlobalOutlined, AimOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Line, Pie, Bar } from '@ant-design/charts'; import { Line, Pie, Column } from '@ant-design/charts';
import he from '@/dist/assets/Organization-irk1gmLc'; import {
Droplets,
Zap,
TrendingUp,
Calendar,
DollarSign,
LayoutGrid,
ChevronRight,
Bot,
User,
CloudRain,
Thermometer,
Wind,
Info
} from 'lucide-react';
const { Title, Text } = Typography; const { Title, Text } = Typography;
const { RangePicker } = DatePicker;
const { Option } = Select;
// 模拟数据 // 模拟数据
const smartCleanPlanData = [ const smartCleanPlanData = [
{ id: 'plan01', priority: '高', area: '区域15, 01', boost: '4,250 kWh', weather: 88 }, { id: '计划 01', priority: '高', area: '区块 15, 01', boost: '4,250 kWh', weather: '88%' },
{ id: 'plan02', priority: '高', area: '区域06, 02', boost: '3,180 kWh', weather: 86 }, { id: '计划 02', priority: '高', area: '区块 02, 11', boost: '3,180 kWh', weather: '85%' },
{ id: 'plan03', priority: '中', area: '区域07, 09', boost: '2,210 kWh', weather: 84 }, { 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 = [ const workOrderPreviewData = [
{ { area: '区块 15', priority: '高', duration: '4.0 h', handler: '李工', planTime: '2025-05-26 - 05-27', status: '待创建' },
area: 'A区北侧组件清洗区', { area: '区块 01', priority: '高', duration: '3.5 h', handler: '李工', planTime: '2025-05-26 - 05-27', status: '待创建' },
priority: '高', { area: '区块 02', priority: '高', duration: '2.8 h', handler: '王工', planTime: '2025-05-28 - 05-29', status: '待创建' },
duration: '2.5 h', { area: '区块 11', priority: '高', duration: '2.6 h', handler: '王工', planTime: '2025-05-28 - 05-29', status: '待创建' },
handler: '运维工程师', { area: '区块 05', priority: '中', duration: '2.2 h', handler: '赵工', planTime: '2025-05-29 - 05-30', status: '待创建' },
planTime: '2026-04-30T20:26:05',
status: '已审批'
},
{
area: 'B区沙尘沉积区',
priority: '中',
duration: '2.5 h',
handler: '清洗班组',
planTime: '2026-05-02T20:26:05',
status: '待确认'
}
]; ];
// 图表配置 // 图表配置数据
const pollutionTrendConfig = { const pollutionTrendData = [
data: [ { date: '05-18', value: 78, type: '污染指数' },
{ date: '04-23', 污染指数: 45, 阈值: 50 }, { date: '05-19', value: 72, type: '污染指数' },
{ date: '04-24', 污染指数: 48, 阈值: 50 }, { date: '05-20', value: 65, type: '污染指数' },
{ date: '04-26', 污染指数: 52, 阈值: 50 }, { date: '05-21', value: 75, type: '污染指数' },
{ date: '04-28', 污染指数: 50, 阈值: 50 }, { date: '05-22', value: 68, type: '污染指数' },
{ date: '04-29', 污染指数: 54, 阈值: 50 }, { date: '05-23', value: 60, type: '污染指数' },
], { date: '05-24', value: 68.5, type: '污染指数' },
xField: 'date', { date: '05-18', value: 75, type: '阈值' },
yField: ['污染指数', '阈值'], { date: '05-19', value: 75, type: '阈值' },
color: ['#1890ff', '#faad14'], { date: '05-20', value: 75, type: '阈值' },
smooth: true, { date: '05-21', value: 75, type: '阈值' },
legend: { position: 'top-left' }, { date: '05-22', value: 75, type: '阈值' },
}; { date: '05-23', value: 75, type: '阈值' },
{ date: '05-24', value: 75, type: '阈值' },
];
const lossPieConfig = { const lossPieData = [
data: [ { type: '灰尘积累', value: 6120 },
{ type: '灰尘积累', value: 50 }, { type: '鸟粪遮挡', value: 1480 },
{ type: '鸟粪遮挡', value: 30 }, { type: '沙尘沉积', value: 1120 },
{ type: '沙尘污染', value: 15 }, { type: '其他', value: 600 },
{ type: '其他', value: 5 }, ];
],
angleField: 'value',
colorField: 'type',
color: ['#1890ff', '#ff4d4f', '#faad14', '#d9d9d9'],
radius: 0.8,
innerRadius: 0.6,
label: { type: 'outer' },
};
const compareBarConfig = { const compareBarData = [
data: [ { date: 'D-7', value: 800, type: '清洗前发电量(kWh)' },
{ date: 'D-7', 清洗前: 800, 清洗后: 1200, 提升率: 50 }, { date: 'D-7', value: 1200, type: '清洗后发电量(kWh)' },
{ date: 'D-5', 清洗前: 850, 清洗后: 1200, 提升率: 41 }, { date: 'D-6', value: 850, type: '清洗前发电量(kWh)' },
{ date: 'D-3', 清洗前: 900, 清洗后: 1200, 提升率: 33 }, { date: 'D-6', value: 1250, type: '清洗后发电量(kWh)' },
{ date: 'D-1', 清洗前: 950, 清洗后: 1200, 提升率: 26 }, { date: 'D-5', value: 900, type: '清洗前发电量(kWh)' },
], { date: 'D-5', value: 1300, type: '清洗后发电量(kWh)' },
xField: 'date', { date: 'D-4', value: 880, type: '清洗前发电量(kWh)' },
yField: ['清洗前', '清洗后'], { date: 'D-4', value: 1280, type: '清洗后发电量(kWh)' },
color: ['#1890ff', '#52c41a'], { date: 'D-3', value: 920, type: '清洗前发电量(kWh)' },
isGroup: true, { 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() { export default function CleanOptimizationPage() {
const [mapTooltip, setMapTooltip] = useState<any>(null);
const renderPriorityTag = (priority: string) => { const renderPriorityTag = (priority: string) => {
const colorMap: Record<string, string> = { '高': 'red', '中': 'orange', '低': 'green' }; const config: Record<string, any> = {
return <Tag color={colorMap[priority]}>{priority}</Tag>; '高': { 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>;
const renderStatusTag = (status: string) => {
const colorMap: Record<string, string> = { '已审批': 'green', '待确认': 'orange' };
return <Tag color={colorMap[status]}>{status}</Tag>;
}; };
return ( return (
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: 24 }}> <div style={{ background: '#f0f2f5', minHeight: '100vh', padding: '16px 24px' }}>
{/* 顶部标题与操作 */}
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 24 }}>
<div>
<Title level={4} style={{ margin: 0, }}>清洗优化管理</Title>
<Text type="secondary">污染热力分布、AI推荐计划、天气资源联动与清洗收益评估</Text>
</div>
<Space>
<Text type="secondary" style={{ marginRight: 16 }}>更新时间: 2026-05-06 09:30</Text>
<Button icon={<ReloadOutlined />}>刷新</Button>
<Button type="primary">生成清洗建议</Button>
<Button>新增计划</Button>
</Space>
</div>
{/* 顶部指标卡片 */} {/* 顶部指标卡片 */}
<Row gutter={16} style={{ marginBottom: 24 }}> <Row gutter={12} style={{ marginBottom: 16 }}>
<Col span={4}> <Col span={4}>
<Card bordered={false} style={{ borderRadius: 8, height: '100%' }}> <Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<Statistic <div style={{ display: 'flex', justifyContent: 'space-between' }}>
title="污染指数" <div>
value={54.0} <Text type="secondary" style={{ fontSize: 13 }}>污染指数</Text>
precision={1} <div style={{ display: 'flex', alignItems: 'center', gap: 8, margin: '4px 0' }}>
prefix={ <Text style={{ fontSize: 24, fontWeight: 'bold' }}>68.5</Text>
<div style={{ background: '#fff7e6', borderRadius: '50%', width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}> <Tag color="#52c41a" style={{ borderRadius: 10, margin: 0 }}>中等</Tag>
<SunOutlined style={{ color: '#faad14', fontSize: 18 }} /> </div>
<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> </div>
}
valueStyle={{ fontSize: 28, fontWeight: 700 }}
/>
<div style={{ fontSize: 12, color: '#999' }}>较昨日 <span style={{ color: '#ff4d4f' }}>▼ 5.3</span></div>
</Card> </Card>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Card bordered={false} style={{ borderRadius: 8, height: '100%' }}> <Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<Statistic <div style={{ display: 'flex', justifyContent: 'space-between' }}>
title="建议清洗区域数" <div>
value={9} <Text type="secondary" style={{ fontSize: 13 }}>建议清洗区块数</Text>
suffix="/ 22" <div style={{ margin: '4px 0' }}>
prefix={ <Text style={{ fontSize: 24, fontWeight: 'bold' }}>8 / 20</Text>
<div style={{ background: '#e6f7ff', borderRadius: '50%', width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}> </div>
<span style={{ color: '#1890ff', fontSize: 18 }}>▦</span> <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> </div>
}
valueStyle={{ fontSize: 28, fontWeight: 700 }}
/>
<div style={{ fontSize: 12, color: '#999' }}>占比 40%</div>
</Card> </Card>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Card bordered={false} style={{ borderRadius: 8, height: '100%' }}> <Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<Statistic <div style={{ display: 'flex', justifyContent: 'space-between' }}>
title="预计发电提升" <div>
value={12850} <Text type="secondary" style={{ fontSize: 13 }}>预计发电提升</Text>
suffix="kWh" <div style={{ margin: '4px 0' }}>
prefix={ <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#1890ff' }}>12,850</Text>
<div style={{ background: '#f6ffed', borderRadius: '50%', width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}> <Text style={{ fontSize: 14, marginLeft: 4 }}>kWh</Text>
<ArrowUpOutlined style={{ color: '#52c41a', fontSize: 18 }} /> </div>
<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> </div>
}
valueStyle={{ fontSize: 28, fontWeight: 700, color: '#52c41a' }}
/>
<div style={{ fontSize: 12, color: '#999' }}>占昨日发电量 14.2%</div>
</Card> </Card>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Card bordered={false} style={{ borderRadius: 8, height: '100%' }}> <Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<Statistic <div style={{ display: 'flex', justifyContent: 'space-between' }}>
title="预计收益提升" <div>
value={8278} <Text type="secondary" style={{ fontSize: 13 }}>预计收益提升</Text>
prefix={ <div style={{ margin: '4px 0' }}>
<div style={{ background: '#f9f0ff', borderRadius: '50%', width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}> <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#faad14' }}>¥ 7,286</Text>
<span style={{ color: '#722ed1', fontSize: 18 }}>¥</span> </div>
<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> </div>
}
valueStyle={{ fontSize: 28, fontWeight: 700 }}
/>
<div style={{ fontSize: 12, color: '#999' }}>按电价 0.568 元/kWh 计算</div>
</Card> </Card>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Card bordered={false} style={{ borderRadius: 8, height: '100%' }}> <Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<Statistic <div style={{ display: 'flex', justifyContent: 'space-between' }}>
title="上次清洗时间" <div>
value="2025-05-12" <Text type="secondary" style={{ fontSize: 13 }}>上次清洗时间</Text>
prefix={ <div style={{ margin: '4px 0' }}>
<div style={{ background: '#e6f7ff', borderRadius: '50%', width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}> <Text style={{ fontSize: 20, fontWeight: 'bold' }}>2025-05-12</Text>
<CalendarOutlined style={{ color: '#1890ff', fontSize: 18 }} /> </div>
<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> </div>
}
valueStyle={{ fontSize: 20, fontWeight: 700 }}
/>
<div style={{ fontSize: 12, color: '#999' }}>距今 24 天</div>
</Card> </Card>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Card bordered={false} style={{ borderRadius: 8, height: '100%' }}> <Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<Statistic <div style={{ display: 'flex', justifyContent: 'space-between' }}>
title="清洗成本预估" <div>
value={5050} <Text type="secondary" style={{ fontSize: 13 }}>清洗成本预估</Text>
prefix={ <div style={{ margin: '4px 0' }}>
<div style={{ background: '#f9f0ff', borderRadius: '50%', width: 36, height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}> <Text style={{ fontSize: 24, fontWeight: 'bold', color: '#faad14' }}>¥ 3,200</Text>
<span style={{ color: '#722ed1', fontSize: 18 }}>¥</span> </div>
<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> </div>
}
suffix=""
valueStyle={{ fontSize: 28, fontWeight: 700 }}
/>
<div style={{ fontSize: 12, color: '#999' }}>预计单次清洗总成本</div>
</Card> </Card>
</Col> </Col>
</Row> </Row>
{/* 左侧图表区域 */} {/* 标题栏 */}
<Row gutter={16} style={{ marginBottom: 24, height: '500px' }}> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
<Col span={6} style={{ <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
display: 'flex', flexDirection: 'column', gap: 16, height: '100%', overflowY: 'auto', overflowX: 'hidden', scrollbarWidth: 'thin', scrollbarColor: '#ccc transparent' <Title level={4} style={{ margin: 0 }}>清洗优化管理</Title>
}}> <InfoCircleOutlined style={{ color: '#bfbfbf' }} />
<Card </div>
title={<div style={{ padding: '8px' }}> <Space>
<p style={{ color: '#0837A8', margin: 0 }}>污染趋势</p> <Text type="secondary" style={{ fontSize: 12 }}>
<Text type="secondary" style={{ fontSize: 10 }}>近30天污染指数与清洗阈值</Text> <ReloadOutlined style={{ marginRight: 4 }} /> 更新时间:2025-05-24 09:30
</div>} </Text>
bordered={false} <Button icon={<ReloadOutlined />}>刷新</Button>
style={{ borderRadius: 8 }} <Select defaultValue="7d" style={{ width: 100 }}>
> <Option value="7d">近 7 天</Option>
<Line {...pollutionTrendConfig} height={140} /> </Select>
</Card> <Button type="primary" icon={<DownloadOutlined />}>导出报告</Button>
</Space>
</div>
<Card <Row gutter={12} style={{ display: 'flex', alignItems: 'stretch' }}>
title={<div style={{ padding: '8px' }}> {/* 左侧:四个图表 */}
<p style={{ color: '#0837A8', margin: 0 }}>发电损失分析</p> <Col span={5} style={{ display: 'flex', flexDirection: 'column' }}>
<Text type="secondary" style={{ fontSize: 10 }}>污染类型造成的发电损失占比</Text> <Card title={<Text strong>污染趋势</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
</div>} <Line
bordered={false} data={pollutionTrendData}
style={{ borderRadius: 8 }} xField="date"
> yField="value"
{/* 👇 关键:给图表外层套一层固定宽度 + 居中,防止溢出 */} seriesField="type"
<div style={{ color={['#1890ff', '#ff4d4f']}
width: '100%', lineStyle={(type) => {
height: 140, if (type === '阈值') return { lineDash: [4, 4] };
display: 'flex', return {};
alignItems: 'center', }}
justifyContent: 'center', legend={{ position: 'top-right' }}
position: 'relative', height={120}
}}> padding={[10, 10, 30, 30]}
<Pie
{...lossPieConfig}
height={140}
//width="100%" /* 强制宽度100% */
/> />
<div style={{ position: 'absolute', textAlign: 'center' }}> </Card>
<div style={{ fontSize: 12, color: '#666' }}>发电损失</div>
<div style={{ fontSize: 18, fontWeight: 700 }}>9,320 kWh</div> <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' }}>
<Pie
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}%)`;
}
}
}}
height={140}
/>
<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>
</div> </div>
</div> </div>
</Card> </Card>
<Card <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' }}>
title={<div style={{ padding: '8px' }}> <Column
<p style={{ color: '#0837A8', margin: 0 }}>清洗前后对比</p> data={compareBarData}
<Text type="secondary" style={{ fontSize: 10 }}>近一次建议清洗区域发电恢复测算</Text> xField="date"
</div>} yField="value"
bordered={false} isGroup
style={{ borderRadius: 8 }} seriesField="type"
> color={['#1890ff', '#52c41a']}
<Bar {...compareBarConfig} height={140} /> 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>
</Card> </Card>
</Col> </Col>
{/* 中间地图区域 */} {/* 中间:地图 + 工单表格 */}
<Col span={12} style={{ <Col span={12} style={{ display: 'flex', flexDirection: 'column' }}>
display: 'flex', flexDirection: 'column', gap: 16, height: '100%',
}}>
<Card <Card
title={<div style={{ padding: '8px' }}> title={<Text strong>电站污染分布与建议清洗区块</Text>}
<p style={{ color: '#0837A8', margin: 0 }}>电站污染分布与建议清洗区块</p>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Text type="secondary" style={{ fontSize: 12 }}>真实正射底图 · 污染热力叠加 · AI调度优先级</Text>
<div style={{ display: 'flex', gap: 16, marginLeft: 16 }}>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 10, height: 10, background: '#52c41a', borderRadius: '50%', marginRight: 4 }}></span>低污染</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 10, height: 10, background: '#faad14', borderRadius: '50%', marginRight: 4 }}></span>中污染</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 10, height: 10, background: '#ff4d4f', borderRadius: '50%', marginRight: 4 }}></span>重污染</span>
</div>
</div>
</div>}
bordered={false} bordered={false}
style={{ borderRadius: 8, height: '100%' }} style={{ borderRadius: 8, marginBottom: 12, flex: 1, display: 'flex', flexDirection: 'column' }}
bodyStyle={{ padding: 0, flex: 1, position: 'relative' }}
> >
<div style={{ padding: '8px 16px', display: 'flex', justifyContent: 'space-between', borderBottom: '1px solid #f0f0f0' }}>
<div style={{ position: 'relative', height: 380, background: '#f0f2f5', borderRadius: 8, overflow: 'hidden' }}> <Space size={16} style={{ fontSize: 12 }}>
{/* 模拟地图区域 */} <span style={{ color: '#8c8c8c' }}>污染等级:</span>
<div style={{ <Badge color="#ff4d4f" text="优先清洗 (>75)" />
width: '100%', height: '100%', <Badge color="#faad14" text="较高 (50-75)" />
display: 'flex', alignItems: 'center', justifyContent: 'center', <Badge color="#ffec3d" text="中等 (25-50)" />
backgroundImage: 'url(https://via.placeholder.com/800x400)', <Badge color="#b7eb8f" text="较低 (10-25)" />
backgroundSize: 'cover', <Badge color="#52c41a" text="清洁 (<10)" />
backgroundPosition: 'center' </Space>
}}>
<div style={{ position: 'absolute', top: 20, left: 80, background: '#ff4d4f', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域01<br />82.3</div>
<div style={{ position: 'absolute', top: 20, left: 160, background: '#ff4d4f', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域02<br />76.8</div>
<div style={{ position: 'absolute', top: 40, left: 240, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域03<br />63.2</div>
<div style={{ position: 'absolute', top: 60, left: 320, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域04<br />33.6</div>
<div style={{ position: 'absolute', top: 60, left: 400, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域05<br />19.7</div>
<div style={{ position: 'absolute', top: 120, left: 80, background: '#ff4d4f', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域06<br />88.1</div>
<div style={{ position: 'absolute', top: 120, left: 160, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域07<br />68.7</div>
<div style={{ position: 'absolute', top: 120, left: 240, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域08<br />51.2</div>
<div style={{ position: 'absolute', top: 120, left: 320, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域09<br />72.9</div>
<div style={{ position: 'absolute', top: 120, left: 400, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域10<br />36.8</div>
<div style={{ position: 'absolute', top: 180, left: 80, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域11<br />44.6</div>
<div style={{ position: 'absolute', top: 180, left: 160, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域12<br />57.5</div>
<div style={{ position: 'absolute', top: 180, left: 240, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域13<br />61.8</div>
<div style={{ position: 'absolute', top: 180, left: 320, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域14<br />42.1</div>
<div style={{ position: 'absolute', top: 240, left: 80, background: '#ff4d4f', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域15<br />85.6</div>
<div style={{ position: 'absolute', top: 240, left: 160, background: '#faad14', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域16<br />49.8</div>
<div style={{ position: 'absolute', top: 240, left: 240, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域17<br />24.5</div>
<div style={{ position: 'absolute', top: 240, left: 320, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域18<br />13.7</div>
<div style={{ position: 'absolute', top: 240, left: 400, background: '#52c41a', color: '#fff', padding: '4px 8px', borderRadius: 4, fontSize: 12 }}>区域19<br />36.3</div>
{/* 模拟 tooltip */}
{mapTooltip && (
<div style={{ position: 'absolute', bottom: 40, left: 80, background: 'rgba(0,0,0,0.7)', color: '#fff', padding: '8px 12px', borderRadius: 8, fontSize: 14 }}>
<div style={{ fontWeight: 700 }}>{mapTooltip.name}</div>
<div style={{ fontSize: 12 }}>{mapTooltip.desc}</div>
</div> </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 }} />
{/* 区块标记 */}
<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> </div>
{/* 地图控制 */} <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={{ position: 'absolute', top: 16, left: '50%', transform: 'translateX(-50%)', display: 'flex', alignItems: 'center', gap: 16 }}> <div style={{ fontSize: 10 }}>区块 04</div>
<Text type="secondary" style={{ fontSize: 12 }}>底图缩放</Text> <div style={{ fontSize: 12, fontWeight: 'bold' }}>33.6</div>
<Button size="small">适应</Button> </div>
<Button size="small">-</Button> <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' }}>
<Button size="small">+</Button> <div style={{ fontSize: 10 }}>区块 05</div>
<Button size="small">重置</Button> <div style={{ fontSize: 12, fontWeight: 'bold' }}>68.7</div>
<div style={{ marginLeft: 16 }}>90%</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>
</div>
{/* 地图控制按钮 */}
<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>
</div> </div>
</div> </div>
</Card> </Card>
</Col>
{/* 右侧面板 */}
<Col span={6} style={{
display: 'flex', flexDirection: 'column', gap: 16, height: '100%', overflowY: 'auto', overflowX: 'hidden', scrollbarWidth: 'thin', scrollbarColor: '#ccc transparent'
}}>
<Card <Card
title={<span style={{ color: '#0837A8', }}>智能清洗建议</span>} title={<Text strong>清洗工单预览</Text>}
bordered={false} bordered={false}
style={{ borderRadius: 8, marginBottom: 16, flex: 1, display: "flex", flexDirection: "column" }} style={{ borderRadius: 8, flex: 'none' }}
extra={<div style={{ display: 'flex', alignItems: 'center' }}><Text type="secondary" style={{ fontSize: 12 }}>优先级、天气适宜度与收益提升联动排序</Text><Tag color="blue" style={{ marginLeft: 8 }}>AI推荐</Tag></div>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
bodyStyle={{ padding: 0 }}
> >
{/* 👇 关键:填满卡片 + 超长滚动 */}
<div style={{
flex: 1,
overflow: "auto",
// 滚动条样式 #ccc + 透明
"&::-webkit-scrollbar": { width: "6px" },
"&::-webkit-scrollbar-thumb": { backgroundColor: "#ccc", borderRadius: "3px" },
"&::-webkit-scrollbar-track": { backgroundColor: "transparent" },
}}>
<Table <Table
columns={[ columns={[
{ title: '计划', dataIndex: 'id', width: 80 }, { title: '区块', dataIndex: 'area', width: 100 },
{ title: '优先级', dataIndex: 'priority', render: renderPriorityTag, width: 80 }, { title: '优先级', dataIndex: 'priority', width: 80, render: renderPriorityTag },
{ title: '建议区域', dataIndex: 'area', width: 100 }, { 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"
/>
</Card>
</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>
</div>
<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: 'boost', width: 100 },
{ title: '天气', dataIndex: 'weather', width: 80 }, { 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} dataSource={smartCleanPlanData}
pagination={false} pagination={false}
size="small" size="small"
scroll={{ y: undefined }}
/> />
</div>
</Card>
<Card
title={<span style={{ color: '#0837A8', flex: 1 }}>天气与资源参考</span>}
bordered={false}
style={{ borderRadius: 8, marginBottom: 16 }}
extra={<Text type="secondary" style={{ fontSize: 12 }}>未来7天作业窗口、风速、湿度、降水概率</Text>}
>
<div style={{ display: 'flex', gap: 8 }}>
{['05-06', '05-07', '05-08', '05-09'].map((day, idx) => (
<Button key={idx} size="small" style={{ flex: 1 }}>{day}</Button>
))}
</div>
</Card> </Card>
<Card <Card title={<Text strong>清洗方案建议</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
title={<span style={{ color: '#0837A8', flex: 1 }}>清洗方案建议</span>} <Row gutter={12}>
bordered={false} <Col span={12}>
style={{ borderRadius: 8 }} <div style={{ border: '1px solid #f0f0f0', borderRadius: 8, padding: '12px', background: '#f9f0ff' }}>
extra={<Text type="secondary" style={{ fontSize: 12 }}>机器人清洗与人工清洗资源对比</Text>} <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' }}>
<div style={{ display: 'flex', gap: 8 }}> <Bot size={18} color="#fff" />
<Button size="small" style={{ flex: 1 }} icon={<span>🤖</span>}>清洗机器人方案</Button> </div>
<Button size="small" style={{ flex: 1 }} icon={<span>👷</span>}>人工清洗方案</Button> <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> </div>
</Card>
</Col> </Col>
</Row> </Row>
{/* 工单预览区域 */}
<Card
title={<span style={{ color: '#0837A8', }}>清洗工单预览</span>}
bordered={false}
style={{ borderRadius: 8, marginBottom: 24 }}
extra={<div style={{ display: 'flex', alignItems: 'center' }}><Text type="secondary" style={{ fontSize: 12 }}>AI推荐计划转工单、转任务仍保留现有接口</Text><Button type="link" size="small">新增</Button></div>}
>
<Table
columns={[
{ title: '区域', dataIndex: 'area' },
{ title: '优先级', dataIndex: 'priority', render: renderPriorityTag, width: 100 },
{ title: '预计工时', dataIndex: 'duration', width: 100 },
{ title: '负责人', dataIndex: 'handler', width: 120 },
{ title: '计划时间', dataIndex: 'planTime', width: 180 },
{ title: '状态', dataIndex: 'status', render: renderStatusTag, width: 100 },
{
title: '操作', width: 120, render: () => (
<Space>
<Button type="link" size="small">编辑</Button>
<Button type="link" size="small">生成</Button>
</Space>
)
}
]}
dataSource={workOrderPreviewData}
pagination={false}
/>
</Card> </Card>
{/* 清洗影响评估 */} <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' }}>
<Card
title={<span style={{ color: '#0837A8', }}>清洗影响评估</span>}
bordered={false}
style={{ borderRadius: 8, marginBottom: 24 }}
extra={<Text type="secondary" style={{ fontSize: 12 }}>预计用水、耗时、碳减排与作业风险综合判断</Text>}
>
<Row gutter={16}> <Row gutter={16}>
<Col span={6}> <Col span={8}>
<div style={{ padding: 16, background: '#f5f7fa', borderRadius: 8 }}> <div style={{ textAlign: 'center', padding: '8px', background: '#fafafa', borderRadius: 8 }}>
<div style={{ fontSize: 12, color: '#666' }}>预计用水量</div> <div style={{ fontSize: 11, color: '#8c8c8c' }}>05-26</div>
<div style={{ fontSize: 24, fontWeight: 700, marginTop: 4 }}>18 吨</div> <SunOutlined style={{ fontSize: 20, color: '#faad14', margin: '4px 0' }} />
<div style={{ fontSize: 12, color: '#999', marginTop: 4 }}>节水率 30%(机器人)</div> <div style={{ fontSize: 11 }}>多云</div>
<div style={{ fontSize: 11, fontWeight: 'bold' }}>18~28℃</div>
</div> </div>
</Col> </Col>
<Col span={6}> <Col span={8}>
<div style={{ padding: 16, background: '#f5f7fa', borderRadius: 8 }}> <div style={{ textAlign: 'center', padding: '8px', background: '#fafafa', borderRadius: 8 }}>
<div style={{ fontSize: 12, color: '#666' }}>预计耗时</div> <div style={{ fontSize: 11, color: '#8c8c8c' }}>05-27</div>
<div style={{ fontSize: 24, fontWeight: 700, marginTop: 4 }}>12 小时</div> <SunOutlined style={{ fontSize: 20, color: '#faad14', margin: '4px 0' }} />
<div style={{ fontSize: 12, color: '#999', marginTop: 4 }}>并行作业 2 组</div> <div style={{ fontSize: 11 }}>晴</div>
<div style={{ fontSize: 11, fontWeight: 'bold' }}>19~30℃</div>
</div> </div>
</Col> </Col>
<Col span={6}> <Col span={8}>
<div style={{ padding: 16, background: '#f5f7fa', borderRadius: 8 }}> <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<div style={{ fontSize: 12, color: '#666' }}>碳减排量</div> <div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<div style={{ fontSize: 24, fontWeight: 700, marginTop: 4 }}>6.85 吨</div> <Wind size={14} color="#8c8c8c" />
<div style={{ fontSize: 12, color: '#999', marginTop: 4 }}>CO₂ 减排量</div> <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>
<Col span={6}>
<div style={{ padding: 16, background: '#f5f7fa', borderRadius: 8 }}>
<div style={{ fontSize: 12, color: '#666' }}>作业风险</div>
<div style={{ fontSize: 24, fontWeight: 700, marginTop: 4 }}>低风险</div>
<div style={{ fontSize: 12, color: '#999', marginTop: 4 }}>天气和通道安全可控</div>
</div> </div>
</Col> </Col>
</Row> </Row>
</Card> </Card>
{/* 业务入口 */} <Card title={<Text strong>清洗影响评估</Text>} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
<Card bordered={false} style={{ borderRadius: 8 }}> <Row gutter={[12, 12]}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}> <Col span={12}>
<div> <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<Title level={5} style={{ margin: 0, color: '#0837A8' }}>业务入口</Title> <div style={{ width: 36, height: 36, borderRadius: 8, background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Text type="secondary" style={{ fontSize: 12 }}>区域维护、计划审批、任务完成与效果评估仍使用现有接口和权限。</Text> <Droplets size={18} color="#1890ff" />
</div> </div>
<Space> <div>
<Button>新增区域</Button> <div style={{ fontSize: 11, color: '#8c8c8c' }}>预计用水量</div>
<Button>新增计划</Button> <div style={{ fontSize: 14, fontWeight: 'bold' }}>18 <Text style={{ fontSize: 11 }}>吨</Text></div>
<Button>新增</Button> <div style={{ fontSize: 9, color: '#52c41a' }}>节水率 30% (机器人)</div>
</Space> </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>
</div> </div>
</Card> </Card>
</Col>
</Row>
</div> </div>
); );
} }

View File

@@ -1,35 +1,47 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { import {
Layout, Card, Row, Col, Button, Table, Tag, Select, Input, Typography, Space, Layout, Card, Row, Col, Button, Table, Tag, Select, Input, Typography, Space,
Statistic, message, Drawer, Descriptions, Timeline, Divider, Form, Modal Statistic, Modal, message, Empty, Drawer, Descriptions, Timeline, Divider, Form, Tabs, Progress, Badge, DatePicker, Pagination
} from 'antd'; } from 'antd';
import { import {
PlusOutlined, SearchOutlined, EditOutlined, EyeOutlined, CheckOutlined, ClockCircleOutlined, ControlOutlined,
ClockCircleOutlined, CheckCircleOutlined, PlayCircleOutlined, BarChartOutlined, RiseOutlined, ArrowUpOutlined,
CloseCircleOutlined, ThunderboltOutlined, SettingOutlined, SearchOutlined, PlusOutlined, EditOutlined, DeleteOutlined,
SendOutlined, PauseOutlined, ArrowRightOutlined, FileDoneOutlined, EyeOutlined, CommentOutlined, PauseOutlined, FormOutlined,
RobotOutlined, CloudOutlined, RiseOutlined, ReloadOutlined, FilterOutlined, MoreOutlined,
BranchesOutlined CheckCircleFilled, PlayCircleFilled, InfoCircleFilled,
RobotOutlined, ThunderboltOutlined, AlertOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Pie, Line, Bar } from '@ant-design/charts'; import { Pie, Line } from '@ant-design/charts';
import dayjs from 'dayjs'; import {
ClipboardList,
Clock,
Play,
CheckCircle,
Timer,
Cpu,
Calendar as CalendarIcon,
ChevronRight,
History,
ExternalLink
} from 'lucide-react';
const { Option } = Select; const { Option } = Select;
const { Search } = Input; const { Search } = Input;
const { Text, Title } = Typography; const { Text, Title } = Typography;
const { RangePicker } = DatePicker;
// 模拟数据(完全匹配参考图) // 模拟数据
const workOrderList = [ const workOrderData = [
{ {
id: 'WO20250524001', id: 'WO20250524001',
title: '逆变器 INV-05 告警排查', title: '逆变器 INV-05 告警排查',
source: 'AI诊断', source: 'AI诊断',
type: '检修', type: '检修',
priority: 'high', priority: 'high',
status: 'pending',
handler: '李工', handler: '李工',
deadline: '2025-05-24 14:30', deadline: '2025-05-24 14:30',
status: 'pending',
description: ''
}, },
{ {
id: 'WO20250524002', id: 'WO20250524002',
@@ -37,10 +49,9 @@ const workOrderList = [
source: '无人机巡检', source: '无人机巡检',
type: '巡检', type: '巡检',
priority: 'high', priority: 'high',
status: 'processing',
handler: '王工', handler: '王工',
deadline: '2025-05-24 15:00', deadline: '2025-05-24 15:00',
status: 'processing',
description: '对AI识别热斑区域进行复检与红外复核,确认是否需要更换组件。'
}, },
{ {
id: 'WO20250524003', id: 'WO20250524003',
@@ -48,10 +59,9 @@ const workOrderList = [
source: '清洗优化', source: '清洗优化',
type: '清洗', type: '清洗',
priority: 'medium', priority: 'medium',
status: 'dispatched',
handler: '赵工', handler: '赵工',
deadline: '2025-05-24 16:00', deadline: '2025-05-24 16:00',
status: 'dispatched',
description: ''
}, },
{ {
id: 'WO20250524004', id: 'WO20250524004',
@@ -59,10 +69,9 @@ const workOrderList = [
source: '视频监控', source: '视频监控',
type: '维修', type: '维修',
priority: 'medium', priority: 'medium',
status: 'processing',
handler: '陈工', handler: '陈工',
deadline: '2025-05-24 17:30', deadline: '2025-05-24 17:30',
status: 'processing',
description: ''
}, },
{ {
id: 'WO20250524005', id: 'WO20250524005',
@@ -70,10 +79,9 @@ const workOrderList = [
source: '装备控制', source: '装备控制',
type: '运维', type: '运维',
priority: 'low', priority: 'low',
status: 'pending',
handler: '刘工', handler: '刘工',
deadline: '2025-05-24 18:00', deadline: '2025-05-24 18:00',
status: 'pending',
description: ''
}, },
{ {
id: 'WO20250524006', id: 'WO20250524006',
@@ -81,78 +89,46 @@ const workOrderList = [
source: '人工创建', source: '人工创建',
type: '巡检', type: '巡检',
priority: 'medium', priority: 'medium',
status: 'completed',
handler: '张运维', handler: '张运维',
deadline: '2025-05-24 21:00', deadline: '2025-05-24 21:00',
status: 'completed',
description: ''
} }
]; ];
// 工单状态配置 // 工单状态配置
const statusConfig = { const statusConfig = {
pending: { label: '待处理', color: '#1890ff', icon: <ClockCircleOutlined /> }, pending: { label: '待处理', color: '#52c41a', textColor: '#1890ff', bg: '#e6f7ff', border: '#91d5ff' },
dispatched: { label: '已派发', color: '#52c41a', icon: <SendOutlined /> }, dispatched: { label: '已派发', color: '#52c41a', textColor: '#52c41a', bg: '#f6ffed', border: '#b7eb8f' },
processing: { label: '执行中', color: '#2f54eb', icon: <PlayCircleOutlined /> }, processing: { label: '执行中', color: '#1890ff', textColor: '#1890ff', bg: '#e6f7ff', border: '#91d5ff' },
suspended: { label: '挂起', color: '#faad14', icon: <PauseOutlined /> }, completed: { label: '已完成', color: '#52c41a', textColor: '#52c41a', bg: '#f6ffed', border: '#b7eb8f' },
completed: { label: '已完成', color: '#52c41a', icon: <CheckCircleOutlined /> }, suspended: { label: '已挂起', color: '#faad14', textColor: '#faad14', bg: '#fff7e6', border: '#ffe7ba' }
closed: { label: '已关闭', color: '#8c8c8c', icon: <CloseCircleOutlined /> }
}; };
// 优先级配置 // 优先级配置
const priorityConfig = { const priorityConfig = {
low: { label: '低', color: '#52c41a' }, low: { label: '低', color: '#52c41a', bg: '#f6ffed' },
medium: { label: '中', color: '#faad14' }, medium: { label: '中', color: '#faad14', bg: '#fff7e6' },
high: { label: '高', color: '#ff4d4f' }, high: { label: '高', color: '#ff4d4f', bg: '#fff1f0' }
urgent: { label: '紧急', color: '#f5222d' }
}; };
// 统计卡片数据 const WorkOrderPage = () => {
const overviewCards = [ const [activeTab, setActiveTab] = useState('1');
{ title: '今日新增工单', value: 18, suffix: '单', desc: '较昨日 +3', color: '#1890ff', icon: <FileDoneOutlined /> }, const [selectedRowKey, setSelectedRowKey] = useState('WO20250524002');
{ title: '待处理工单', value: 12, suffix: '单', desc: '高优先级 5', color: '#ff4d4f', icon: <ClockCircleOutlined /> },
{ title: '执行中工单', value: 9, suffix: '单', desc: '按时率 92%', color: '#52c41a', icon: <PlayCircleOutlined /> },
{ title: '已完成工单', value: 126, suffix: '单', desc: '本月累计', color: '#52c41a', icon: <CheckCircleOutlined /> },
{ title: '平均处理时长', value: 4.3, suffix: '小时', desc: '较上周 -12% ↓', color: '#1890ff', icon: <ClockCircleOutlined /> },
{ title: 'AI建议生成', value: 7, suffix: '单', desc: '今日自动生成', color: '#722ed1', icon: <RobotOutlined /> }
];
// 任务排班数据 // 统计数据
const scheduleData = [ const stats = [
{ handler: '李工', tasks: [{ title: 'INV-05 告警排查', time: '08:30 - 12:00', type: 'alarm' }] }, { title: '今日新增工单', value: 18, subValue: '+3', subText: '较昨日', icon: <ClipboardList size={24} color="#1890ff" />, bg: '#e6f7ff' },
{ handler: '王工', tasks: [{ title: 'B-12 热斑复检', time: '13:30 - 15:00', type: 'inspect' }] }, { title: '待处理工单', value: 12, subValue: '5', subText: '高优先级', icon: <Clock size={24} color="#ff4d4f" />, bg: '#fff1f0' },
{ handler: '赵工', tasks: [{ title: '组件清洗 C-05', time: '09:00 - 12:00', type: 'clean' }, { title: '清洗效果复检', time: '15:00 - 17:00', type: 'clean' }] }, { title: '执行中工单', value: 9, subValue: '92%', subText: '按时率', icon: <Play size={24} color="#52c41a" />, bg: '#f6ffed' },
{ handler: '陈工', tasks: [{ title: '周界摄像头修复', time: '10:00 - 12:30', type: 'repair' }, { title: '设备巡检', time: '15:30 - 17:30', type: 'inspect' }] } { title: '已完成工单', value: 126, subValue: '', subText: '本月累计', icon: <CheckCircle size={24} color="#52c41a" />, bg: '#f6ffed' },
]; { title: '平均处理时长', value: 4.3, unit: '小时', subValue: '-12%', subText: '较上周', icon: <Timer size={24} color="#1890ff" />, bg: '#e6f7ff' },
{ title: 'AI建议生成', value: 7, unit: '单', subValue: '', subText: '今日自动生成', icon: <Cpu size={24} color="#722ed1" />, bg: '#f9f0ff' },
];
// 告警趋势数据 // 表格列
const alarmTrendData = [
{ date: '05-18', count: 5 },
{ date: '05-19', count: 10 },
{ date: '05-20', count: 5 },
{ date: '05-21', count: 5 },
{ date: '05-22', count: 12 },
{ date: '05-23', count: 10 },
{ date: '05-24', count: 12 }
];
// 告警列表数据
const alarmList = [
{ name: 'INV-05 逆变器告警', time: '05-24 10:24' },
{ name: 'B-12 区块热斑告警', time: '05-24 09:56' },
{ name: 'B-12 组件温度异常', time: '05-24 09:32' }
];
export default function WorkOrderPage() {
const [selectedOrder, setSelectedOrder] = useState(workOrderList[1]); // 默认选中执行中的工单
const [drawerVisible, setDrawerVisible] = useState(false);
const [editModalVisible, setEditModalVisible] = useState(false);
const [editingOrder, setEditingOrder] = useState(null);
const [editForm] = Form.useForm();
// 表格列定义
const columns = [ const columns = [
{ title: '工单编号', dataIndex: 'id', key: 'id', width: 140 }, { title: '工单编号', dataIndex: 'id', key: 'id', width: 130 },
{ title: '工单标题', dataIndex: 'title', key: 'title' }, { title: '工单标题', dataIndex: 'title', key: 'title', width: 180, ellipsis: true },
{ title: '来源', dataIndex: 'source', key: 'source', width: 100 }, { title: '来源', dataIndex: 'source', key: 'source', width: 100 },
{ title: '类型', dataIndex: 'type', key: 'type', width: 80 }, { title: '类型', dataIndex: 'type', key: 'type', width: 80 },
{ {
@@ -160,62 +136,89 @@ export default function WorkOrderPage() {
dataIndex: 'priority', dataIndex: 'priority',
key: 'priority', key: 'priority',
width: 80, width: 80,
render: (priority) => ( render: (p) => (
<Tag color={priorityConfig[priority]?.color} style={{ borderRadius: 4 }}> <Tag color={priorityConfig[p].bg} style={{ color: priorityConfig[p].color, border: `1px solid ${priorityConfig[p].color}`, borderRadius: 4 }}>
{priorityConfig[priority]?.label} {priorityConfig[p].label}
</Tag> </Tag>
) )
}, },
{ title: '负责人', dataIndex: 'handler', key: 'handler', width: 80 }, { title: '负责人', dataIndex: 'handler', key: 'handler', width: 80 },
{ title: '截止时间', dataIndex: 'deadline', key: 'deadline', width: 160 }, { title: '截止时间', dataIndex: 'deadline', key: 'deadline', width: 150 },
{ {
title: '状态', title: '状态',
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
width: 100, width: 90,
render: (status) => ( render: (s) => (
<Tag color={statusConfig[status]?.color} style={{ borderRadius: 4 }}> <span style={{ color: statusConfig[s].textColor }}>{statusConfig[s].label}</span>
{statusConfig[status]?.label}
</Tag>
) )
}, },
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 80, width: 60,
render: (_, record) => ( render: () => <Button type="link" size="small">查看</Button>
<Button type="link" size="small" onClick={() => { setSelectedOrder(record); setDrawerVisible(true); }}> },
查看
</Button>
)
}
]; ];
// 工单状态分布饼图数据 // 图表数据
const pieData = [ const pieData = [
{ type: '待处理', value: 12, color: '#1890ff' }, { type: '待处理', value: 12 },
{ type: '执行中', value: 9, color: '#2f54eb' }, { type: '执行中', value: 9 },
{ type: '已完成', value: 126, color: '#52c41a' }, { type: '已完成', value: 126 },
{ type: '已挂起', value: 4, color: '#faad14' } { type: '已挂起', value: 4 },
];
const alarmTrendData = [
{ date: '05-18', value: 5 },
{ date: '05-19', value: 10 },
{ date: '05-20', value: 7 },
{ date: '05-21', value: 12 },
{ date: '05-22', value: 8 },
{ date: '05-23', value: 15 },
{ date: '05-24', value: 11 },
]; ];
return ( return (
<div style={{ padding: 20, background: '#f5f7fa', minHeight: '100vh' }}> <div style={{ padding: '16px 24px', background: '#f0f2f5', minHeight: '100vh' }}>
{/* 顶部统计卡片 */} {/* 顶部标题和页签 */}
<Row gutter={16} style={{ marginBottom: 20 }}> <div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
{overviewCards.map((card, idx) => ( <Title level={4} style={{ margin: '0 32px 0 0' }}>工单任务</Title>
<Col span={4} key={idx}> <Tabs
<Card bordered={false} style={{ borderRadius: 8, height: 120 }}> activeKey={activeTab}
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> onChange={setActiveTab}
items={[
{ key: '1', label: '工单总览' },
{ key: '2', label: '待处理工单' },
{ key: '3', label: '执行中' },
{ key: '4', label: '已完成' },
{ key: '5', label: '工单模板' },
]}
tabBarStyle={{ marginBottom: 0 }}
/>
</div>
{/* 统计卡片 */}
<Row gutter={16} style={{ marginBottom: 16 }}>
{stats.map((item, index) => (
<Col span={4} key={index}>
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div> <div>
<div style={{ fontSize: 14, color: '#666' }}>{card.title}</div> <Text type="secondary" style={{ fontSize: 13 }}>{item.title}</Text>
<div style={{ fontSize: 28, fontWeight: 700, color: card.color, margin: '8px 0' }}> <div style={{ margin: '4px 0' }}>
{card.value} <span style={{ fontSize: 14, fontWeight: 400 }}>{card.suffix}</span> <Text style={{ fontSize: 24, fontWeight: 'bold' }}>{item.value}</Text>
{item.unit && <Text style={{ fontSize: 14, marginLeft: 4 }}>{item.unit}</Text>}
</div> </div>
<div style={{ fontSize: 12, color: '#999' }}>{card.desc}</div> <div style={{ fontSize: 12 }}>
<Text type="secondary">{item.subText}</Text>
<Text style={{ marginLeft: 4, color: item.subValue.startsWith('+') ? '#52c41a' : item.subValue.startsWith('-') ? '#ff4d4f' : '#1890ff', fontWeight: 'bold' }}>
{item.subValue}
</Text>
</div> </div>
<div style={{ width: 48, height: 48, borderRadius: '50%', background: `${card.color}15`, display: 'flex', alignItems: 'center', justifyContent: 'center', color: card.color, fontSize: 20 }}> </div>
{card.icon} <div style={{ width: 48, height: 48, borderRadius: '50%', background: item.bg, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
{item.icon}
</div> </div>
</div> </div>
</Card> </Card>
@@ -224,110 +227,152 @@ export default function WorkOrderPage() {
</Row> </Row>
{/* 筛选栏 */} {/* 筛选栏 */}
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 20, gap: 16, flexWrap: 'wrap' }}> <Card bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ borderRadius: 8, marginBottom: 16 }}>
<Select placeholder="工单类型" style={{ width: 120 }} defaultValue="all"> <Row gutter={16} align="middle">
<Col span={3}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>工单类型</Text>
<Select defaultValue="all" style={{ width: '100%' }}>
<Option value="all">全部</Option> <Option value="all">全部</Option>
<Option value="inspect">巡检</Option>
<Option value="repair">维修</Option>
<Option value="clean">清洗</Option>
</Select> </Select>
<Select placeholder="优先级" style={{ width: 120 }} defaultValue="all"> </div>
</Col>
<Col span={3}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>优先级</Text>
<Select defaultValue="all" style={{ width: '100%' }}>
<Option value="all">全部</Option> <Option value="all">全部</Option>
<Option value="high">高</Option>
<Option value="medium">中</Option>
<Option value="low">低</Option>
</Select> </Select>
<Select placeholder="负责人" style={{ width: 120 }} defaultValue="all"> </div>
</Col>
<Col span={3}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>负责人</Text>
<Select defaultValue="all" style={{ width: '100%' }}>
<Option value="all">全部</Option> <Option value="all">全部</Option>
<Option value="李工">李工</Option>
<Option value="王工">王工</Option>
<Option value="赵工">赵工</Option>
</Select> </Select>
<Space> </div>
<span>时间范围</span> </Col>
<Input style={{ width: 180 }} value="2025-05-24 ~ 2025-05-24" readOnly /> <Col span={5}>
</Space> <div style={{ display: 'flex', alignItems: 'center' }}>
<Select placeholder="状态" style={{ width: 120 }} defaultValue="all"> <Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>时间范围</Text>
<RangePicker style={{ width: '100%' }} />
</div>
</Col>
<Col span={3}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>状态</Text>
<Select defaultValue="all" style={{ width: '100%' }}>
<Option value="all">全部</Option> <Option value="all">全部</Option>
<Option value="pending">待处理</Option>
<Option value="processing">执行中</Option>
<Option value="completed">已完成</Option>
</Select> </Select>
<Input placeholder="请输入工单编号/标题" style={{ width: 240 }} prefix={<SearchOutlined />} /> </div>
</Col>
<Col span={4}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>关键词</Text>
<Input placeholder="请输入工单编号/标题" suffix={<SearchOutlined />} />
</div>
</Col>
<Col span={3} style={{ textAlign: 'right' }}>
<Space> <Space>
<Button>重置</Button> <Button>重置</Button>
<Button type="primary">查询</Button> <Button type="primary">查询</Button>
</Space> </Space>
</div> </Col>
</Row>
<Row gutter={16}>
{/* 左侧工单列表 */}
<Col span={14}>
<Card bordered={false} style={{ borderRadius: 8, marginBottom: 20 }} title="工单列表(共 147 条)">
<Table
rowKey="id"
columns={columns}
dataSource={workOrderList}
pagination={{ pageSize: 15, showSizeChanger: true, showTotal: (total) => `共 ${total} 条` }}
scroll={{ x: 'max-content' }}
rowClassName={(record) => record.id === selectedOrder?.id ? 'selected-row' : ''}
onRow={(record) => ({ onClick: () => setSelectedOrder(record) })}
/>
<style>{`
.selected-row { background-color: #e6f7ff !important; }
`}</style>
</Card> </Card>
{/* 工单状态分布 + 任务排班 */}
<Row gutter={16}> <Row gutter={16}>
<Col span={8}> {/* 左侧:列表 + 底部图表 */}
<Card bordered={false} style={{ borderRadius: 8 }} title="工单状态分布"> <Col span={15}>
<Card
bordered={false}
title={<div style={{ display: 'flex', alignItems: 'center' }}><Text strong style={{ fontSize: 16 }}>工单列表</Text><Text type="secondary" style={{ fontSize: 12, marginLeft: 8 }}>(共 147 条)</Text></div>}
bodyStyle={{ padding: 0 }}
style={{ borderRadius: 8, marginBottom: 16 }}
>
<Table
dataSource={workOrderData}
columns={columns}
pagination={false}
size="middle"
rowKey="id"
scroll={{ x: 'max-content' }}
rowSelection={{
type: 'radio',
selectedRowKeys: [selectedRowKey],
onChange: (keys) => setSelectedRowKey(keys[0] as string)
}}
/>
<div style={{ padding: '16px', textAlign: 'right' }}>
<Pagination size="small" total={147} showSizeChanger showQuickJumper />
</div>
</Card>
<Row gutter={16}>
<Col span={10}>
<Card bordered={false} title="工单状态分布" style={{ borderRadius: 8, height: 360 }}>
<div style={{ height: 280, position: 'relative' }}>
<Pie <Pie
data={pieData} data={pieData}
angleField="value" angleField="value"
colorField="type" colorField="type"
color={['#1890ff', '#2f54eb', '#52c41a', '#faad14']} radius={1}
radius={0.8}
innerRadius={0.6} innerRadius={0.6}
height={180} label={false}
label={{ legend={{
formatter: (datum) => `${datum.value} (${((datum.value / 147) * 100).toFixed(2)}%)` position: 'right',
layout: 'vertical',
itemValueLabel: {
formatter: (text, item) => {
const total = pieData.reduce((a, b) => a + b.value, 0);
const percent = ((item.value / total) * 100).toFixed(2);
return `${item.value} (${percent}%)`;
}
}
}} }}
interactions={[{ type: 'pie-legend-active' }]} height={240}
/> />
<div style={{ textAlign: 'center', marginTop: -120 }}> <div style={{ position: 'absolute', top: '42%', left: '30%', textAlign: 'center', transform: 'translate(-50%, -50%)' }}>
<div style={{ fontSize: 16, fontWeight: 600 }}>总数</div> <div style={{ fontSize: 14, color: '#8c8c8c' }}>总数</div>
<div style={{ fontSize: 24, fontWeight: 700 }}>147</div> <div style={{ fontSize: 24, fontWeight: 'bold' }}>147</div>
</div>
</div> </div>
</Card> </Card>
</Col> </Col>
<Col span={16}> <Col span={14}>
<Card bordered={false} style={{ borderRadius: 8 }} title={<div style={{ display: 'flex', justifyContent: 'space-between' }}><span>任务排班 / 日历视图</span><Button type="link">更多 </Button></div>}> <Card
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}> bordered={false}
<Button type="text" icon={<ArrowRightOutlined style={{ transform: 'rotate(180deg)' }} />} /> title="任务排班 / 日历视图"
<span style={{ margin: '0 16px' }}>2025-05-24 (今天)</span> extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
<Button type="text" icon={<ArrowRightOutlined />} /> style={{ borderRadius: 8, height: 360 }}
</div> >
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}> <div style={{ marginBottom: 12 }}>
{scheduleData.map((item, idx) => ( <Space>
<div key={idx} style={{ display: 'flex', alignItems: 'center', gap: 16 }}> <Button size="small" icon={<ChevronRight style={{ transform: 'rotate(180deg)' }} size={14} />} />
<div style={{ width: 60, textAlign: 'right' }}>{item.handler}</div> <Text strong>2025-05-24 (今天)</Text>
<div style={{ flex: 1, display: 'flex', gap: 16, height: 40, alignItems: 'center', position: 'relative' }}> <Button size="small" icon={<ChevronRight size={14} />} />
<div style={{ position: 'absolute', left: 0, right: 0, height: 1, background: '#e8e8e8', zIndex: 0 }} /> </Space>
{item.tasks.map((task, i) => (
<div key={i} style={{
background: task.type === 'alarm' ? '#e6ffed' : task.type === 'inspect' ? '#e6f7ff' : task.type === 'clean' ? '#f9f0ff' : '#fff7e6',
border: '1px solid #d9d9d9',
borderRadius: 4,
padding: '4px 8px',
fontSize: 12,
zIndex: 1
}}>
<div>{task.title}</div>
<div style={{ color: '#666' }}>{task.time}</div>
</div> </div>
<div style={{ border: '1px solid #f0f0f0', borderRadius: 4, overflow: 'hidden' }}>
<div style={{ display: 'flex', background: '#fafafa', borderBottom: '1px solid #f0f0f0' }}>
<div style={{ width: 60, padding: '8px', borderRight: '1px solid #f0f0f0' }}></div>
{['08:00', '10:00', '12:00', '14:00', '16:00', '18:00'].map(t => (
<div key={t} style={{ flex: 1, padding: '8px', textAlign: 'center', fontSize: 12 }}>{t}</div>
))} ))}
</div> </div>
{['李工', '王工', '赵工', '陈工'].map((name, idx) => (
<div key={name} style={{ display: 'flex', borderBottom: idx === 3 ? 'none' : '1px solid #f0f0f0', height: 50, position: 'relative' }}>
<div style={{ width: 60, padding: '8px', borderRight: '1px solid #f0f0f0', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12 }}>{name}</div>
<div style={{ flex: 1, position: 'relative' }}>
{idx === 0 && <div style={{ position: 'absolute', left: '10%', top: 5, width: '40%', height: 40, background: '#f6ffed', border: '1px solid #b7eb8f', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>INV-05 告警排查<br />08:30 - 12:00</div>}
{idx === 1 && <div style={{ position: 'absolute', left: '55%', top: 5, width: '30%', height: 40, background: '#e6f7ff', border: '1px solid #91d5ff', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>B-12 热斑复检<br />13:30 - 15:00</div>}
{idx === 1 && <div style={{ position: 'absolute', left: '86%', top: 5, width: '12%', height: 40, background: '#f0f5ff', border: '1px solid #adc6ff', borderRadius: 4, borderStyle: 'dashed', padding: '2px 4px', fontSize: 10 }}>无人机巡检<br />16:00-18:00</div>}
{idx === 2 && <div style={{ position: 'absolute', left: '20%', top: 5, width: '35%', height: 40, background: '#f9f0ff', border: '1px solid #d3adf7', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>组件清洗 C-05<br />09:00 - 12:00</div>}
{idx === 2 && <div style={{ position: 'absolute', left: '70%', top: 5, width: '25%', height: 40, background: '#fff7e6', border: '1px solid #ffe7ba', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>清洗效果复检<br />15:00 - 17:00</div>}
{idx === 3 && <div style={{ position: 'absolute', left: '30%', top: 5, width: '30%', height: 40, background: '#fff2e8', border: '1px solid #ffbb96', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>周界摄像头修复<br />10:00 - 12:30</div>}
{idx === 3 && <div style={{ position: 'absolute', left: '75%', top: 5, width: '20%', height: 40, background: '#fffbe6', border: '1px solid #ffe58f', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>设备巡检<br />15:30 - 17:30</div>}
</div>
</div> </div>
))} ))}
</div> </div>
@@ -336,177 +381,145 @@ export default function WorkOrderPage() {
</Row> </Row>
</Col> </Col>
{/* 右侧工单详情面板 */} {/* 右侧:详情 + AI + 告警 */}
<Col span={10}> <Col span={9}>
<Card bordered={false} style={{ borderRadius: 8, marginBottom: 16 }} title={ <Card
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}> bordered={false}
<div> style={{ borderRadius: 8, marginBottom: 16 }}
<Title level={5} style={{ margin: 0 }}>{selectedOrder?.title}</Title> bodyStyle={{ padding: '16px' }}
<Tag color="red" size="small">高优先级</Tag> >
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 16 }}>
<Text strong style={{ fontSize: 16 }}>工单详情</Text>
<Text type="secondary" style={{ fontSize: 12 }}>工单编号: WO20250524002</Text>
</div> </div>
<Text type="secondary">工单编号: {selectedOrder?.id}</Text>
<div style={{ marginBottom: 20 }}>
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
<Title level={4} style={{ margin: '0 12px 0 0' }}>区块 B-12 热斑复检</Title>
<Tag color="#fff1f0" style={{ color: '#ff4d4f', border: '1px solid #ff4d4f' }}>高优先级</Tag>
</div> </div>
}>
<Row gutter={16} style={{ marginBottom: 16 }}> <Row gutter={[0, 12]}>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>来源:</span><span>{selectedOrder?.source}</span></div></Col> <Col span={12}><Text type="secondary">来源:</Text><Text>无人机巡检</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>工单类型:</span><span>{selectedOrder?.type}</span></div></Col> <Col span={12}><Text type="secondary">工单类型:</Text><Text>巡检</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>负责人:</span><span>{selectedOrder?.handler}</span></div></Col> <Col span={12}><Text type="secondary">负责人:</Text><Text>王工</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>协同人员:</span><span>无人机A01 / 张运维</span></div></Col> <Col span={12}><Text type="secondary">协同人员:</Text><Text>无人机 A01 / 张运维</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>计划时间:</span><span>2025-05-24 13:30 ~ 15:00</span></div></Col> <Col span={24}><Text type="secondary">计划时间:</Text><Text>2025-05-24 13:30 - 15:00</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>关联区域:</span><span>B-12</span></div></Col> <Col span={12}><Text type="secondary">关联设备:</Text><Text style={{ color: '#1890ff' }}>UAV-A01</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>关联设备:</span><span>UAV-A01</span></div></Col> <Col span={12}><Text type="secondary">关联区域:</Text><Text>B-12</Text></Col>
<Col span={12}><div style={{ display: 'flex', justifyContent: 'space-between' }}><span>当前状态:</span><Tag color="blue">执行中</Tag></div></Col> <Col span={24}><Text type="secondary">当前状态:</Text><Tag color="blue" style={{ borderRadius: 10 }}>执行中</Tag></Col>
<Col span={24}>
<Text type="secondary">任务描述:</Text>
<Text>对 AI 识别热斑区域进行复检与红外复核,确认是否需要更换组件。</Text>
</Col>
</Row> </Row>
</div>
<div style={{ marginBottom: 16 }}> <div style={{ marginBottom: 24 }}>
<div style={{ fontSize: 14, fontWeight: 500, marginBottom: 8 }}>任务描述</div> <div style={{ display: 'flex', justifyContent: 'space-between', padding: '0 10px', marginBottom: 8 }}>
<div style={{ fontSize: 13, color: '#666', background: '#fafafa', padding: 12, borderRadius: 4 }}> <div style={{ textAlign: 'center' }}>
{selectedOrder?.description} <CheckCircleFilled style={{ color: '#52c41a', fontSize: 20 }} />
<div style={{ fontSize: 12, marginTop: 4 }}>已创建</div>
</div>
<div style={{ flex: 1, height: 2, background: '#52c41a', marginTop: 10 }}></div>
<div style={{ textAlign: 'center' }}>
<CheckCircleFilled style={{ color: '#52c41a', fontSize: 20 }} />
<div style={{ fontSize: 12, marginTop: 4 }}>已派发</div>
</div>
<div style={{ flex: 1, height: 2, background: '#1890ff', marginTop: 10 }}></div>
<div style={{ textAlign: 'center' }}>
<div style={{ width: 20, height: 20, borderRadius: '50%', background: '#1890ff', color: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12 }}>3</div>
<div style={{ fontSize: 12, marginTop: 4 }}>执行中</div>
</div>
<div style={{ flex: 1, height: 2, background: '#f0f0f0', marginTop: 10 }}></div>
<div style={{ textAlign: 'center' }}>
<div style={{ width: 20, height: 20, borderRadius: '50%', border: '1px solid #d9d9d9', color: '#d9d9d9', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12 }}>4</div>
<div style={{ fontSize: 12, marginTop: 4, color: '#d9d9d9' }}>已完成</div>
</div>
</div> </div>
</div> </div>
{/* 流程步骤 */} <Row gutter={8}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 24, padding: '0 20px' }}> <Col span={6}><Button type="primary" block>派发工单</Button></Col>
{['已创建', '已派发', '执行中', '已完成'].map((step, idx) => ( <Col span={6}><Button icon={<ReloadOutlined />} block>转派</Button></Col>
<div key={idx} style={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}> <Col span={6}><Button icon={<PauseOutlined />} danger ghost block>挂起</Button></Col>
<div style={{ <Col span={6}><Button icon={<CheckOutlined />} style={{ background: '#52c41a', color: '#fff', border: 'none' }} block>完成工单</Button></Col>
width: 24, height: 24, borderRadius: '50%', background: idx < 3 ? '#1890ff' : '#d9d9d9', </Row>
display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', fontSize: 12
}}>
{idx + 1}
</div>
<div style={{ fontSize: 12, marginTop: 4 }}>{step}</div>
</div>
))}
<div style={{ position: 'absolute', width: 'calc(100% - 120px)', height: 2, background: '#e8e8e8', left: 60, top: 100, zIndex: 0 }} />
</div>
{/* 操作按钮 */}
<div style={{ display: 'flex', gap: 12, flexWrap: 'wrap' }}>
<Button type="primary">派发文单</Button>
<Button>转派</Button>
<Button>挂起</Button>
<Button type="primary" style={{ background: '#52c41a', borderColor: '#52c41a' }}>完成工单</Button>
</div>
</Card> </Card>
{/* AI建议与关联信息 */} <Card
<Card bordered={false} style={{ borderRadius: 8 }} title="AI建议与关联信息"> bordered={false}
<div style={{ display: 'flex', gap: 16, marginBottom: 16 }}> title={<div style={{ display: 'flex', alignItems: 'center' }}><Text strong>AI 建议与关联信息</Text></div>}
<div style={{ flex: 1, background: '#f0f5ff', padding: 12, borderRadius: 8 }}> style={{ borderRadius: 8, marginBottom: 16 }}
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}> bodyStyle={{ padding: '12px' }}
<div style={{ width: 32, height: 32, borderRadius: 4, background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#1890ff' }}> >
<CloudOutlined /> <Row gutter={8}>
</div> <Col span={8}>
<div style={{ fontSize: 13, fontWeight: 500 }}>建议携带红外热像设备</div> <div style={{ background: '#f9f0ff', padding: '12px 8px', borderRadius: 8, textAlign: 'center' }}>
</div> <RobotOutlined style={{ fontSize: 20, color: '#722ed1', marginBottom: 8 }} />
</div> <div style={{ fontSize: 12 }}>建议携带</div>
<div style={{ flex: 1, background: '#f6ffed', padding: 12, borderRadius: 8 }}> <div style={{ fontSize: 12, fontWeight: 'bold' }}>红外热像设备</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
<div style={{ width: 32, height: 32, borderRadius: 4, background: '#e6ffed', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#52c41a' }}>
<BranchesOutlined />
</div>
<div style={{ fontSize: 13, fontWeight: 500 }}>优先复检组件 B-12-03 / B-12-05</div>
</div>
</div>
<div style={{ flex: 1, background: '#fff7e6', padding: 12, borderRadius: 8 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
<div style={{ width: 32, height: 32, borderRadius: 4, background: '#fff7e6', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fa8c16' }}>
<ThunderboltOutlined />
</div>
<div style={{ fontSize: 13, fontWeight: 500 }}>预计影响发电 2.1%</div>
</div> </div>
</Col>
<Col span={8}>
<div style={{ background: '#f6ffed', padding: '12px 8px', borderRadius: 8, textAlign: 'center' }}>
<ThunderboltOutlined style={{ fontSize: 20, color: '#52c41a', marginBottom: 8 }} />
<div style={{ fontSize: 12 }}>优先复检组件</div>
<div style={{ fontSize: 10, fontWeight: 'bold' }}>B-12-03 / B-12-05</div>
</div> </div>
</Col>
<Col span={8}>
<div style={{ background: '#fff7e6', padding: '12px 8px', borderRadius: 8, textAlign: 'center' }}>
<RiseOutlined style={{ fontSize: 20, color: '#faad14', marginBottom: 8 }} />
<div style={{ fontSize: 12 }}>预计影响发电</div>
<div style={{ fontSize: 12, fontWeight: 'bold' }}>2.1%</div>
</div> </div>
</Col>
</Row>
</Card>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
<div style={{ fontSize: 14, fontWeight: 500, marginBottom: 8 }}>关联告警趋势(近7天)</div> <Card bordered={false} title="关联告警趋势 (近 7 天)" style={{ borderRadius: 8 }}>
<Line <Line
data={alarmTrendData} data={alarmTrendData}
xField="date" xField="date"
yField="count" yField="value"
color="#1890ff"
point={{ size: 4 }}
height={120}
legend={false}
smooth smooth
point={{ size: 4, shape: 'circle' }}
height={120}
padding="auto"
xAxis={{ label: { style: { fontSize: 10 } } }}
yAxis={{ label: { style: { fontSize: 10 } } }}
/> />
</Card>
</Col> </Col>
<Col span={12}> <Col span={12}>
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 8 }}> <Card bordered={false} title="关联告警列表 (近 3 条)" extra={<Button type="link" size="small" style={{ fontSize: 12 }}>查看全部 <ChevronRight size={12} /></Button>} style={{ borderRadius: 8 }}>
<span style={{ fontSize: 14, fontWeight: 500 }}>关联告警列表(近3条)</span> <div style={{ fontSize: 12 }}>
<Button type="link" size="small">查看全部 </Button> <div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
<Badge status="error" style={{ marginRight: 8 }} />
<Text ellipsis style={{ flex: 1 }}>INV-05 逆变器告警</Text>
<Text type="secondary" style={{ fontSize: 10 }}>05-24 10:24</Text>
</div> </div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}> <div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
{alarmList.map((alarm, idx) => ( <Badge status="warning" style={{ marginRight: 8 }} />
<div key={idx} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '4px 8px', background: '#fafafa', borderRadius: 4 }}> <Text ellipsis style={{ flex: 1 }}>B-12 区块热斑告警</Text>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}> <Text type="secondary" style={{ fontSize: 10 }}>05-24 09:56</Text>
<div style={{ width: 8, height: 8, borderRadius: '50%', background: idx === 0 ? '#ff4d4f' : idx === 1 ? '#fa8c16' : '#faad14' }} />
<span style={{ fontSize: 13 }}>{alarm.name}</span>
</div> </div>
<span style={{ fontSize: 12, color: '#999' }}>{alarm.time}</span> <div style={{ display: 'flex', alignItems: 'center' }}>
<Badge status="warning" style={{ marginRight: 8 }} />
<Text ellipsis style={{ flex: 1 }}>B-12 组件温度异常</Text>
<Text type="secondary" style={{ fontSize: 10 }}>05-24 09:32</Text>
</div> </div>
))}
</div> </div>
</Col>
</Row>
</Card> </Card>
</Col> </Col>
</Row> </Row>
</Col>
{/* 工单详情抽屉 */}
<Drawer
title="工单详情"
placement="right"
width={600}
onClose={() => setDrawerVisible(false)}
open={drawerVisible}
destroyOnClose
>
{selectedOrder && (
<div>
<Descriptions column={2} bordered size="small" title="基础信息">
<Descriptions.Item label="工单编号">{selectedOrder.id}</Descriptions.Item>
<Descriptions.Item label="状态">{statusConfig[selectedOrder.status]?.label}</Descriptions.Item>
<Descriptions.Item label="标题">{selectedOrder.title}</Descriptions.Item>
<Descriptions.Item label="优先级">
<Tag color={priorityConfig[selectedOrder.priority]?.color}>{priorityConfig[selectedOrder.priority]?.label}</Tag>
</Descriptions.Item>
<Descriptions.Item label="来源">{selectedOrder.source}</Descriptions.Item>
<Descriptions.Item label="类型">{selectedOrder.type}</Descriptions.Item>
<Descriptions.Item label="负责人">{selectedOrder.handler || '—'}</Descriptions.Item>
<Descriptions.Item label="截止时间">{selectedOrder.deadline}</Descriptions.Item>
<Descriptions.Item label="描述" span={2}>{selectedOrder.description || '—'}</Descriptions.Item>
</Descriptions>
</div>
)}
</Drawer>
{/* 编辑工单弹窗 */}
<Modal
title="编辑工单"
open={editModalVisible}
onCancel={() => setEditModalVisible(false)}
onOk={() => { editForm.validateFields().then(values => { message.success('工单保存成功'); setEditModalVisible(false); }); }}
okText="保存"
cancelText="取消"
width={600}
destroyOnClose
>
<Form form={editForm} layout="vertical" initialValues={{ priority: 'low', source: '人工创建', type: '巡检' }}>
<Form.Item label="标题" name="title" rules={[{ required: true, message: '请输入标题' }]}><Input /></Form.Item>
<Row gutter={16}>
<Col span={12}><Form.Item label="来源" name="source"><Select><Option value="人工创建">人工创建</Option><Option value="告警">告警</Option><Option value="AI诊断">AI诊断</Option></Select></Form.Item></Col>
<Col span={12}><Form.Item label="类型" name="type"><Select><Option value="巡检">巡检</Option><Option value="故障排查">故障排查</Option><Option value="维护">维护</Option><Option value="清洗">清洗</Option></Select></Form.Item></Col>
</Row> </Row>
<Row gutter={16}>
<Col span={12}><Form.Item label="优先级" name="priority"><Select><Option value="low">低</Option><Option value="medium">中</Option><Option value="high">高</Option></Select></Form.Item></Col>
<Col span={12}><Form.Item label="负责人" name="handler"><Input /></Form.Item></Col>
</Row>
<Form.Item label="描述" name="description"><Input.TextArea rows={4} /></Form.Item>
</Form>
</Modal>
</div> </div>
); );
} };
export default WorkOrderPage;