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

660 lines
27 KiB
TypeScript
Raw Normal View History

2026-05-07 21:17:41 +08:00
import React, { useState } from 'react';
import {
2026-05-14 12:44:18 +08:00
Row, Col, Card, Button, Tag, Table, Typography, Space, Statistic, message, Divider, Tooltip, Avatar, Empty
2026-05-07 21:17:41 +08:00
} from 'antd';
2026-05-11 14:59:36 +08:00
import {
ReloadOutlined, InfoCircleOutlined, ThunderboltOutlined,
LineChartOutlined, AppstoreOutlined, BellOutlined,
CheckCircleOutlined, CalendarOutlined, ArrowUpOutlined,
ArrowDownOutlined, RiseOutlined, FallOutlined, ScanOutlined,
2026-05-14 12:44:18 +08:00
DatabaseOutlined, CloudOutlined, RestOutlined, AimOutlined,
SelectOutlined, FireOutlined, WarningOutlined, ExclamationCircleOutlined
2026-05-11 14:59:36 +08:00
} from '@ant-design/icons';
import { Line, Area } from '@ant-design/charts';
2026-05-14 15:15:50 +08:00
import { UniversalLineChart } from "../components/recharts"
2026-05-07 21:17:41 +08:00
const { Title, Text } = Typography;
// 模拟数据
const aiSummaryData = [
2026-05-11 14:59:36 +08:00
{ key: '1', diagnosis: '热斑检测', status: '异常', confidence: '92%', impact: '高', conclusion: '检测到 36 处热斑疑似点' },
{ key: '2', diagnosis: '组串失配', status: '异常', confidence: '90%', impact: '高', conclusion: '8 串组串存在异常' },
{ key: '3', diagnosis: '遮挡风险', status: '轻微', confidence: '78%', impact: '中', conclusion: '局部遮挡影响 2% 发电量' },
{ key: '4', diagnosis: '组件衰减', status: '异常', confidence: '86%', impact: '中', conclusion: '平均衰减率 -5.32%' },
{ key: '5', diagnosis: '逆变器效率异常', status: '正常', confidence: '93%', impact: '低', conclusion: '所有逆变器运行正常' },
2026-05-07 21:17:41 +08:00
];
const aiRecommendations = [
2026-05-11 14:59:36 +08:00
{ key: '1', measure: '处理热斑组件', priority: '高', expectedGain: '+2.15%', confidence: '92%' },
{ key: '2', measure: '排查异常组串', priority: '高', expectedGain: '+1.85%', confidence: '90%' },
{ key: '3', measure: '清洗受遮挡区域', priority: '中', expectedGain: '+0.45%', confidence: '78%' },
{ key: '4', measure: '跟踪衰减较大组件', priority: '中', expectedGain: '+0.35%', confidence: '86%' },
{ key: '5', measure: '持续监控逆变器效率', priority: '低', expectedGain: '+0.10%', confidence: '93%' },
2026-05-07 21:17:41 +08:00
];
const thermalImagingData = [
2026-05-14 12:44:18 +08:00
{ name: '方阵 A-05', temp: '71.5℃', id: 'A05', status: 'serious' },
{ name: '方阵 A-12', temp: '68.3℃', id: 'A12', status: 'warning' },
{ name: '方阵 B-03', temp: '64.8℃', id: 'B03', status: 'warning' },
{ name: '方阵 C-07', temp: '67.2℃', id: 'C07', status: 'warning' },
2026-05-07 21:17:41 +08:00
];
2026-05-14 15:15:50 +08:00
const degradationData = [
{
date: '2024-01',
average: 0,
best: 0,
worst: -1.0,
2026-05-11 14:59:36 +08:00
},
2026-05-14 15:15:50 +08:00
{
date: '2024-04',
average: -1.2,
best: -0.5,
worst: -2.5,
},
{
date: '2024-07',
average: -2.5,
best: -1.0,
worst: -4.0,
},
{
date: '2024-10',
average: -3.8,
best: -1.5,
worst: -6.5,
},
{
date: '2025-01',
average: -4.5,
best: -2.0,
worst: -8.0,
},
{
date: '2025-05',
average: -5.32,
best: -2.5,
worst: -10.2,
},
];
2026-05-07 21:17:41 +08:00
2026-05-14 15:15:50 +08:00
const generationPerformanceData = [
{
time: '00:00',
actual: 0,
predict: 0,
theory: 0,
},
{
time: '03:00',
actual: 0,
predict: 0,
theory: 0,
},
{
time: '06:00',
actual: 100,
predict: 150,
theory: 200,
2026-05-11 14:59:36 +08:00
},
2026-05-14 15:15:50 +08:00
{
time: '09:00',
actual: 800,
predict: 950,
theory: 1100,
},
{
time: '12:00',
actual: 1400,
predict: 1650,
theory: 1800,
},
{
time: '15:00',
actual: 1200,
predict: 1350,
theory: 1500,
},
{
time: '18:00',
actual: 400,
predict: 550,
theory: 650,
},
{
time: '21:00',
actual: 0,
predict: 0,
theory: 0,
},
{
time: '24:00',
actual: 0,
predict: 0,
theory: 0,
},
];
2026-05-07 21:17:41 +08:00
2026-05-14 13:30:29 +08:00
2026-05-07 21:17:41 +08:00
export default function AIDiagnosisPage() {
2026-05-14 12:44:18 +08:00
const cardStyle = {
borderRadius: 12,
border: '1px solid #f0f0f0',
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
overflow: 'hidden'
};
2026-05-07 21:17:41 +08:00
const renderStatusTag = (status: string) => {
2026-05-14 15:54:40 +08:00
let color = '';
if (status === '异常') color = '#ff4d4f';
else if (status === '轻微') color = '#1677ff';
else if (status === '正常') color = '#52c41a';
return <Tag color={color} style={{ margin: 0, fontWeight: 600 }}>{status}</Tag>;
2026-05-07 21:17:41 +08:00
};
2026-05-14 15:54:40 +08:00
// 影响程度标签渲染
2026-05-11 14:59:36 +08:00
const renderImpactTag = (impact: string) => {
2026-05-14 15:54:40 +08:00
let color = '';
if (impact === '高') color = '#ff4d4f';
else if (impact === '中') color = '#fa8c16';
else if (impact === '低') color = '#52c41a';
return <Tag color={color} style={{ margin: 0, fontWeight: 600 }}>{impact}</Tag>;
};
// 优先级标签渲染(建议措施用)
const renderPriorityTag = (priority: string) => {
let color = '';
if (priority === '高') color = '#ff4d4f';
else if (priority === '中') color = '#fa8c16';
else if (priority === '低') color = '#52c41a';
return <Tag color={color} style={{ margin: 0, fontWeight: 600 }}>{priority}</Tag>;
2026-05-07 21:17:41 +08:00
};
return (
2026-05-14 10:52:45 +08:00
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box', overflowX: 'hidden' }}>
2026-05-14 13:30:29 +08:00
2026-05-14 12:44:18 +08:00
<style>
{`
.compact-table .ant-table-thead > tr > th {
background: #f8fafc;
padding: 8px 12px !important;
font-size: 12px;
color: #4E5969;
}
.compact-table .ant-table-tbody > tr > td {
padding: 8px 12px !important;
font-size: 12px;
}
.thermal-card:hover {
transform: translateY(-2px);
transition: all 0.3s;
}
.grid-item:hover {
filter: brightness(0.9);
cursor: pointer;
}
`}
</style>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: "16px" }}>
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', fontWeight: 800, color: '#1D2129' }}>
AI 智能诊断与分析中心
</Typography.Title>
<Space>
<Button icon={<ReloadOutlined />}>刷新数据</Button>
<Button type="primary">导出报告</Button>
</Space>
2026-05-14 10:47:56 +08:00
</div>
2026-05-14 10:52:45 +08:00
{/* 第一排:顶部统计卡片 */}
2026-05-14 12:44:18 +08:00
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
2026-05-11 14:59:36 +08:00
{[
2026-05-14 12:44:18 +08:00
{ title: 'PR值 (性能比)', value: '82.6%', trend: '较昨日 -1.3%', icon: <RiseOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
{ title: '发电偏差率', value: '-4.35%', trend: '较昨日 -1.02%', icon: <FallOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'down' },
{ title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: <AppstoreOutlined />, color: '#1D2129', bg: '#F5F7FA', trendColor: '#F53F3F', direction: 'up' },
{ title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: <BellOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'up' },
{ title: '电站健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: <CheckCircleOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
{ title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon: <ThunderboltOutlined />, color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' },
2026-05-11 14:59:36 +08:00
].map((item, index) => (
2026-05-14 10:52:45 +08:00
<Col key={index} xs={24} sm={12} md={8} xl={4}>
2026-05-14 09:37:15 +08:00
<Card
bordered={false}
2026-05-14 12:44:18 +08:00
bodyStyle={{ padding: '20px 16px' }}
style={{ ...cardStyle, height: '100%' }}
2026-05-14 09:37:15 +08:00
>
2026-05-14 12:44:18 +08:00
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
<div style={{ flex: 1 }}>
<div style={{ fontSize: 'clamp(12px, 0.8vw, 13px)', color: '#86909C', marginBottom: 8, whiteSpace: 'nowrap' }}>{item.title}</div>
<div style={{ fontSize: 'clamp(20px, 1.4vw, 24px)', fontWeight: 800, color: item.color, display: 'flex', alignItems: 'baseline', gap: 4 }}>
2026-05-14 09:37:15 +08:00
{item.value}
2026-05-14 12:44:18 +08:00
{item.unit && <span style={{ fontSize: 13, fontWeight: 400, color: '#86909C' }}>{item.unit}</span>}
2026-05-11 14:59:36 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ fontSize: 11, color: '#86909C', marginTop: 10, display: 'flex', alignItems: 'center', gap: 4 }}>
<span style={{ color: item.trendColor }}>{item.trend}</span>
{item.direction === 'up' ? <ArrowUpOutlined style={{ color: item.trendColor }} /> : <ArrowDownOutlined style={{ color: item.trendColor }} />}
2026-05-11 14:59:36 +08:00
</div>
</div>
2026-05-14 09:37:15 +08:00
<div style={{
2026-05-14 12:44:18 +08:00
width: 44, height: 44, background: item.bg, borderRadius: '12px',
display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0,
boxShadow: `0 4px 10px ${item.bg}80`
2026-05-14 09:37:15 +08:00
}}>
2026-05-14 12:44:18 +08:00
{React.cloneElement(item.icon as React.ReactElement, { style: { fontSize: 22, color: item.color === '#1D2129' ? '#4E5969' : item.color } })}
2026-05-11 14:59:36 +08:00
</div>
</div>
</Card>
</Col>
))}
2026-05-07 21:17:41 +08:00
</Row>
2026-05-11 14:59:36 +08:00
{/* 第二排:热成像分析 和 组串异常定位 */}
2026-05-14 10:52:45 +08:00
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
<Col xs={24} lg={10}>
2026-05-07 21:17:41 +08:00
<Card
2026-05-14 12:44:18 +08:00
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>无人机热成像巡检分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
extra={<Text type="secondary" style={{ fontSize: 12 }}>巡检:2025-05-20 09:30 <CalendarOutlined style={{ marginLeft: 4 }} /></Text>}
2026-05-07 21:17:41 +08:00
bordered={false}
2026-05-14 12:44:18 +08:00
bodyStyle={{ padding: '16px 20px' }}
2026-05-14 10:52:45 +08:00
style={{ ...cardStyle, height: '100%' }}
2026-05-07 21:17:41 +08:00
>
<Row gutter={[12, 12]}>
{thermalImagingData.map((item, idx) => (
2026-05-11 14:59:36 +08:00
<Col span={6} key={idx}>
2026-05-14 12:44:18 +08:00
<div className="thermal-card" style={{ background: '#000', borderRadius: 8, height: 'clamp(90px, 9vw, 120px)', position: 'relative', overflow: 'hidden', border: '1px solid #333', cursor: 'pointer' }}>
<div style={{ width: '100%', height: '100%', background: 'linear-gradient(135deg, #1a0000 0%, #7a0000 30%, #ff4d4f 60%, #ffec3d 100%)', opacity: 0.9 }} />
{/* 模拟热斑点 */}
<div style={{ position: 'absolute', top: '25%', left: '35%', width: 14, height: 14, border: '2px solid #fff', borderRadius: '50%', boxShadow: '0 0 12px #ff4d4f', animation: 'pulse 2s infinite' }} />
<div style={{ position: 'absolute', bottom: 6, right: 6, background: 'rgba(0,0,0,0.7)', color: '#fff', padding: '2px 6px', borderRadius: 4, fontSize: 10, fontWeight: 600, letterSpacing: 0.5 }}>
2026-05-11 14:59:36 +08:00
{item.temp}
2026-05-07 21:17:41 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ position: 'absolute', top: 6, left: 6 }}>
<Tag color={item.status === 'serious' ? 'error' : 'warning'} style={{ margin: 0, fontSize: 9, padding: '0 4px', lineHeight: '14px' }}>
{item.status === 'serious' ? '高危' : '注意'}
</Tag>
</div>
2026-05-07 21:17:41 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ textAlign: 'center', marginTop: 10, fontSize: 12, fontWeight: 500, color: '#4E5969' }}>{item.name}</div>
2026-05-07 21:17:41 +08:00
</Col>
))}
</Row>
2026-05-14 12:44:18 +08:00
<div style={{ background: '#f8fafc', padding: '12px 16px', borderRadius: 8, marginTop: 20, display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 12 }}>
<div style={{ display: 'flex', gap: 16, fontSize: 12 }}>
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><AimOutlined style={{ color: '#F53F3F', marginRight: 6 }} />热斑疑似点</span>
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><div style={{ width: 14, height: 10, border: '1.5px dashed #F53F3F', borderRadius: 2, marginRight: 6 }}></div>高温区域</span>
2026-05-11 14:59:36 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<span style={{ fontSize: 12, color: '#86909C' }}>温度分布: 25℃ ~ 85℃</span>
<div style={{ width: 120, height: 8, background: 'linear-gradient(to right, #000080, #0000ff, #00ff00, #ffff00, #ff0000)', borderRadius: 4 }} />
2026-05-07 21:17:41 +08:00
</div>
</div>
</Card>
</Col>
2026-05-14 10:52:45 +08:00
<Col xs={24} lg={14}>
2026-05-07 21:17:41 +08:00
<Card
2026-05-14 12:44:18 +08:00
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>组串实时状态定位图<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
extra={<Space split={<Divider type="vertical" />} style={{ fontSize: 12, color: '#86909C' }}>
<span>总组串: <b style={{ color: '#1D2129' }}>160</b></span>
<span>异常: <b style={{ color: '#F53F3F' }}>8</b></span>
</Space>}
2026-05-07 21:17:41 +08:00
bordered={false}
2026-05-14 12:44:18 +08:00
bodyStyle={{ padding: '16px 20px' }}
2026-05-14 10:52:45 +08:00
style={{ ...cardStyle, height: '100%' }}
2026-05-07 21:17:41 +08:00
>
2026-05-14 12:44:18 +08:00
<Row gutter={[20, 20]}>
<Col xs={24} md={18}>
<div style={{ overflowX: 'auto', paddingBottom: 8 }} className="custom-scrollbar">
<div style={{ minWidth: 500 }}>
<div style={{ display: 'grid', gridTemplateColumns: '40px repeat(20, 1fr)', gap: '4px' }}>
2026-05-14 10:52:45 +08:00
<div></div>
{Array.from({ length: 20 }).map((_, i) => (
2026-05-14 12:44:18 +08:00
<div key={i} style={{ fontSize: 11, color: '#86909C', textAlign: 'center', fontWeight: 500 }}>{String(i + 1).padStart(2, '0')}</div>
2026-05-14 10:52:45 +08:00
))}
{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => (
<React.Fragment key={row}>
2026-05-14 12:44:18 +08:00
<div style={{ fontSize: 11, color: '#86909C', display: 'flex', alignItems: 'center', fontWeight: 600 }}>{row}排</div>
2026-05-14 10:52:45 +08:00
{Array.from({ length: 20 }).map((_, col) => {
2026-05-14 12:44:18 +08:00
let color = '#E8F3FF'; // 正常
2026-05-14 10:52:45 +08:00
let icon = null;
2026-05-14 12:44:18 +08:00
let tooltip = `组串 ${row}-${col + 1}: 正常`;
// 模拟异常分布
if (row === 'B' && col === 3) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 严重异常 (热斑)`; }
if (row === 'B' && col === 17) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 严重异常 (断路)`; }
if (row === 'C' && col === 15) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 异常 (功率偏差)`; }
if (row === 'E' && col === 4) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 异常 (遮挡)`; }
if (row === 'F' && col === 11) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; }
if (row === 'G' && col === 1) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; }
if (row === 'H' && col === 10) { color = '#86909C'; tooltip = `组串 ${row}-${col + 1}: 离线`; }
2026-05-11 14:59:36 +08:00
2026-05-14 10:52:45 +08:00
return (
2026-05-14 12:44:18 +08:00
<Tooltip title={tooltip} key={`${row}-${col}`}>
<div className="grid-item" style={{ width: '100%', height: 18, background: color, borderRadius: 3, display: 'flex', justifyContent: 'center', alignItems: 'center', transition: 'all 0.2s' }}>
{icon}
</div>
</Tooltip>
2026-05-14 10:52:45 +08:00
);
})}
</React.Fragment>
))}
</div>
</div>
2026-05-07 21:17:41 +08:00
</div>
2026-05-14 12:44:18 +08:00
<div style={{ display: 'flex', gap: 16, marginTop: 20, fontSize: 11, flexWrap: 'wrap', background: '#f8fafc', padding: '8px 12px', borderRadius: 6 }}>
2026-05-14 10:52:45 +08:00
{[
2026-05-14 12:44:18 +08:00
{ color: '#E8F3FF', label: '运行正常' },
{ color: '#F7BA1E', label: '轻微异常' },
{ color: '#FF7D00', label: '功率异常' },
{ color: '#F53F3F', label: '严重故障' },
{ color: '#86909C', label: '设备离线' },
2026-05-14 10:52:45 +08:00
].map(item => (
2026-05-14 12:44:18 +08:00
<span key={item.label} style={{ display: 'flex', alignItems: 'center', color: '#4E5969' }}>
<span style={{ width: 10, height: 10, background: item.color, marginRight: 6, borderRadius: 2 }}></span>
{item.label}
</span>
2026-05-14 10:52:45 +08:00
))}
2026-05-07 21:17:41 +08:00
</div>
2026-05-11 14:59:36 +08:00
</Col>
2026-05-14 12:44:18 +08:00
<Col xs={24} md={6}>
<div style={{ background: '#f8fafc', padding: 16, borderRadius: 8, height: '100%' }}>
<div style={{ fontSize: 13, fontWeight: 700, color: '#1D2129', marginBottom: 16, display: 'flex', alignItems: 'center' }}>
<WarningOutlined style={{ marginRight: 8, color: '#F53F3F' }} />异常类型分布
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
{[
{ 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 => (
<div key={item.label}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 6 }}>
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
<span style={{ fontWeight: 700, color: item.color, fontSize: 13 }}>{item.value}</span>
</div>
<div style={{ width: '100%', height: 4, background: '#E5E6EB', borderRadius: 2 }}>
<div style={{ width: item.percent, height: '100%', background: item.color, borderRadius: 2 }}></div>
</div>
</div>
))}
</div>
<Divider style={{ margin: '16px 0' }} />
<Button block type="dashed" size="small" style={{ fontSize: 12 }}>查看详细定位表</Button>
2026-05-07 21:17:41 +08:00
</div>
2026-05-11 14:59:36 +08:00
</Col>
</Row>
2026-05-07 21:17:41 +08:00
</Card>
</Col>
</Row>
2026-05-14 12:44:18 +08:00
{/* 第三排:三个主要分析区域 */}
2026-05-14 10:52:45 +08:00
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
2026-05-14 12:44:18 +08:00
<Col xs={24} lg={7}>
<Card
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>组件衰减趋势分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
bordered={false}
bodyStyle={{ padding: '16px 20px' }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
<span>衰减率趋势 (%)</span>
<span style={{ color: '#F53F3F', fontWeight: 600 }}>当前均值: -5.32%</span>
</div>
2026-05-14 15:15:50 +08:00
<UniversalLineChart
data={degradationData}
xKey="date"
height={240}
smooth
dot
showGrid
showLegend
series={[
{
key: 'average',
name: '平均衰减率',
color: '#165DFF',
strokeWidth: 3,
},
{
key: 'best',
name: '最佳组件',
color: '#00B42A',
strokeWidth: 2,
},
{
key: 'worst',
name: '最差组件',
color: '#F53F3F',
strokeWidth: 2,
},
]}
/> <div style={{ marginTop: 16, padding: '12px', background: '#FFF7E8', borderRadius: 8, border: '1px solid #FFE4BA' }}>
2026-05-14 12:44:18 +08:00
<div style={{ fontSize: 12, color: '#86909C', display: 'flex', alignItems: 'center' }}>
<ExclamationCircleOutlined style={{ color: '#FF7D00', marginRight: 6 }} />
<span style={{ color: '#1D2129', fontWeight: 600 }}>衰减预警:</span>
<span style={{ marginLeft: 4 }}>12块组件衰减超标, 建议排查。</span>
</div>
</div>
</Card>
</Col>
2026-05-11 14:59:36 +08:00
2026-05-14 12:44:18 +08:00
<Col xs={24} lg={10}>
<Card
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>实时发电表现深度分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
bordered={false}
bodyStyle={{ padding: '16px 20px' }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ display: 'flex', gap: 20 }}>
<div style={{ flex: 1 }}>
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16 }}>发电量对比分析 (kWh)</div>
2026-05-14 15:15:50 +08:00
<UniversalLineChart
data={generationPerformanceData}
xKey="time"
height={240}
smooth
dot={false}
showGrid
showLegend
series={[
{
key: 'actual',
name: '实际发电',
color: '#165DFF',
strokeWidth: 3,
},
{
key: 'predict',
name: '预测发电',
color: '#00B42A',
strokeWidth: 2,
},
{
key: 'theory',
name: '理论发电',
color: '#86909C',
strokeWidth: 2,
},
]}
/> </div>
2026-05-14 12:44:18 +08:00
<div style={{ width: 120, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 16, flexShrink: 0, paddingLeft: 16, borderLeft: '1px solid #f0f0f0' }}>
{[
{ 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 => (
<div key={item.label}>
<div style={{ color: '#86909C', marginBottom: 4, fontSize: 11 }}>{item.label}</div>
<div style={{ fontWeight: 800, color: item.color, fontSize: 15 }}>{item.value} <span style={{ fontSize: 10, fontWeight: 400, color: '#86909C' }}>{item.unit}</span></div>
2026-05-11 14:59:36 +08:00
</div>
2026-05-14 12:44:18 +08:00
))}
</div>
</div>
</Card>
2026-05-07 21:17:41 +08:00
</Col>
2026-05-11 14:59:36 +08:00
2026-05-14 12:44:18 +08:00
<Col xs={24} lg={7}>
2026-05-07 21:17:41 +08:00
<Card
bordered={false}
2026-05-11 14:59:36 +08:00
bodyStyle={{ padding: 0 }}
2026-05-14 10:52:45 +08:00
style={{ ...cardStyle, height: '100%' }}
2026-05-07 21:17:41 +08:00
>
2026-05-14 15:54:40 +08:00
{/* AI诊断总结 */}
2026-05-14 12:44:18 +08:00
<div style={{ padding: '16px 20px' }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
2026-05-14 15:54:40 +08:00
<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>AI 诊断总结</span>
<span style={{ fontSize: 13, color: '#86909C' }}>更新时间: 2025-05-20 09:45</span>
2026-05-14 12:44:18 +08:00
</div>
2026-05-07 21:17:41 +08:00
<Table
columns={[
2026-05-14 15:54:40 +08:00
{
title: '诊断项',
dataIndex: 'diagnosis',
key: 'diagnosis',
width: 90
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: renderStatusTag,
width: 60
},
{
title: '置信度',
dataIndex: 'confidence',
key: 'confidence',
width: 70
},
{
title: '影响程度',
dataIndex: 'impact',
key: 'impact',
render: renderImpactTag,
width: 70
},
{
title: '详情',
dataIndex: 'detail',
key: 'detail',
ellipsis: true
},
]}
dataSource={[
{ key: '1', diagnosis: '热斑检测', status: '异常', confidence: '92%', impact: '高', detail: '检测到 36 处热斑疑似点' },
{ key: '2', diagnosis: '组串失配', status: '异常', confidence: '90%', impact: '高', detail: '8 串组串存在异常' },
{ key: '3', diagnosis: '遮挡风险', status: '轻微', confidence: '78%', impact: '中', detail: '局部遮挡影响 2% 发电量' },
{ key: '4', diagnosis: '组件衰减', status: '异常', confidence: '86%', impact: '中', detail: '平均衰减率 -5.32%' },
{ key: '5', diagnosis: '逆变器效率异常', status: '正常', confidence: '93%', impact: '低', detail: '所有逆变器运行正常' },
2026-05-07 21:17:41 +08:00
]}
pagination={false}
size="small"
2026-05-14 12:44:18 +08:00
className="compact-table"
2026-05-14 15:54:40 +08:00
rowKey="key"
2026-05-07 21:17:41 +08:00
/>
2026-05-14 12:44:18 +08:00
</div>
2026-05-14 15:54:40 +08:00
2026-05-14 12:44:18 +08:00
<Divider style={{ margin: 0 }} />
2026-05-14 15:54:40 +08:00
{/* AI建议与处置 */}
2026-05-14 12:44:18 +08:00
<div style={{ padding: '16px 20px' }}>
2026-05-14 15:54:40 +08:00
<div style={{ fontSize: 15, fontWeight: 700, color: '#1D2129', marginBottom: 16 }}>
AI 建议与处置
2026-05-14 12:44:18 +08:00
</div>
2026-05-07 21:17:41 +08:00
<Table
columns={[
2026-05-14 15:54:40 +08:00
{
title: '建议措施',
dataIndex: 'measure',
key: 'measure',
ellipsis: true
},
{
title: '优先级',
dataIndex: 'priority',
key: 'priority',
render: renderPriorityTag,
width: 70
},
{
title: '预计收益',
dataIndex: 'gain',
key: 'gain',
render: (g) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>,
width: 80
},
{
title: '置信度',
dataIndex: 'confidence',
key: 'confidence',
width: 70
},
2026-05-11 14:59:36 +08:00
{
title: '操作',
key: 'action',
2026-05-14 15:54:40 +08:00
width: 90,
render: (_, record) => (
<Button
type="primary"
size="small"
style={{ fontSize: 12, borderRadius: 6, height: 28 }}
>
{record.isView ? '查看详情' : '创建工单'}
2026-05-14 12:44:18 +08:00
</Button>
)
2026-05-07 21:17:41 +08:00
},
]}
2026-05-14 15:54:40 +08:00
dataSource={[
{ key: '1', measure: '处理热斑组件', priority: '高', gain: '+2.15%', confidence: '92%', isView: false },
{ key: '2', measure: '排查异常组串', priority: '高', gain: '+1.85%', confidence: '90%', isView: false },
{ key: '3', measure: '清洗受遮挡区域', priority: '中', gain: '+0.45%', confidence: '78%', isView: false },
{ key: '4', measure: '跟踪衰减较大组件', priority: '中', gain: '+0.35%', confidence: '86%', isView: false },
{ key: '5', measure: '持续监控逆变器效率', priority: '低', gain: '+0.10%', confidence: '93%', isView: true },
]}
2026-05-07 21:17:41 +08:00
pagination={false}
size="small"
2026-05-14 12:44:18 +08:00
className="compact-table"
2026-05-14 15:54:40 +08:00
rowKey="key"
2026-05-07 21:17:41 +08:00
/>
</div>
</Card>
</Col>
</Row>
2026-05-14 12:44:18 +08:00
{/* 底部:数据来源 */}
<Card
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>全栈数据融合来源</span>}
bordered={false}
bodyStyle={{ padding: '16px 20px' }}
style={cardStyle}
>
<Row gutter={[16, 16]}>
{[
{ title: '无人机载荷热成像', time: '2025-05-20 09:30', icon: <ScanOutlined />, status: '同步中' },
{ title: 'SCADA 实时遥测数据', time: '2025-05-20 09:45:12', icon: <DatabaseOutlined />, status: '正常' },
{ title: '云端气象分析站', time: '2025-05-20 09:45:00', icon: <CloudOutlined />, status: '正常' },
{ title: '电站运维资产库', time: '最近更新: 2025-05-18', icon: <RestOutlined />, status: '正常' },
].map((source, idx) => (
<Col xs={24} sm={12} md={6} key={idx}>
<div style={{ background: '#f8fafc', padding: '16px', borderRadius: 12, display: 'flex', alignItems: 'center', gap: 16, border: '1px solid #f0f0f0', transition: 'all 0.3s' }} className="thermal-card">
<div style={{ width: 48, height: 48, background: '#fff', borderRadius: 12, display: 'flex', justifyContent: 'center', alignItems: 'center', fontSize: 24, color: '#165DFF', boxShadow: '0 4px 10px rgba(0,0,0,0.05)' }}>
{source.icon}
</div>
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{ fontSize: 14, fontWeight: 700, color: '#1D2129' }}>{source.title}</div>
<div style={{ fontSize: 12, color: '#86909C', marginTop: 4, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>数据点: {source.time}</div>
<div style={{ fontSize: 11, color: source.status === '正常' ? '#00B42A' : '#165DFF', marginTop: 6, display: 'flex', alignItems: 'center', gap: 6 }}>
<div style={{ width: 6, height: 6, background: source.status === '正常' ? '#00B42A' : '#165DFF', borderRadius: '50%' }}></div>
状态: {source.status}
</div>
</div>
</div>
</Col>
))}
</Row>
</Card>
2026-05-07 21:17:41 +08:00
</div>
);
}
2026-05-14 12:44:18 +08:00