diff --git a/src/components/SystemSetting/BasicSettings.tsx b/src/components/SystemSetting/BasicSettings.tsx index a74624b..9fed3e0 100644 --- a/src/components/SystemSetting/BasicSettings.tsx +++ b/src/components/SystemSetting/BasicSettings.tsx @@ -13,6 +13,8 @@ import { message, Typography, Space, + TimePicker, + Divider, } from 'antd'; import { CloudOutlined, @@ -25,131 +27,150 @@ import { FileTextOutlined, DeleteOutlined, RestOutlined, + SettingOutlined, + UserOutlined, + NotificationOutlined, + ApiOutlined, + SafetyCertificateOutlined, + ToolOutlined, + RightOutlined, } from '@ant-design/icons'; +import { + Smartphone, + Mail, + Send, + MessageSquare, + ShieldCheck, + Users, + LineChart, + Wrench, + Cpu, + Camera, + Wind, + Box, + Activity, + Zap, + RefreshCw, + Shield, + Key, + Lock, +} from 'lucide-react'; +import dayjs from 'dayjs'; -const { Text } = Typography; +const { Text, Title } = Typography; const BasicSettings = () => { const [form] = Form.useForm(); + + // 响应式字体大小 + const fontNormal = 'clamp(12px, 0.75vw, 13px)'; + const fontSmall = 'clamp(11px, 0.7vw, 12px)'; + const fontTitle = 'clamp(14px, 0.85vw, 16px)'; + const fontLarge = 'clamp(18px, 1.1vw, 22px)'; + const handleSave = () => { message.success('设置已保存'); }; - // 设备接入状态数据 - const deviceStatusData = [ - { name: '逆变器', count: '5/5', status: '正常', color: '#52c41a' }, - { name: '汇流箱', count: '20/20', status: '正常', color: '#52c41a' }, - { name: '摄像头', count: '12/12', status: '正常', color: '#52c41a' }, - { name: '无人机', count: '2/2', status: '正常', color: '#52c41a' }, - { name: 'API接口', count: '正常', status: '正常', color: '#52c41a' }, - { name: 'Modbus', count: '正常', status: '正常', color: '#52c41a' }, - ]; - - // 服务配置数据 - const serviceConfigData = [ - { name: 'MQTT配置', value: 'tcp://localhost:1883', status: '离线', statusColor: '#8c8c8c' }, - { name: '视频服务配置', value: '待接入 RTSP / WebRTC 服务', status: '待处理', statusColor: '#fa8c16' }, - { name: 'AI服务配置', value: 'http://ai-service.local', status: '待处理', statusColor: '#fa8c16' }, - { name: 'API密钥管理', value: '正常', status: '正常', statusColor: '#52c41a' }, - ]; - - // 视频服务配置数据 - const videoServiceData = [ - { name: '视频服务数', value: '1' }, - { name: '启用服务数', value: '1' }, - { name: '摄像头总数', value: '3' }, - { name: '离线摄像头', value: '3' }, - { name: '在线流数量', value: '0' }, - { name: '服务状态', value: 'ONLINE', statusColor: '#52c41a' }, - { name: 'API地址', value: 'http://127.0.0.1:9997' }, - { name: 'HLS地址', value: 'http://127.0.0.1:8888' }, - { name: 'WebRTC地址', value: 'http://127.0.0.1:8889' }, - { name: '检测结果', value: 'HTTP 401 - http://127.0.0.1...' }, - ]; - - // MQTT接入状态数据 - const mqttStatusData = [ - { name: '启用状态', value: '已启用', statusColor: '#52c41a' }, - { name: '连接状态', value: '已连接', statusColor: '#52c41a' }, - { name: 'Broker', value: 'tcp://localhost:1883' }, - { name: '客户端ID', value: 'solar-platform-backend' }, - { name: '遥测主题', value: 'pv/+/device/+/telemetry' }, - { name: '状态主题', value: 'pv/+/device/+/status' }, - { name: '最近连接', value: '2026-05-07 18:30:40' }, - { name: '最近错误', value: '-' }, - ]; - - // MQTT消息日志数据 - const mqttLogData = [ - { topic: 'pv/1/device/ROBOT-01/ack', device: 'ROBOT-01', type: 'ACK', parse: 'SUCCESS' }, - { topic: 'pv/1/device/ROBOT-01/ack', device: 'ROBOT-01', type: 'ACK', parse: 'SUCCESS' }, - { topic: 'pv/1/device/CAM-02/status', device: 'CAM-02', type: 'STATUS', parse: 'SUCCESS' }, - { topic: 'pv/1/device/INV-A02/telemetry', device: 'INV-A02', type: 'TELEMETRY', parse: 'SUCCESS' }, - ]; - - // WebSocket状态数据 - const wsStatusData = [ - { name: '服务状态', value: '已启用', statusColor: '#52c41a' }, - { name: '前端连接', value: '已连接', statusColor: '#52c41a' }, - { name: 'Endpoint', value: '/ws/pv' }, - { name: '在线连接数', value: '2' }, - { name: '最近推送', value: '-' }, - { name: '推送时间', value: '-' }, - { name: '前端端点', value: 'ws://47.100.102.7:10469/de...' }, - { name: '最近错误', value: '-' }, - ]; - - // 顶部卡片数据 + // 顶部统计卡片数据 const topCards = [ { title: '当前版本', value: 'v2.8.1', tag: '最新版', tagColor: 'blue', - icon: , - color: '#1677ff', - bg: '#e6f4ff' + icon: , + bg: 'linear-gradient(135deg, #e6f4ff 0%, #bae0ff 100%)' }, { title: '在线用户', value: '12', trend: '↑ 2', trendColor: '#52c41a', - icon: , - color: '#52c41a', - bg: '#f6ffed' + icon: , + bg: 'linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%)' }, { title: '告警通道', value: '3 / 4', trend: '正常', trendColor: '#52c41a', - icon: , - color: '#ff4d4f', - bg: '#fff2f0' + icon: , + bg: 'linear-gradient(135deg, #fff2f0 0%, #ffccc7 100%)' }, { title: '数据备份状态', value: '正常', trend: '●', trendColor: '#52c41a', - icon: , - color: '#13c2c2', - bg: '#e6fffb' + icon: , + bg: 'linear-gradient(135deg, #e6fffb 0%, #b5f5ec 100%)' }, { title: '最近更新', value: '2025-05-20', - icon: , - color: '#722ed1', - bg: '#f9f0ff' + icon: , + bg: 'linear-gradient(135deg, #f9f0ff 0%, #efdbff 100%)' }, ]; - return ( -
+ // 角色权限概览 + const roleOverview = [ + { + title: '超级管理员', + users: 2, + perms: 28, + tags: ['全部权限', '系统管理'], + color: '#1677ff', + bg: '#e6f4ff', + icon: + }, + { + title: '运维工程师', + users: 5, + perms: 18, + tags: ['设备管理', '工单管理'], + color: '#52c41a', + bg: '#f6ffed', + icon: + }, + { + title: '巡检主管', + users: 8, + perms: 12, + tags: ['巡检管理', '告警处理'], + color: '#fa8c16', + bg: '#fff7e6', + icon: + }, + { + title: '数据分析师', + users: 3, + perms: 15, + tags: ['数据分析', '报表查看'], + color: '#722ed1', + bg: '#f9f0ff', + icon: + }, + ]; - {/* 顶部卡片 —— 统一风格 + 自动换行 + 圆角8px */} + // 设备状态 + const deviceStatuses = [ + { name: '逆变器', count: '5/5', status: '正常' }, + { name: '汇流箱', count: '20/20', status: '正常' }, + { name: '气象站', count: '1/1', status: '正常' }, + { name: '摄像头', count: '12/12', status: '正常' }, + { name: '无人机', count: '2/2', status: '正常' }, + { name: '机器人', count: '5/5', status: '正常' }, + { name: 'API接口', count: '正常', status: '正常' }, + { name: 'Modbus', count: '正常', status: '正常' }, + ]; + + return ( +
+ + + {/* 顶部统计卡片 */} {topCards.map((item, idx) => ( @@ -181,224 +202,347 @@ const BasicSettings = () => { - {/* 左侧主内容 */} - - - {/* 平台参数 */} - + {/* 左侧 */} + + {/* 基础配置 */} + 基础配置} + bordered={false} + style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }} + >
- - + + - + - + - - - + + + + + + + + + + + + + + + + - + 5 分钟 - + - + 高德地图 + +
+ + 工单自动编号 + + + + AI建议自动生成 + + + + 移动端同步 + + +
+
- - - +
+ + +
{/* 通知与告警策略 */} - - - -
- 短信 - -
- - -
- 邮件 - -
- - -
- 企业微信 - -
- + 通知与告警策略} + bordered={false} + style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }} + > + + {[ + { label: '短信', icon: , color: '#52c41a', status: '已启用' }, + { label: '邮件', icon: , color: '#1677ff', status: '已启用' }, + { label: 'Telegram', icon: , color: '#13c2c2', status: '已启用' }, + { label: '系统通知', icon: , color: '#fa8c16', status: '已启用' }, + ].map((item, idx) => ( + +
+
+ {React.cloneElement(item.icon as React.ReactElement, { style: { color: item.color } })} +
+
+
{item.label}
+
{item.status}
+
+ +
+ + ))}
- - -
- 系统通知 - -
- - -
- 严重告警立即通知 - -
- - -
- 通信中断通知 - -
+ + 严重告警立即通知 + 发电下降超过 15% + 通信中断通知 + 每日汇总推送 + + + 夜间免打扰 + + +
{/* 用户与权限预览 */} - + 用户与权限预览} + bordered={false} + style={{ borderRadius: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.05)', marginBottom: 16 }} + > `共 ${total} 条` }} columns={[ - { title: '用户名', dataIndex: 'name' }, - { title: '角色', dataIndex: 'role' }, - { title: '手机号', dataIndex: 'phone' }, - { title: '状态', dataIndex: 'status', render: (text) => {text} }, + { title: '用户名', dataIndex: 'name', key: 'name', fixed: 'left' }, + { + title: '角色', + dataIndex: 'role', + key: 'role', + render: (role) => { + const config: any = { + '超级管理员': { color: '#1677ff', bg: '#e6f4ff' }, + '运维工程师': { color: '#52c41a', bg: '#f6ffed' }, + '巡检主管': { color: '#fa8c16', bg: '#fff7e6' }, + '数据分析师': { color: '#722ed1', bg: '#f9f0ff' }, + }; + const s = config[role] || { color: '#8c8c8c', bg: '#f5f5f5' }; + return {role}; + } + }, + { title: '手机号', dataIndex: 'phone', key: 'phone' }, + { title: '邮箱', dataIndex: 'email', key: 'email' }, + { + title: '状态', + dataIndex: 'status', + key: 'status', + render: (status) => ( + +
+ {status} + + ) + }, + { title: '操作', key: 'action', render: () => , fixed: 'right' }, ]} dataSource={[ - { name: '张运维', role: '超级管理员', phone: '138****0001', status: '在线' }, - { name: '李工程师', role: '运维工程师', phone: '139****0002', status: '在线' }, - { name: '王班长', role: '巡检主管', phone: '137****0003', status: '在线' }, - { name: '赵分析师', role: '数据分析师', phone: '136****0004', status: '在线' }, + { name: '张运维', role: '超级管理员', phone: '138****0001', email: 'zhangyw@pvsmart.com', status: '在线' }, + { name: '李工程师', role: '运维工程师', phone: '139****0002', email: 'li.gongcheng@pvsmart.com', status: '在线' }, + { name: '王班长', role: '巡检主管', phone: '137****0003', email: 'wang.banzhang@pvsmart.com', status: '在线' }, + { name: '赵分析师', role: '数据分析师', phone: '136****0004', email: 'zhao.fx@pvsmart.com', status: '在线' }, ]} /> - - {/* MQTT接入状态 */} - -
来自 /pv/mqtt/status,后端未登录时显示预览兜底数据
- - {mqttStatusData.map((item, index) => ( -
-
-
{item.name}
-
{item.value}
-
- - ))} - - - - {/* MQTT消息日志 */} - -
阶段3A用于验证遥测原始消息落库
-
- - - - - - - - - - - - - - - - - - - - {/* 右侧边栏 */} - + {/* 右侧 */} + + {/* 角色权限概览 */} + 角色权限概览} + bordered={false} + style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }} + bodyStyle={{ padding: '12px' }} + > + + {roleOverview.map((role, idx) => ( + +
+
+ {role.icon} + +
+
{role.title}
+
+ 用户 {role.users} 人 | 权限 {role.perms} 项 +
+
+ {role.tags.map((tag, tidx) => ( + {tag} + ))} +
+
+ + ))} + + {/* 设备接入状态 */} - - - {deviceStatusData.map((item, index) => ( - -
-
{item.name}
-
{item.count}
-
{item.status}
+ 设备接入状态} + extra={} + bordered={false} + style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }} + bodyStyle={{ padding: '16px' }} + > +
+
+ {deviceStatuses.map((item, idx) => ( +
+ +
+ {item.name} + + {item.count}
- - ))} - - - - {/* 服务配置展示 */} - - {serviceConfigData.map((item, index) => ( -
-
-
{item.name}
-
{item.value}
-
- {item.status} + ))}
- ))} +
+ {/* SVG 拓扑图:使用百分比和 viewBox 保证缩放比一致性 */} + + + + + + + + {/* 动态连线 */} + + + + + + + + + {/* 中心核心节点 */} + + + + + {/* 周边子节点 */} + {[ + { x: 60, y: 40, icon: , label: '逆变器' }, + { x: 140, y: 40, icon: , label: '汇流箱' }, + { x: 160, y: 80, icon: , label: '气象站' }, + { x: 140, y: 120, icon: , label: '摄像头' }, + { x: 60, y: 120, icon: , label: '机器人' }, + { x: 40, y: 80, icon: , label: '接口' }, + ].map((node, i) => ( + + + +
{node.icon}
+
+ {node.label} +
+ ))} +
+
+
- {/* 视频服务配置状态 */} - -
来自 /pv/video/summary 与 /pv/video/media-server/list
- - {videoServiceData.map((item, index) => ( -
-
-
{item.name}
-
{item.value}
+ {/* 数据与安全 */} + 数据与安全} + bordered={false} + style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }} + bodyStyle={{ padding: '16px' }} + > +
+ {[ + { label: '数据保留', value: '3 年', icon: }, + { label: '登录审计', value: '已开启', icon: , color: '#52c41a' }, + { label: '每日自动备份', value: '02:00', icon: }, + { label: 'API 密钥管理', value: '正常', icon: , color: '#52c41a' }, + { label: '最近备份时间', value: '2025-05-24 02:00', icon: , isFull: true }, + { label: 'SSL 证书', value: '有效期至 2026-12-31', icon: , isFull: true }, + { label: '双因素认证', value: '已开启', icon: , color: '#52c41a' }, + ].map((item, idx) => ( +
+
+ {item.icon}
- +
+
{item.label}
+
{item.value}
+
+
))} - - +
- {/* WebSocket实时推送 */} - -
来自 /pv/ws/status,并显示前端本地连接状态
- - {wsStatusData.map((item, index) => ( -
-
-
{item.name}
-
{item.value}
-
+ {/* 系统维护 */} + 系统维护} + extra={} + bordered={false} + style={{ borderRadius: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }} + bodyStyle={{ padding: '16px' }} + > + + {[ + { label: '清理缓存', icon: , color: '#1677ff' }, + { label: '重启服务', icon: , color: '#1677ff' }, + { label: '备份下载', icon: , color: '#1677ff' }, + { label: '日志导出', icon: , color: '#1677ff' }, + ].map((btn, idx) => ( + + ))} - @@ -406,3 +550,4 @@ const BasicSettings = () => { }; export default BasicSettings; + diff --git a/src/components/devices/DeviceOverviewPage.tsx b/src/components/devices/DeviceOverviewPage.tsx index 29276ae..6544bff 100644 --- a/src/components/devices/DeviceOverviewPage.tsx +++ b/src/components/devices/DeviceOverviewPage.tsx @@ -172,13 +172,12 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll, {/**/} {dynamicTopCards.map((card, idx) => ( - + { @@ -124,64 +130,83 @@ export default function AIDiagnosisPage() { '正常': '#00B42A', '轻微': '#F7BA1E', }; - return {status}; + return {status}; }; const renderImpactTag = (impact: string) => { const colorMap: Record = { '高': '#F53F3F', '中': '#FF7D00', '低': '#00B42A' }; - return {impact}; + return {impact}; }; return (
-
-
- AI诊断分析 -
+ + +
+ + AI 智能诊断与分析中心 + + + + +
{/* 第一排:顶部统计卡片 */} - + {[ - { title: 'PR值', value: '82.6%', trend: '较昨日 -1.3%', icon: , color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' }, - { title: '发电偏差', value: '-4.35%', trend: '较昨日 -1.02%', icon: , color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' }, - { title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: , color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' }, - { title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: , color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' }, - { title: '健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: , color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' }, - { title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon: , color: '#00B42A', bg: '#E8FFEA', trendColor: '#00B42A' }, + { title: 'PR值 (性能比)', value: '82.6%', trend: '较昨日 -1.3%', icon: , color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' }, + { title: '发电偏差率', value: '-4.35%', trend: '较昨日 -1.02%', icon: , color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'down' }, + { title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: , color: '#1D2129', bg: '#F5F7FA', trendColor: '#F53F3F', direction: 'up' }, + { title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: , color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'up' }, + { title: '电站健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: , color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' }, + { title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon: , color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' }, ].map((item, index) => (
-
-
-
{item.title}
-
+
+
+
{item.title}
+
{item.value} - {item.unit && {item.unit}} + {item.unit && {item.unit}}
-
- {item.trend} +
+ {item.trend} + {item.direction === 'up' ? : }
-
- {React.cloneElement(item.icon, { style: { fontSize: 'clamp(20px, 1.8vw, 24px)', color: item.color } })} + {React.cloneElement(item.icon as React.ReactElement, { style: { fontSize: 22, color: item.color === '#1D2129' ? '#4E5969' : item.color } })}
@@ -193,72 +218,87 @@ export default function AIDiagnosisPage() {
热成像分析(无人机巡检)} - extra={2025-05-20 09:30 } + title={无人机热成像巡检分析} + extra={巡检:2025-05-20 09:30 } bordered={false} - bodyStyle={{ padding: 16 }} + bodyStyle={{ padding: '16px 20px' }} style={{ ...cardStyle, height: '100%' }} > {thermalImagingData.map((item, idx) => ( -
-
-
+
+
+ {/* 模拟热斑点 */} +
+
{item.temp}
+
+ + {item.status === 'serious' ? '高危' : '注意'} + +
-
{item.name}
+
{item.name}
))} -
-
- 疑似点 - 高温区 +
+
+ 热斑疑似点 +
高温区域
-
- 25℃ ~ 85℃ -
+
+ 温度分布: 25℃ ~ 85℃ +
组串异常定位} - extra={
异常:8 / 160
} + title={组串实时状态定位图} + extra={} style={{ fontSize: 12, color: '#86909C' }}> + 总组串: 160 + 异常: 8 + } bordered={false} - bodyStyle={{ padding: 16 }} + bodyStyle={{ padding: '16px 20px' }} style={{ ...cardStyle, height: '100%' }} > - -
-
-
-
+ +
+
+
+
{Array.from({ length: 20 }).map((_, i) => ( -
{String(i + 1).padStart(2, '0')}
+
{String(i + 1).padStart(2, '0')}
))} {['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => ( -
{row}排
+
{row}排
{Array.from({ length: 20 }).map((_, col) => { - let color = '#E8F3FF'; + let color = '#E8F3FF'; // 正常 let icon = null; - if (row === 'B' && col === 3) { color = '#F53F3F'; icon = !; } - if (row === 'B' && col === 17) { color = '#F53F3F'; icon = !; } - if (row === 'C' && col === 15) { color = '#FF7D00'; icon = !; } - if (row === 'E' && col === 4) { color = '#FF7D00'; icon = !; } - if (row === 'F' && col === 11) { color = '#FF7D00'; icon = !; } - if (row === 'G' && col === 1) { color = '#56C1FF'; } - if (row === 'H' && col === 10) { color = '#86909C'; } + let tooltip = `组串 ${row}-${col + 1}: 正常`; + + // 模拟异常分布 + if (row === 'B' && col === 3) { color = '#F53F3F'; icon =
; tooltip = `组串 ${row}-${col + 1}: 严重异常 (热斑)`; } + if (row === 'B' && col === 17) { color = '#F53F3F'; icon =
; tooltip = `组串 ${row}-${col + 1}: 严重异常 (断路)`; } + if (row === 'C' && col === 15) { color = '#FF7D00'; icon =
; tooltip = `组串 ${row}-${col + 1}: 异常 (功率偏差)`; } + if (row === 'E' && col === 4) { color = '#FF7D00'; icon =
; tooltip = `组串 ${row}-${col + 1}: 异常 (遮挡)`; } + if (row === 'F' && col === 11) { color = '#F7BA1E'; icon =
; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; } + if (row === 'G' && col === 1) { color = '#F7BA1E'; icon =
; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; } + if (row === 'H' && col === 10) { color = '#86909C'; tooltip = `组串 ${row}-${col + 1}: 离线`; } return ( -
- {icon} -
+ +
+ {icon} +
+
); })} @@ -266,32 +306,46 @@ export default function AIDiagnosisPage() {
-
+
{[ - { color: '#E8F3FF', label: '正常' }, - { color: '#56C1FF', label: '轻微' }, - { color: '#FF7D00', label: '异常' }, - { color: '#F53F3F', label: '严重' }, - { color: '#86909C', label: '离线' }, + { color: '#E8F3FF', label: '运行正常' }, + { color: '#F7BA1E', label: '轻微异常' }, + { color: '#FF7D00', label: '功率异常' }, + { color: '#F53F3F', label: '严重故障' }, + { color: '#86909C', label: '设备离线' }, ].map(item => ( - {item.label} + + + {item.label} + ))}
-
-
异常统计
-
- {[ - { icon: , label: '严重异常', value: 2, color: '#F53F3F' }, - { icon: , label: '异常', value: 4, color: '#FF7D00' }, - { icon:
, label: '轻微异常', value: 2, color: '#56C1FF' }, - { icon:
, label: '离线', value: 0, color: '#86909C' }, - ].map(item => ( -
- {item.icon}{item.label} - {item.value} -
- ))} +
+
+
+ 异常类型分布 +
+
+ {[ + { label: '严重故障', value: 2, color: '#F53F3F', percent: '25%' }, + { label: '功率异常', value: 4, color: '#FF7D00', percent: '50%' }, + { label: '轻微异常', value: 2, color: '#F7BA1E', percent: '25%' }, + { label: '离线组串', value: 0, color: '#86909C', percent: '0%' }, + ].map(item => ( +
+
+ {item.label} + {item.value} +
+
+
+
+
+ ))} +
+ +
@@ -299,124 +353,147 @@ export default function AIDiagnosisPage() { - {/* 第三排:衰减分析、发电表现、AI总结建议 */} + {/* 第三排:三个主要分析区域 */} - - - - 组件衰减分析} - bordered={false} - bodyStyle={{ padding: 16 }} - style={{ ...cardStyle, height: '100%' }} - > - -
- 当前平均衰减率 -5.32% -
-
- - - - 发电表现分析} - bordered={false} - bodyStyle={{ padding: 16 }} - style={{ ...cardStyle, height: '100%' }} - > -
-
- -
-
- {[ - { label: '实际发电', value: '4,752', unit: 'kWh', color: '#165DFF' }, - { label: '预测发电', value: '4,960', unit: 'kWh', color: '#00B42A' }, - { label: '发电偏差', value: '-4.35%', unit: '', color: '#F53F3F' }, - { label: 'PR 值', value: '82.6%', unit: '', color: '#1D2129' }, - ].map(item => ( -
-
{item.label}
-
{item.value} {item.unit}
-
- ))} -
-
-
- - - - {/* 数据来源 */} - - - 数据来源} - bordered={false} - bodyStyle={{ padding: 16 }} - style={cardStyle} - > - - {[ - { title: '无人机热成像', time: '05-20 09:30', icon: }, - { title: 'SCADA历史数据', time: '05-20 00:00', icon: }, - { title: '气象实况数据', time: '05-20 09:45', icon: }, - { title: '最近清洗记录', time: '05-12 14:20', icon: }, - ].map((source, idx) => ( - -
-
{source.icon}
-
-
{source.title}
-
{source.time}
-
-
- - ))} - - - - + + 组件衰减趋势分析} + bordered={false} + bodyStyle={{ padding: '16px 20px' }} + style={{ ...cardStyle, height: '100%' }} + > +
+ 衰减率趋势 (%) + 当前均值: -5.32% +
+ +
+
+ + 衰减预警: + 12块组件衰减超标, 建议排查。 +
+
+
- {/* 右侧:AI 诊断与处置 */} - + + 实时发电表现深度分析} + bordered={false} + bodyStyle={{ padding: '16px 20px' }} + style={{ ...cardStyle, height: '100%' }} + > +
+
+
发电量对比分析 (kWh)
+ +
+
+ {[ + { label: '当日实际发电', value: '4,752', unit: 'kWh', color: '#165DFF' }, + { label: '当日预测发电', value: '4,960', unit: 'kWh', color: '#00B42A' }, + { label: '发电偏差率', value: '-4.35%', unit: '', color: '#F53F3F' }, + { label: '实时 PR 值', value: '82.6%', unit: '', color: '#1D2129' }, + ].map(item => ( +
+
{item.label}
+
{item.value} {item.unit}
+
+ ))} +
+
+
+ + + AI 诊断与建议措施} bordered={false} bodyStyle={{ padding: 0 }} style={{ ...cardStyle, height: '100%' }} > -
+
+
+ AI 智能诊断总结 + 实时更新 +
- + + +
+
+ AI 建议与智能处置 + +
{g}, width: 80 }, + { title: '收益', dataIndex: 'expectedGain', key: 'expectedGain', render: (g) => {g}, width: 70 }, { title: '操作', key: 'action', - width: 65, - render: () => + width: 80, + render: (text, record) => ( + + ) }, ]} - dataSource={aiRecommendations} + dataSource={aiRecommendations.slice(0, 4)} pagination={false} size="small" + className="compact-table" /> + + {/* 底部:数据来源 */} + 全栈数据融合来源} + bordered={false} + bodyStyle={{ padding: '16px 20px' }} + style={cardStyle} + > + + {[ + { title: '无人机载荷热成像', time: '2025-05-20 09:30', icon: , status: '同步中' }, + { title: 'SCADA 实时遥测数据', time: '2025-05-20 09:45:12', icon: , status: '正常' }, + { title: '云端气象分析站', time: '2025-05-20 09:45:00', icon: , status: '正常' }, + { title: '电站运维资产库', time: '最近更新: 2025-05-18', icon: , status: '正常' }, + ].map((source, idx) => ( + +
+
+ {source.icon} +
+
+
{source.title}
+
数据点: {source.time}
+
+
+ 状态: {source.status} +
+
+
+ + ))} + + ); } + diff --git a/src/pages/CleanOptimization.tsx b/src/pages/CleanOptimization.tsx index c3e1b3a..4ba582c 100644 --- a/src/pages/CleanOptimization.tsx +++ b/src/pages/CleanOptimization.tsx @@ -1,16 +1,17 @@ import React, { useState } from 'react'; import { Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker, - Divider, Progress, Badge, Select, Tooltip + 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 + PercentageOutlined, GlobalOutlined, AimOutlined, FilterOutlined, + FullscreenOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons'; -import { Line, Pie, Column } from '@ant-design/charts'; +import { Line, Pie, Column, DualAxes } from '@ant-design/charts'; import { Droplets, Zap, @@ -24,7 +25,9 @@ import { CloudRain, Thermometer, Wind, - Info + Info, + ShieldCheck, + Leaf } from 'lucide-react'; const { Title, Text } = Typography; @@ -57,22 +60,43 @@ const pollutionTrendData = [ { date: '05-22', value: 68, type: '污染指数' }, { date: '05-23', value: 60, type: '污染指数' }, { date: '05-24', value: 68.5, type: '污染指数' }, - { date: '05-18', value: 75, type: '阈值' }, - { date: '05-19', value: 75, type: '阈值' }, - { date: '05-20', value: 75, type: '阈值' }, - { date: '05-21', value: 75, type: '阈值' }, - { date: '05-22', value: 75, type: '阈值' }, - { date: '05-23', value: 75, type: '阈值' }, - { date: '05-24', value: 75, type: '阈值' }, ]; const lossPieData = [ - { type: '灰尘积累', value: 6120 }, - { type: '鸟粪遮挡', value: 1480 }, - { type: '沙尘沉积', value: 1120 }, - { type: '其他', value: 600 }, + { type: '灰尘积累', value: 6120, color: '#165DFF' }, + { type: '鸟粪遮挡', value: 1480, color: '#F53F3F' }, + { type: '沙尘沉积', value: 1120, color: '#F7BA1E' }, + { type: '其他', 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 compareBarData = [ { date: 'D-7', value: 800, type: '清洗前发电量(kWh)' }, { date: 'D-7', value: 1200, type: '清洗后发电量(kWh)' }, @@ -90,30 +114,51 @@ const compareBarData = [ { date: 'D-1', value: 1380, type: '清洗后发电量(kWh)' }, ]; -const boostRateData = [ - { date: 'D-7', rate: 35 }, - { date: 'D-6', rate: 32 }, - { date: 'D-5', rate: 30 }, - { date: 'D-4', rate: 28 }, - { date: 'D-3', rate: 31 }, - { date: 'D-2', rate: 29 }, - { date: 'D-1', rate: 33 }, -]; export default function CleanOptimizationPage() { + const cardStyle = { + borderRadius: 12, + border: '1px solid #f0f0f0', + boxShadow: '0 4px 12px rgba(0,0,0,0.05)', + overflow: 'hidden' + }; + const renderPriorityTag = (priority: string) => { const config: Record = { '高': { color: '#ff4d4f', bg: '#fff1f0' }, '中': { color: '#faad14', bg: '#fff7e6' }, '低': { color: '#52c41a', bg: '#f6ffed' }, }; - return {priority}; + return {priority}; }; return ( -
- {/* 顶部指标卡片 */} - {/* 清洗建议卡片组 —— 宽高统一 + 最小168px + 自动换行 + 风格统一 */} +
+ + ))} - {/* 标题栏 */} + {/* 标题与操作栏 */}
-
- 清洗优化管理 - -
+ + 清洗优化管理 + + - - 更新时间:2025-05-24 09:30 - - - + +
- - {/* 左侧:四个图表 */} -
- 污染趋势} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> + + {/* 左侧:分析图表 */} + + 污染趋势分析} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> +
+ 污染指数 + +
污染指数
+
阈值
+
+
- 发电损失分析 (近 7 天)} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> -
+ 发电损失构成 (近 7 天)} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> +
{ - const total = lossPieData.reduce((a, b) => a + b.value, 0); - const percent = ((item.value / total) * 100).toFixed(1); - return `${item.value.toLocaleString()} kWh (${percent}%)`; - } - } + itemValue: { formatter: (val, item) => `${item.value} kWh` } }} - height={140} + height={180} + autoFit /> -
-
总损失电量
-
9,320
-
kWh
+
+
总损失电量
+
9,320
+
kWh
- 清洗前后对比 (近一次清洗)} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> + 清洗前后对比分析 (近一次)} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> - 清洗收益测算 (本次建议清洗)} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}> - -
-
预计发电提升
-
12,850 kWh
+ 清洗收益深度测算} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> + + +
预计发电提升
+
12,850 kWh
- -
电价 (含税)
-
0.568 元/kWh
+ +
电价 (含税)
+
0.568 元/kWh
- -
预计收益
-
7,286 元
+ +
预计净收益
+
7,286 元
- -
投资回报率 (ROI)
-
227%
- - - -
- 回收周期 - 0.44 天 -
+
+
ROI (投资回报)
+
227%
+ +
+ 回收周期 + 0.44 天 +
- {/* 中间:地图 + 工单表格 */} -
+ {/* 中间:地图分布与工单预览 */} + 电站污染分布与建议清洗区块} + title={电站污染分布与建议清洗区块分布图} bordered={false} - style={{ borderRadius: 8, marginBottom: 12, flex: 1, display: 'flex', flexDirection: 'column' }} - bodyStyle={{ padding: 0, flex: 1, position: 'relative' }} + style={{ ...cardStyle, flex: 1 }} + bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }} > -
- - 污染等级: - - - - - +
+ + 污染等级: + + + + +
-
- {/* 模拟地图底图 */} - - {/* 区块标记 */} -
-
区块 01
-
82.3
-
-
-
区块 02
-
76.8
-
-
-
区块 03
-
63.2
-
-
-
区块 08
-
19.7
-
+ {/* 地图背景图与浮动标签 */} +
+ -
-
区块 04
-
33.6
-
-
-
区块 05
-
68.7
-
-
-
区块 15
-
82.9
-
+ {/* 模拟区块叠加层 */} +
- {/* 地图控制按钮 */} -
- - - - + {/* 具体的污染区块标签 */} + {[ + { id: '01', score: '82.3', top: '25%', left: '30%', color: '#F53F3F' }, + { id: '02', score: '76.8', top: '20%', left: '45%', color: '#F53F3F' }, + { id: '03', score: '63.2', top: '22%', left: '60%', color: '#FF7D00' }, + { id: '08', score: '19.7', top: '28%', left: '75%', color: '#00B42A' }, + { id: '04', score: '33.6', top: '45%', left: '20%', color: '#F7BA1E' }, + { id: '05', score: '68.7', top: '42%', left: '38%', color: '#F53F3F' }, + { id: '15', score: '82.9', top: '48%', left: '55%', color: '#F53F3F' }, + { id: '19', score: '44.4', top: '55%', left: '65%', color: '#F7BA1E' }, + { id: '11', score: '44.8', top: '65%', left: '42%', color: '#F7BA1E' }, + { id: '13', score: '28.6', top: '75%', left: '30%', color: '#F7BA1E' }, + { id: '19', score: '24.5', top: '78%', left: '50%', color: '#D1FF6B' }, + { id: '20', score: '17.8', top: '85%', left: '40%', color: '#00B42A' }, + ].map(block => ( +
+
区块 {block.id}
+
{block.score}
+
+ ))} + + {/* 右侧悬浮控制按钮 */} +
+
清洗工单预览} + title={清洗工单智能预览} + extra={} bordered={false} - style={{ borderRadius: 8, flex: 'none' }} - extra={} + style={cardStyle} bodyStyle={{ padding: 0 }} >
{s} }, - { title: '操作', key: 'action', width: 80, render: () => }, + { 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) => {s} }, + { title: '操作', key: 'action', render: () => }, ]} dataSource={workOrderPreviewData} pagination={false} size="small" + className="compact-table" /> - {/* 右侧:建议 + 方案 + 天气 + 评估 */} - - 智能清洗建议} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: 0 }}> -
- 算法模型:多因子综合优化模型 + {/* 右侧:决策建议与参考 */} +
+ 智能清洗策略建议} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}> +
+ 算法模型:多因子加权综合优化模型 (v2.0)
{p} }, - { title: '建议区块', dataIndex: 'area', width: 100 }, - { title: '预计提升', dataIndex: 'boost', width: 100 }, - { title: '天气适宜度', dataIndex: 'weather', width: 90, render: (w) => {w} }, - { title: '建议时间', key: 'time', width: 100, render: (_, record, index) => 05-{26 + index} - 05-{27 + index} }, + { title: '推荐计划', dataIndex: 'id', key: 'id', width: 85 }, + { title: '优先级', dataIndex: 'priority', key: 'priority', render: (p) => {p}, width: 65 }, + { title: '建议区块', dataIndex: 'area', key: 'area' }, + { title: '预计提升', dataIndex: 'boost', key: 'boost', render: (b) => {b} }, + { title: '天气适宜度', dataIndex: 'weather', key: 'weather', render: (w) => {w} }, ]} dataSource={smartCleanPlanData} pagination={false} size="small" + className="compact-table" /> - 清洗方案建议} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> + 清洗技术方案推荐} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> -
-
-
- -
- 清洗机器人方案 -
- 自动化清洗,效率高,适合大面积、平整区域 -
- 预计用水: - 18 吨 +
+ +
+ 智能机器人方案 +
+
全自动清洗,适合大面积平整区块,效率极高。
+
+ 预计用水: + 18 吨
-
-
-
- -
- 人工清洗方案 -
- 灵活作业,适合局部、遮挡严重或复杂区域 -
- 预计用水: - 32 吨 +
+ +
+ 人工精细化方案 +
+
灵活处理遮挡及严重污垢区域,适合复杂地形。
+
+ 预计用水: + 32 吨
- 天气与资源参考 (计划 01)} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}> - + 天气与资源环境参考 (计划 01)} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> +
-
-
05-26
- -
多云
-
18~28℃
+
+
05-26 (周一)
+ +
多云 18~28℃
-
-
05-27
- -
晴
-
19~30℃
+
+
05-27 (周二)
+ +
晴 19~30℃
-
-
- -
风速 2.1 m/s
+
+
+ 风速: 2.1m/s (适宜)
-
- -
降水率 10%
+
+ 降水: 10% (低)
-
- -
水源可用 充足
+
+ 水源: 充足 (50t)
- 清洗影响评估} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}> - -
-
-
- + 清洗作业影响综合评估} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}> + + {[ + { icon: , bg: '#E8F3FF', label: '预计用水量', value: '18 吨', sub: '节水 30% (机器人)', subColor: '#00B42A' }, + { icon: , bg: '#E8F3FF', label: '预计总耗时', value: '12 小时', sub: '并行作业 2 组', subColor: '#86909C' }, + { icon: , bg: '#E8FFEA', label: '碳减排贡献', value: '6.85 吨', sub: 'CO₂ 减排量', subColor: '#86909C' }, + { icon: , bg: '#FFF7E8', label: '作业风险评估', value: '低风险', valueColor: '#00B42A', sub: '安全可控', subColor: '#86909C' }, + ].map((item, idx) => ( +
+
+
{item.icon}
+
+
{item.label}
+
{item.value}
+
{item.sub}
+
-
-
预计用水量
-
18 吨
-
节水率 30% (机器人)
-
- - - -
-
- -
-
-
预计耗时
-
12 小时
-
并行作业 2 组
-
-
- - -
-
- -
-
-
碳减排量
-
6.85 吨
-
CO₂ 减排量
-
-
- - -
-
- -
-
-
作业风险
-
低风险
-
安全可控
-
-
- + + ))} -
- - 以上建议基于历史数据、实时气象及发电损失模型综合计算。实际效果可能因天气和现场情况有所差异。 +
+ + + 以上决策建议基于历史数据、实时气象及发电损失模型综合计算。实际执行效果可能受天气骤变、现场突发障碍等不确定因素影响。 +
@@ -585,3 +588,4 @@ export default function CleanOptimizationPage() {
); } + diff --git a/src/pages/ReportCenter.tsx b/src/pages/ReportCenter.tsx index aff9521..90fd35c 100644 --- a/src/pages/ReportCenter.tsx +++ b/src/pages/ReportCenter.tsx @@ -1,19 +1,23 @@ import React, { useState } from 'react'; import { - Card, Row, Col, Tabs, Button, Space, Select, Table, Statistic, - DatePicker, message, Tag, Typography, - Radio, Checkbox, Divider + Card, Row, Col, Tabs, Button, Space, Select, Table, Tag, Typography, + DatePicker, Divider, Checkbox, Avatar, Badge, Tooltip, Progress, + Statistic } from 'antd'; import { - CloudOutlined, BarChartOutlined, BellOutlined, - CalendarOutlined, FileTextOutlined, + BarChartOutlined, BellOutlined, CalendarOutlined, FileTextOutlined, DownloadOutlined, ArrowUpOutlined, CheckCircleOutlined, ClockCircleOutlined, WarningOutlined, FileExcelOutlined, FilePdfOutlined, MailOutlined, SendOutlined, SettingOutlined, - RobotOutlined + RobotOutlined, CloudOutlined, ThunderboltOutlined, + PieChartOutlined, LineChartOutlined, InfoCircleOutlined, + ReloadOutlined, MoreOutlined, FileDoneOutlined, EyeOutlined, + EditOutlined, RiseOutlined, FallOutlined, + CheckCircleFilled } from '@ant-design/icons'; -import { Line, Bar, Pie } from '@ant-design/charts'; +import { Line, Column, Pie, Area, DualAxes, Bar } from '@ant-design/charts'; import dayjs from 'dayjs'; +import { ChevronRight } from 'lucide-react'; const { TabPane } = Tabs; const { RangePicker } = DatePicker; @@ -22,58 +26,74 @@ const { Text, Title } = Typography; // 模拟数据(完全匹配参考图) const overviewCards = [ - { title: '本月发电量', value: '138.6', unit: 'MWh', rate: '+6.2%', rateUp: true, color: '#52c41a' }, - { title: 'PR均值', value: '82.8', unit: '%', rate: '+1.1%', rateUp: true, color: '#1890ff' }, - { title: '运维工单完成率', value: '93.4', unit: '%', desc: '本月累计 126 单', color: '#1890ff' }, - { title: '告警闭环率', value: '94.2', unit: '%', desc: '严重告警 8 条', color: '#faad14' }, - { title: '清洗收益提升', value: '+7.6', unit: '%', desc: '预估增发 12,850 kWh', color: '#52c41a' }, - { title: '自动生成报告', value: '24', unit: '份', desc: '本月累计', color: '#722ed1' }, + { title: '本月发电量', value: '138.6', unit: 'MWh', trend: '环比 ↑ +6.2%', color: '#00B42A', bg: '#E8FFEA', icon: }, + { title: 'PR均值', value: '82.8', unit: '%', trend: '环比 ↑ +1.1%', color: '#165DFF', bg: '#E8F3FF', icon: }, + { title: '运维工单完成率', value: '93.4', unit: '%', trend: '本月累计 126 单', color: '#165DFF', bg: '#E8F3FF', icon: }, + { title: '告警闭环率', value: '94.2', unit: '%', trend: '严重告警 8 条', color: '#F53F3F', bg: '#FFF1F0', icon: }, + { title: '清洗收益提升', value: '+7.6', unit: '%', trend: '预估增发 12,850 kWh', color: '#00B42A', bg: '#E8FFEA', icon: }, + { title: '自动生成报告', value: '24', unit: '份', trend: '本月累计', color: '#722ED1', bg: '#F9F0FF', icon: }, ]; const monthlyPowerData = [ { date: '05-01', generation: 6, predicted: 8, pr: 105 }, - { date: '05-06', generation: 7, predicted: 9, pr: 108 }, - { date: '05-11', generation: 3, predicted: 7, pr: 102 }, - { date: '05-16', generation: 8, predicted: 10, pr: 112 }, - { date: '05-21', generation: 9, predicted: 10, pr: 110 }, - { date: '05-26', generation: 7, predicted: 9, pr: 108 }, - { date: '05-31', generation: 5, predicted: 7, pr: 105 }, + { date: '05-03', generation: 5.5, predicted: 7.8, pr: 102 }, + { date: '05-05', generation: 6.2, predicted: 8.2, pr: 108 }, + { date: '05-07', generation: 7, predicted: 8.5, pr: 110 }, + { date: '05-09', generation: 6.8, predicted: 8.3, pr: 105 }, + { date: '05-11', generation: 4, predicted: 7.5, pr: 98 }, + { date: '05-13', generation: 3, predicted: 7, pr: 95 }, + { date: '05-15', generation: 8, predicted: 9.5, pr: 112 }, + { date: '05-17', generation: 8.5, predicted: 10, pr: 115 }, + { date: '05-19', generation: 7.8, predicted: 9.2, pr: 108 }, + { date: '05-21', generation: 9, predicted: 10.5, pr: 118 }, + { date: '05-23', generation: 8.2, predicted: 9.8, pr: 110 }, + { date: '05-25', generation: 7, predicted: 9, pr: 105 }, + { date: '05-27', generation: 6.5, predicted: 8.5, pr: 102 }, + { date: '05-29', generation: 5, predicted: 7.5, pr: 98 }, + { date: '05-31', generation: 4.5, predicted: 7, pr: 95 }, ]; const powerMeteorologyData = [ - { date: '05-05-05', generation: 70, irradiance: 60, temp: 20 }, - { date: '05-12-05', generation: 60, irradiance: 50, temp: 22 }, - { date: '05-19-05', generation: 65, irradiance: 65, temp: 25 }, - { date: '05-26-05', generation: 55, irradiance: 55, temp: 23 }, + { date: '05-05-11', generation: 70, irradiance: 60, temp: 20 }, + { date: '05-12-18', generation: 60, irradiance: 50, temp: 22 }, + { date: '05-19-25', generation: 65, irradiance: 65, temp: 25 }, + { date: '05-26-31', generation: 55, irradiance: 55, temp: 23 }, ]; const orderAlarmData = [ - { date: '05-05-05', newOrder: 80, completed: 60, alarmCount: 10, closedRate: 80 }, - { date: '05-12-05', newOrder: 100, completed: 80, alarmCount: 20, closedRate: 85 }, - { date: '05-19-05', newOrder: 70, completed: 50, alarmCount: 15, closedRate: 90 }, - { date: '05-26-05', newOrder: 90, completed: 70, alarmCount: 18, closedRate: 92 }, + { date: '05-05-11', newOrder: 80, completed: 60, alarmCount: 10, closedRate: 80 }, + { date: '05-12-18', newOrder: 100, completed: 80, alarmCount: 20, closedRate: 85 }, + { date: '05-19-25', newOrder: 70, completed: 50, alarmCount: 15, closedRate: 90 }, + { date: '05-26-31', newOrder: 90, completed: 70, alarmCount: 18, closedRate: 92 }, ]; const aiAnalysisData = [ - { type: '热斑识别', value: 36 }, - { type: '异常组串', value: 8 }, - { type: '推荐清洗区块', value: 8 }, - { type: '视频异常事件', value: 6 }, + { type: '热斑识别', value: 36, color: '#F53F3F', icon: }, + { type: '异常组串', value: 8, color: '#FF7D00', icon: }, + { type: '推荐清洗区块', value: 8, color: '#00B42A', icon: }, + { type: '视频异常事件', value: 6, color: '#722ED1', icon: }, ]; const reportFileList = [ - { name: '电站月报', date: '2025年05月', type: '发电报表', status: '已生成', operator: '张运维', time: '2025-05-31 08:15' }, - { name: '周运维总结', date: '2025年05月', type: '运维报表', status: '已生成', operator: '系统自动', time: '2025-05-26 09:10' }, - { name: 'AI诊断日报', date: '2025年05月', type: 'AI分析报告', status: '生成中', operator: '系统自动', time: '2025-05-31 07:30' }, - { name: '告警闭环周报', date: '2025年05月', type: '告警报表', status: '已生成', operator: '李工程师', time: '2025-05-31 09:00' }, - { name: '清洗效果报告', date: '2025年05月', type: '运维报表', status: '已生成', operator: '王运维', time: '2025-05-28 10:20' }, + { name: '2025年05月电站月报', status: '已生成' }, + { name: '周运维总结', status: '已生成' }, + { name: 'AI诊断日报', status: '生成中' }, + { name: '告警闭环周报', status: '已生成' }, ]; const reportTemplates = [ - { name: '月度经营报告', desc: '综合经营分析与收益评估模板', icon: , color: '#1890ff' }, - { name: '设备健康分析报告', desc: '设备健康与故障分析模板', icon: , color: '#faad14' }, - { name: '清洗优化效果报告', desc: '清洗前后对比与收益分析模板', icon: , color: '#52c41a' }, - { name: '巡检与机器人作业报告', desc: '巡检与机器人作业统计模板', icon: , color: '#722ed1' }, + { name: '月度经营报告', desc: '综合经营分析与收益评估模板', color: '#165DFF', bg: '#E8F3FF', icon: }, + { name: '设备健康分析报告', desc: '设备健康度与故障分析模板', color: '#165DFF', bg: '#E8F3FF', icon: }, + { name: '清洗优化效果报告', desc: '清洗前后对比与收益分析模板', color: '#165DFF', bg: '#E8F3FF', icon: }, + { name: '巡检与机器人作业报告', desc: '巡检与机器人作业统计模板', color: '#722ED1', bg: '#F9F0FF', icon: }, +]; + +const generationRecord = [ + { name: '电站月报', time: '2025-05-31 08:15', operator: '张运维', type: '发电报表', status: '已生成' }, + { name: '告警周报', time: '2025-05-26 09:10', operator: '系统自动', type: '告警报表', status: '已生成' }, + { name: 'AI诊断日报', time: '2025-05-31 07:30', operator: '系统自动', type: 'AI分析报告', status: '生成中' }, + { name: '运维汇总报表', time: '2025-05-31 09:00', operator: '李工程师', type: '运维报表', status: '已生成' }, + { name: '清洗效果报告', time: '2025-05-28 10:20', operator: '王运维', type: '运维报表', status: '已生成' }, ]; export default function ReportCenterPage() { @@ -82,10 +102,56 @@ export default function ReportCenterPage() { const [reportType, setReportType] = useState('all'); const [dateRange, setDateRange] = useState([dayjs('2025-05-01'), dayjs('2025-05-31')]); + const cardStyle = { + borderRadius: 12, + border: '1px solid #f0f0f0', + boxShadow: '0 4px 12px rgba(0,0,0,0.05)', + overflow: 'hidden' + }; + return ( -
+
+ + + 报表中心 + {/* 页面头部标签 */} - + @@ -93,8 +159,6 @@ export default function ReportCenterPage() { - {/* 顶部统计卡片 */} - {/* 概览统计卡片 —— 统一风格 + 自动换行 + 宽高一致 */} {/* 筛选栏 */} -
- - - - - - - - +
+
+ 报表周期: + +
+
+ 报表类型: + +
+
+ 时间范围: + +
+
+ + + + + +
- + {/* 左侧主内容区 */} -
+ {/* 月度综合经营分析 */} - - { - if (datum.type === 'pr') return { lineDash: [4, 4] }; - return {}; - }} - tooltip={{ - formatter: (datum) => { - return { - name: datum.date, - data: [ - { name: '发电量(MWh)', value: datum.generation }, - { name: '预测发电(MWh)', value: datum.predicted }, - { name: 'PR(%)', value: datum.pr } + 月度综合经营分析}> + + +
+
发电量 (MWh)
+
预测发电 (MWh)
+
PR (%)
+
+ { + if (datum.type === 'pr') return { lineDash: [4, 4] }; + return {}; + }} + tooltip={{ + formatter: (datum) => { + return { + name: datum.date, + data: [ + { name: '发电量(MWh)', value: datum.generation }, + { name: '预测发电(MWh)', value: datum.predicted }, + { name: 'PR(%)', value: datum.pr } + ] + }; + } + }} + legend={{ + items: [ + { name: '发电量(MWh)', marker: { symbol: 'line', style: { stroke: '#52c41a' } } }, + { name: '预测发电(MWh)', marker: { symbol: 'line', style: { stroke: '#1890ff', lineDash: [4, 4] } } }, + { name: 'PR(%)', marker: { symbol: 'line', style: { stroke: '#fa8c16' } } }, ] - }; - } - }} - legend={{ - items: [ - { name: '发电量(MWh)', marker: { symbol: 'line', style: { stroke: '#52c41a' } } }, - { name: '预测发电(MWh)', marker: { symbol: 'line', style: { stroke: '#1890ff', lineDash: [4, 4] } } }, - { name: 'PR(%)', marker: { symbol: 'line', style: { stroke: '#fa8c16' } } }, - ] - }} - yAxis={[ - { - label: { formatter: (v) => `${v}` }, - name: '发电量', - }, - { - label: { formatter: (v) => `${v}%` }, - name: 'PR', - position: 'right', - } - ]} - height={200} - /> - - - + }} + yAxis={[ + { + label: { formatter: (v) => `${v}` }, + name: '发电量', + }, + { + label: { formatter: (v) => `${v}%` }, + name: 'PR', + position: 'right', + } + ]} + height={200} + /> - - - - - - - - - - - + +
+
+ {[ + { label: '本月累计发电量', value: '138.6', unit: 'MWh' }, + { label: '理论发电量', value: '166.8', unit: 'MWh' }, + { label: 'PR均值', value: '82.8', unit: '%' }, + { label: '发电偏差', value: '-3.4', unit: '%', color: '#F53F3F' }, + { label: '平均辐照度', value: '5.3', unit: 'kWh/㎡/天' }, + ].map((item, idx) => ( +
+ {item.label} + {item.value} {item.unit} +
+ ))} +
+
- {/* 发电与气象 + 工单与告警 */} - - - + {/* 第二排:三个图表 */} + + + 发电与气象统计}> +
+ + + + + +
- - + + 工单与告警闭环分析}> +
+ + + + + +
+ + AI 分析成果统计}> + + +
+ d.color)} + radius={1} + innerRadius={0.7} + legend={false} + height={160} + autoFit + /> +
+
本月AI事件
+
总计
+
58
+
+
+ + +
+ {aiAnalysisData.map((item, idx) => ( +
+ +
+ {item.type} +
+ {item.value} 个 +
+ ))} +
+ + + + - {/* AI分析成果统计 */} - - - - - - - - {aiAnalysisData.map((item, idx) => ( - - - + {/* 订阅与分发 */} + 订阅与分发}> + + +
订阅人员 (6)
+
+ {[ + { name: '张运维', role: '运维主管', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' }, + { name: '李工程师', role: '电站工程师', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' }, + { name: '王运维', role: '设备运维', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' }, + { name: '陈经理', role: '运维经理', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' }, + ].map((p, idx) => ( + + + ))} - + +2 +
+ + + +
分发渠道 (可多选)
+ + + + + + + + +
发送计划
+
+ + + 每周一 09:00 自动发送 + + +
{/* 右侧边栏 */} - + {/* 报表目录 / 快捷下载 */} - - 报表目录 / 快捷下载 - - - }> + 报表目录 / 快捷下载} extra={}>
( - {v} - ) + title: '报表名称', dataIndex: 'name', + render: (text) => {text} }, { - title: '操作', render: () => ( - - - - - ) - } - ]} - dataSource={reportFileList.slice(0, 4)} - pagination={false} - size="small" - /> - - - {/* 模板中心 */} - - 模板中心 - - - }> - - {reportTemplates.map((tpl, idx) => ( - - -
-
- {tpl.icon} -
-
-
{tpl.name}
-
{tpl.desc}
-
-
-
- - ))} - - - - {/* 报表生成记录 */} - - 报表生成记录 - - - }> -
( - {v} - ) + title: '状态', dataIndex: 'status', width: 80, + render: (v) => {v} }, { - title: '操作', render: () => ( - - - + title: '操作', width: 120, + render: () => ( + }> + + ) } @@ -398,52 +491,58 @@ export default function ReportCenterPage() { dataSource={reportFileList} pagination={false} size="small" + className="compact-table" /> - {/* 订阅与分发 */} - -
- 订阅人员 -
- {['张运维', '李工程师', '王运维', '陈经理'].map((name, idx) => ( -
-
- {name.charAt(0)} + {/* 模板中心 */} + 模板中心} extra={}> + + {reportTemplates.map((tpl, idx) => ( +
+
+
+
+ {tpl.icon} +
+
{tpl.name}
- {name} +
{tpl.desc}
- ))} - +2 - - + + ))} + + - - -
- 分发渠道(可多选) -
- - 邮件 - - - Telegram - - - 系统通知 - -
-
- - - -
- 发送计划 - -
- - 每周一 09:00 自动发送 - + {/* 报表生成记录 */} + 报表生成记录} extra={}> +
{v} + }, + { + title: '操作', width: 90, + render: () => ( + + - - - - - }> -
-
- video -
-
主画面:1#阵列区球机
-
2025-05-20 10:24:15
-
-
- - - - -
-
- -
- {[11, 12, 13, 14, 15, 16].map((id) => ( -
- -
直播中
+ {/* 中间视频监控中心 */} + +
+ 视频监控中心} + extra={ + + + + + } + bordered={false} + style={cardStyle} + bodyStyle={{ padding: 16 }} + > + + +
+ +
+ 主画面:1#阵列区球机 + 2025-05-20 10:24:15
- ))} -
- +
+ + + + + + + + + +
+
+ + + + + {[ + { title: '2#逆变器室', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=400&q=60' }, + { title: '3#电站大门', img: 'https://images.unsplash.com/photo-1541888946425-d81bb19480c5?auto=format&fit=crop&w=400&q=60' }, + { title: '4#周界北侧', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=400&q=60' }, + { title: '5#气象站', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=400&q=60' }, + { title: '6#设备区', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=400&q=60' }, + { title: '7#储能电池舱', img: 'https://images.unsplash.com/photo-1593941707882-a5bba14938c7?auto=format&fit=crop&w=400&q=60' }, + ].map((v, i) => ( + +
+ +
{v.title}
+
+
+ 直播中 +
+
+ +
+
+ + ))} + + + - - 设置}> -
-
-
- +
+ AI 视频智能分析} + extra={} + bordered={false} + style={{ ...cardStyle, height: '100%' }} + bodyStyle={{ padding: '16px 20px' }} + > +
+ {[ + { icon: , bg: '#FFF1F0', title: '周界入侵检测', desc: '识别翻越、攀爬、破坏围栏等行为', count: 2, color: '#F53F3F' }, + { icon: , bg: '#E8F3FF', title: '人员闯入', desc: '识别未经授权人员进入区域', count: 1, color: '#165DFF' }, + { icon: , bg: '#FFF7E8', title: '烟火识别', desc: '识别烟雾、明火等异常情况', count: 0, color: '#86909C' }, + { icon: , bg: '#FFF7E8', title: '设备区域滞留', desc: '识别人员在设备区滞留行为', count: 1, color: '#F7BA1E' }, + { icon: , bg: '#E8FFEA', title: '运动检测', desc: '识别画面异常运动目标', count: 2, color: '#00B42A' }, + ].map((item, idx) => ( +
+
+ {item.icon} +
+
+
{item.title}
+
{item.desc}
+
+
0 ? '#F53F3F' : '#86909C' }}>{item.count}
-
-
周界入侵检测
-
识别翻越、攀爬、破坏围栏
-
-
2
-
- -
-
- -
-
-
人员闯入
-
识别未经授权人员进入
-
-
1
-
- -
-
- -
-
-
烟火识别
-
识别烟雾、明火等异常
-
-
0
-
- -
-
- -
-
-
设备区域滞留
-
识别人员超时停留
-
-
1
-
- -
-
- -
-
-
运动检测
-
识别画面异常运动
-
-
2
-
+ ))}
- {/* ========== 底部三张卡片:高度完全统一 ========== */} - - - + + 摄像头设备列表} extra={ - - } style={{ width: 200 }} size="small" /> + } + bordered={false} + style={cardStyle} + bodyStyle={{ padding: 0 }} >
- - - 全部类型 - 周界入侵 - 人员闯入 - - } + + 事件时间线} + extra={} + bordered={false} + style={cardStyle} + bodyStyle={{ padding: '16px 20px' }} > - - -
10:23:41
-
周界入侵检测
-
周界北侧区域检测到翻越围栏事件
-
- - -
10:18:09
-
人员闯入
-
设备区检测到人员闯入
-
- - -
10:05:33
-
设备区域滞留
-
逆变器区人员滞留超过5分钟
-
- - -
09:52:17
-
运动检测
-
气象站区域检测到异常运动
-
- - -
09:41:28
-
周界入侵检测
-
周界南侧区域检测到攀爬事件
-
+ + {[ + { time: '10:23:41', title: '周界入侵检测', desc: '周界北侧区域检测到翻越围栏事件', color: '#F53F3F' }, + { time: '10:18:09', title: '人员闯入', desc: '设备区检测到人员闯入', color: '#F7BA1E' }, + { time: '10:05:33', title: '设备区域滞留', desc: '逆变器区人员滞留超过5分钟', color: '#F7BA1E' }, + { time: '09:52:17', title: '运动检测', desc: '气象站区域检测到异常运动', color: '#165DFF' }, + { time: '09:41:28', title: '周界入侵检测', desc: '周界南侧区域检测到攀爬事件', color: '#F53F3F' }, + ].map((item, idx) => ( + {item.time}} dot={
}> +
+
{item.title}
+
{item.desc}
+
+
+ ))}
-
- +
+
-
- 查看更多}> -
- {[20, 21, 22, 23].map((id) => ( -
- -
-
告警事件
-
2025-05-20 10:23
+
+ 最近告警快照} + extra={} + bordered={false} + style={cardStyle} + bodyStyle={{ padding: '16px 20px' }} + > +
+ {[ + { title: '周界北侧', time: '10:23:41', type: '周界入侵', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=300&q=60', boxColor: '#F53F3F' }, + { title: '设备区', time: '10:18:09', type: '人员闯入', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' }, + { title: '逆变器室', time: '10:05:33', type: '设备区域滞留', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' }, + //{ title: '气象站', time: '09:52:17', type: '运动检测', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=300&q=60', boxColor: '#165DFF' }, + ].map((item, idx) => ( +
+
+ + {/* 模拟检测框 */} +
+
{item.type}
+
+
+
{item.time}
+
{item.title}
+
+
+
+
- -
))}
diff --git a/src/pages/WorkOrder.tsx b/src/pages/WorkOrder.tsx index 4149a6a..04aa8a1 100644 --- a/src/pages/WorkOrder.tsx +++ b/src/pages/WorkOrder.tsx @@ -10,7 +10,8 @@ import { EyeOutlined, CommentOutlined, PauseOutlined, FormOutlined, ReloadOutlined, FilterOutlined, MoreOutlined, CheckCircleFilled, PlayCircleFilled, InfoCircleFilled, - RobotOutlined, ThunderboltOutlined, AlertOutlined + RobotOutlined, ThunderboltOutlined, AlertOutlined, + CheckCircleOutlined } from '@ant-design/icons'; import { Pie, Line } from '@ant-design/charts'; import { @@ -82,55 +83,6 @@ const WorkOrderPage = () => { { title: 'AI建议生成', value: 7, unit: '单', subValue: '', subText: '今日自动生成', icon: , bg: '#f9f0ff' }, ]; - // 表格列【已适配后端真实字段】 - const columns = [ - { title: '工单编号', dataIndex: 'orderNo', key: 'orderNo', width: 130 }, - { title: '工单标题', dataIndex: 'orderTitle', key: 'orderTitle', width: 180, ellipsis: true }, - { - title: '类型', - dataIndex: 'orderType', - key: 'orderType', - width: 80, - render: (val) => orderTypeConfig[val] || '未知' - }, - { - title: '优先级', - dataIndex: 'priorityLevel', - key: 'priorityLevel', - width: 80, - render: (p) => ( - - {priorityConfig[p]?.label} - - ) - }, - { title: '负责人', dataIndex: 'assigneeName', key: 'assigneeName', width: 80 }, - { title: '截止时间', dataIndex: 'deadlineTime', key: 'deadlineTime', width: 150 }, - { - title: '状态', - dataIndex: 'orderStatus', - key: 'orderStatus', - width: 90, - render: (s) => ( - {orderStatusConfig[s]?.label} - ) - }, - { - title: '操作', - key: 'action', - width: 60, - fixed: "right", - render: () => - }, - ]; - // 图表模拟数据保留不变 const pieData = [ { type: '待处理', value: 12 }, @@ -259,11 +211,101 @@ const WorkOrderPage = () => { getWorkOrderList(); }, []); + const cardStyle = { + borderRadius: 12, + border: '1px solid #f0f0f0', + boxShadow: '0 4px 12px rgba(0,0,0,0.05)', + overflow: 'hidden' + }; + + // 表格列【已适配后端真实字段】 + const columns = [ + { title: '工单编号', dataIndex: 'orderNo', key: 'orderNo', width: 130 }, + { title: '工单标题', dataIndex: 'orderTitle', key: 'orderTitle', width: 180, ellipsis: true }, + { title: '来源', dataIndex: 'sourceType', key: 'sourceType', width: 100 }, + { + title: '类型', + dataIndex: 'orderType', + key: 'orderType', + width: 80, + render: (val) => orderTypeConfig[val] || '未知' + }, + { + title: '优先级', + dataIndex: 'priorityLevel', + key: 'priorityLevel', + width: 80, + render: (p) => ( + + {priorityConfig[p]?.label} + + ) + }, + { title: '负责人', dataIndex: 'assigneeName', key: 'assigneeName', width: 80 }, + { title: '截止时间', dataIndex: 'deadlineTime', key: 'deadlineTime', width: 150 }, + { + title: '状态', + dataIndex: 'orderStatus', + key: 'orderStatus', + width: 90, + render: (s) => ( + +
+ {orderStatusConfig[s]?.label} +
+ ) + }, + { + title: '操作', + key: 'action', + width: 60, + fixed: "right", + render: () => + }, + ]; + return ( -
+
+ + {/* 顶部标题和页签 */}
- 工单任务 + 工单任务管理 {
{/* 统计卡片 */} - {/* 统一风格统计卡片 —— 宽高一致 + 自动换行 + 最小宽度168px */} - + {stats.map((item, index) => ( -
- -
- {/* 左侧文字 */} -
-
{item.title}
- -
- {item.value} - {item.unit && {item.unit}} +
+ +
+
+
{item.title}
+
+
{item.value}
+ {item.unit && {item.unit}}
- -
- {item.subText} - +
+ {item.subText} + {item.subValue}
- - {/* 右侧图标 */} -
+
{item.icon}
@@ -342,78 +355,80 @@ const WorkOrderPage = () => { ))} + {/* 筛选栏 */} - - -
+ + +
- 工单类型 -
- +
- 优先级 -
- +
- 负责人 -
- +
- 时间范围 - + 时间范围 +
- +
- 状态 -
- +
- 关键词 - } /> + 关键词 + } size="small" />
- + - - + + - + {/* 左侧:列表 + 底部图表 */} - + 工单列表(共 {workOrderTotal} 条)} + title={工单列表(共 {workOrderTotal} 条)} bodyStyle={{ padding: 0 }} - style={{ borderRadius: 8, marginBottom: 16 }} + style={{ ...cardStyle, marginBottom: 16 }} >
{ onChange: handleRowSelect }} /> -
+
- -
- -
+ +
+ 工单状态分布} style={{ ...cardStyle, height: 380 }}> +
{ const total = pieData.reduce((a, b) => a + b.value, 0); - const percent = ((item.value / total) * 100).toFixed(2); + const percent = ((item.value / total) * 100).toFixed(1); return `${item.value} (${percent}%)`; } } }} - height={240} + height={260} />
-
总数
-
{workOrderTotal}
+
总数
+
{workOrderTotal}
- + 任务排班 / 日历视图} extra={} - style={{ borderRadius: 8, height: 360 }} + style={{ ...cardStyle, height: 380 }} + bodyStyle={{ padding: '16px' }} > -
+
-
-
-
+
+
+
{['08:00', '10:00', '12:00', '14:00', '16:00', '18:00'].map(t => ( -
{t}
+
{t}
))}
{['李工', '王工', '赵工', '陈工'].map((name, idx) => ( -
-
{name}
+
+
{name}
- {idx === 0 &&
INV-05 告警排查
08:30 - 12:00
} - {idx === 1 &&
B-12 热斑复检
13:30 - 15:00
} - {idx === 1 &&
无人机巡检
16:00-18:00
} - {idx === 2 &&
组件清洗 C-05
09:00 - 12:00
} - {idx === 2 &&
清洗效果复检
15:00 - 17:00
} - {idx === 3 &&
周界摄像头修复
10:00 - 12:30
} - {idx === 3 &&
设备巡检
15:30 - 17:30
} + {idx === 0 &&
INV-05 告警排查
08:30 - 12:00
} + {idx === 1 &&
B-12 热斑复检
13:30 - 15:00
} + {idx === 1 &&
无人机巡检
16:00-18:00
} + {idx === 2 &&
组件清洗 C-05
09:00 - 12:00
} + {idx === 2 &&
清洗效果复检
15:00 - 17:00
} + {idx === 3 &&
周界摄像头修复
10:00 - 12:30
} + {idx === 3 &&
设备巡检
15:30 - 17:30
}
))} @@ -499,26 +516,29 @@ const WorkOrderPage = () => { {/* 右侧:详情 + AI + 告警 */} -
+ -
- 工单详情 - 工单编号: {currentDetail?.orderNo || '--'} +
+ 工单详情 + 工单编号: {currentDetail?.orderNo || '--'}
-
-
- {currentDetail?.orderTitle || '暂无标题'} +
+
+ {currentDetail?.orderTitle || '暂无标题'} {currentDetail?.priorityLevel && ( {priorityConfig[currentDetail.priorityLevel].label}优先级 @@ -526,126 +546,133 @@ const WorkOrderPage = () => { )}
- -
来源:{currentDetail?.sourceType || '--'} - 工单类型:{orderTypeConfig[currentDetail?.orderType] || '--'} - 负责人:{currentDetail?.assigneeName || '--'} - 协同人员:{currentDetail?.collaboratorNames || '无'} - 计划时间:{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'} - 关联设备:{currentDetail?.deviceName || '无'} - 关联电站:{currentDetail?.siteName || '无'} + + 来源:{currentDetail?.sourceType || '--'} + 工单类型:{orderTypeConfig[currentDetail?.orderType] || '--'} + 负责人:{currentDetail?.assigneeName || '--'} + 协同人员:{currentDetail?.collaboratorNames || '无'} + 计划时间:{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'} + 关联设备:{currentDetail?.deviceName || '无'} + 关联区域:{currentDetail?.siteName || '无'}- 当前状态: - {orderStatusConfig[currentDetail?.orderStatus]?.label || '--'} + 当前状态: + {orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}- 任务描述: - {currentDetail?.taskDescription || '暂无描述'} + 任务描述: +
{currentDetail?.taskDescription || '暂无描述'}
-
-
-
- -
已创建
-
-
-
- -
已派发
-
-
-
-
3
-
执行中
-
-
-
-
4
-
已完成
+
+
+ {/* 连线 */} +
+
= 3 ? '100%' : (currentDetail?.orderStatus === 2 ? '66%' : '33%'), height: '100%', background: '#00B42A' }}>
+ + {[ + { label: '已创建', step: 1, active: currentDetail?.orderStatus >= 1 }, + { label: '已派发', step: 2, active: currentDetail?.orderStatus >= 2 }, + { label: '执行中', step: 3, active: currentDetail?.orderStatus >= 2 }, + { label: '已完成', step: 4, active: currentDetail?.orderStatus >= 4 }, + ].map(item => ( +
+
+ {item.active ? : item.step} +
+
{item.label}
+
+ ))}
- -
- - - + + + + + AI 建议与关联信息} - style={{ borderRadius: 8, marginBottom: 16 }} - bodyStyle={{ padding: '12px' }} + title={AI 建议与关联信息} + style={{ ...cardStyle, marginTop: 16 }} + bodyStyle={{ padding: '16px' }} > - + -
- -
建议携带
-
{currentDetail?.requiredEquipment || '无'}
+
+
+ +
+
建议携带
+
红外热像设备
-
- -
AI建议方案
-
{currentDetail?.aiSuggestion || '无'}
+
+
+ +
+
优先复检组件
+
B-12-03 / B-12-05
-
- -
预计发电影响
-
{currentDetail?.estimatedImpact ?? 0}%
+
+
+ +
+
预计影响发电
+
2.1%
- - -
- + + +
关联告警趋势 (近 7 天)
- - - - 查看全部 } style={{ borderRadius: 8 }}> -
-
- - INV-05 逆变器告警 - 05-24 10:24 -
-
- - B-12 区块热斑告警 - 05-24 09:56 -
-
- - B-12 组件温度异常 - 05-24 09:32 -
+ +
+
+
关联告警列表 (近 3 条)
+
- - - +
+ {[ + { title: 'INV-05 逆变器告警', time: '05-24 10:24', status: 'error' }, + { title: 'B-12 区块热斑告警', time: '05-24 09:56', status: 'warning' }, + { title: 'B-12 组件温度异常', time: '05-24 09:32', status: 'warning' }, + ].map((item, idx) => ( +
+
+ {item.title} + {item.time} +
+ ))} +
+ + +