自适应完成
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Row, Col, Card, Button, Tag, Table, Typography, Space, Statistic, message, Divider, Tooltip
|
||||
Row, Col, Card, Button, Tag, Table, Typography, Space, Statistic, message, Divider, Tooltip, Avatar, Empty
|
||||
} from 'antd';
|
||||
import {
|
||||
ReloadOutlined, InfoCircleOutlined, ThunderboltOutlined,
|
||||
LineChartOutlined, AppstoreOutlined, BellOutlined,
|
||||
CheckCircleOutlined, CalendarOutlined, ArrowUpOutlined,
|
||||
ArrowDownOutlined, RiseOutlined, FallOutlined, ScanOutlined,
|
||||
DatabaseOutlined, CloudOutlined, RestOutlined
|
||||
DatabaseOutlined, CloudOutlined, RestOutlined, AimOutlined,
|
||||
SelectOutlined, FireOutlined, WarningOutlined, ExclamationCircleOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Line, Area } from '@ant-design/charts';
|
||||
|
||||
@@ -31,10 +32,10 @@ const aiRecommendations = [
|
||||
];
|
||||
|
||||
const thermalImagingData = [
|
||||
{ name: '方阵 A-05', temp: '71.5℃', id: 'A05' },
|
||||
{ name: '方阵 A-12', temp: '68.3℃', id: 'A12' },
|
||||
{ name: '方阵 B-03', temp: '64.8℃', id: 'B03' },
|
||||
{ name: '方阵 C-07', temp: '67.2℃', id: 'C07' },
|
||||
{ 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' },
|
||||
];
|
||||
|
||||
// 图表配置
|
||||
@@ -115,7 +116,12 @@ const generationPerformanceConfig = {
|
||||
};
|
||||
|
||||
export default function AIDiagnosisPage() {
|
||||
const cardStyle = { borderRadius: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' };
|
||||
const cardStyle = {
|
||||
borderRadius: 12,
|
||||
border: '1px solid #f0f0f0',
|
||||
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
// 状态标签渲染
|
||||
const renderStatusTag = (status: string) => {
|
||||
@@ -124,64 +130,83 @@ export default function AIDiagnosisPage() {
|
||||
'正常': '#00B42A',
|
||||
'轻微': '#F7BA1E',
|
||||
};
|
||||
return <span style={{ color: colorMap[status] }}>{status}</span>;
|
||||
return <span style={{ color: colorMap[status], fontWeight: 600 }}>{status}</span>;
|
||||
};
|
||||
|
||||
const renderImpactTag = (impact: string) => {
|
||||
const colorMap: Record<string, string> = { '高': '#F53F3F', '中': '#FF7D00', '低': '#00B42A' };
|
||||
return <span style={{ color: colorMap[impact] }}>{impact}</span>;
|
||||
return <span style={{ color: colorMap[impact], fontWeight: 600 }}>{impact}</span>;
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box', overflowX: 'hidden' }}>
|
||||
<div style={{ display: 'flex', paddingBottom: "12px" }}>
|
||||
<div style={{ padding: '4px 0' }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)' }}>AI诊断分析</Typography.Title>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
{/* 第一排:顶部统计卡片 */}
|
||||
<Row
|
||||
gutter={[12, 12]}
|
||||
style={{ marginBottom: 16 }}
|
||||
>
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
{[
|
||||
{ title: 'PR值', value: '82.6%', trend: '较昨日 -1.3%', icon: <RiseOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' },
|
||||
{ title: '发电偏差', value: '-4.35%', trend: '较昨日 -1.02%', icon: <FallOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' },
|
||||
{ title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: <AppstoreOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' },
|
||||
{ title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: <BellOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' },
|
||||
{ title: '健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: <CheckCircleOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' },
|
||||
{ title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon: <ThunderboltOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#00B42A' },
|
||||
{ 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' },
|
||||
].map((item, index) => (
|
||||
<Col key={index} xs={24} sm={12} md={8} xl={4}>
|
||||
<Card
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
style={{ borderRadius: 12, height: '100%', border: '1px solid #f0f0f0', boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '20px 16px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', height: '100%' }}>
|
||||
<div>
|
||||
<div style={{ fontSize: 'clamp(12px, 0.9vw, 14px)', color: '#4E5969', marginBottom: 8 }}>{item.title}</div>
|
||||
<div style={{ fontSize: 'clamp(20px, 1.6vw, 24px)', fontWeight: 700, color: item.color, display: 'flex', alignItems: 'baseline', gap: 4 }}>
|
||||
<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 }}>
|
||||
{item.value}
|
||||
{item.unit && <span style={{ fontSize: 14, fontWeight: 400 }}>{item.unit}</span>}
|
||||
{item.unit && <span style={{ fontSize: 13, fontWeight: 400, color: '#86909C' }}>{item.unit}</span>}
|
||||
</div>
|
||||
<div style={{ fontSize: 'clamp(10px, 0.8vw, 12px)', color: item.trendColor || '#86909C', marginTop: 8 }}>
|
||||
{item.trend}
|
||||
<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 }} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
width: 'clamp(40px, 3.5vw, 48px)',
|
||||
height: 'clamp(40px, 3.5vw, 48px)',
|
||||
background: item.bg,
|
||||
borderRadius: '50%',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flexShrink: 0
|
||||
width: 44, height: 44, background: item.bg, borderRadius: '12px',
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0,
|
||||
boxShadow: `0 4px 10px ${item.bg}80`
|
||||
}}>
|
||||
{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 } })}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -193,72 +218,87 @@ export default function AIDiagnosisPage() {
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Col xs={24} lg={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>热成像分析(无人机巡检)<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
extra={<Text type="secondary" style={{ fontSize: 'clamp(10px, 0.8vw, 12px)' }}>2025-05-20 09:30 <CalendarOutlined /></Text>}
|
||||
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>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
{thermalImagingData.map((item, idx) => (
|
||||
<Col span={6} key={idx}>
|
||||
<div style={{ background: '#111827', borderRadius: 4, height: 'clamp(80px, 8vw, 140px)', position: 'relative', overflow: 'hidden' }}>
|
||||
<div style={{ width: '100%', height: '100%', background: 'linear-gradient(45deg, #4c0000, #ff0000, #ffff00)', opacity: 0.8 }} />
|
||||
<div style={{ position: 'absolute', bottom: 4, right: 4, background: 'rgba(0,0,0,0.6)', color: '#fff', padding: '2px 6px', borderRadius: 2, fontSize: 10 }}>
|
||||
<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 }}>
|
||||
{item.temp}
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div style={{ textAlign: 'center', marginTop: 8, fontSize: 11, color: '#4E5969' }}>{item.name}</div>
|
||||
<div style={{ textAlign: 'center', marginTop: 10, fontSize: 12, fontWeight: 500, color: '#4E5969' }}>{item.name}</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginTop: 20, flexWrap: 'wrap', gap: 8 }}>
|
||||
<div style={{ display: 'flex', gap: 12, fontSize: 11 }}>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#F53F3F', marginRight: 4 }}></span>疑似点</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 2, border: '1px dashed #F53F3F', marginRight: 4 }}></span>高温区</span>
|
||||
<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>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<span style={{ fontSize: 11, color: '#86909C' }}>25℃ ~ 85℃</span>
|
||||
<div style={{ width: 80, height: 6, background: 'linear-gradient(to right, #0000ff, #00ff00, #ffff00, #ff0000)', borderRadius: 3 }} />
|
||||
<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 }} />
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col xs={24} lg={14}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>组串异常定位<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
extra={<div style={{ fontSize: 'clamp(10px, 0.8vw, 12px)', color: '#86909C' }}>异常:<span style={{ color: '#F53F3F' }}>8</span> / 160</div>}
|
||||
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>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col xs={24} sm={24} md={18}>
|
||||
<div style={{ overflowX: 'auto' }}>
|
||||
<div style={{ minWidth: 400 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '30px repeat(20, 1fr)', gap: 4 }}>
|
||||
<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' }}>
|
||||
<div></div>
|
||||
{Array.from({ length: 20 }).map((_, i) => (
|
||||
<div key={i} style={{ fontSize: 9, color: '#86909C', textAlign: 'center' }}>{String(i + 1).padStart(2, '0')}</div>
|
||||
<div key={i} style={{ fontSize: 11, color: '#86909C', textAlign: 'center', fontWeight: 500 }}>{String(i + 1).padStart(2, '0')}</div>
|
||||
))}
|
||||
{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => (
|
||||
<React.Fragment key={row}>
|
||||
<div style={{ fontSize: 9, color: '#86909C', display: 'flex', alignItems: 'center' }}>{row}排</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', display: 'flex', alignItems: 'center', fontWeight: 600 }}>{row}排</div>
|
||||
{Array.from({ length: 20 }).map((_, col) => {
|
||||
let color = '#E8F3FF';
|
||||
let color = '#E8F3FF'; // 正常
|
||||
let icon = null;
|
||||
if (row === 'B' && col === 3) { color = '#F53F3F'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'B' && col === 17) { color = '#F53F3F'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'C' && col === 15) { color = '#FF7D00'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'E' && col === 4) { color = '#FF7D00'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'F' && col === 11) { color = '#FF7D00'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
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 = <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}: 离线`; }
|
||||
|
||||
return (
|
||||
<div key={`${row}-${col}`} style={{ width: '100%', height: 12, background: color, borderRadius: 1, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
||||
{icon}
|
||||
</div>
|
||||
<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>
|
||||
);
|
||||
})}
|
||||
</React.Fragment>
|
||||
@@ -266,32 +306,46 @@ export default function AIDiagnosisPage() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 12, marginTop: 16, fontSize: 11, flexWrap: 'wrap' }}>
|
||||
<div style={{ display: 'flex', gap: 16, marginTop: 20, fontSize: 11, flexWrap: 'wrap', background: '#f8fafc', padding: '8px 12px', borderRadius: 6 }}>
|
||||
{[
|
||||
{ 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 => (
|
||||
<span key={item.label} style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 10, height: 10, background: item.color, marginRight: 4 }}></span>{item.label}</span>
|
||||
<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>
|
||||
))}
|
||||
</div>
|
||||
</Col>
|
||||
<Col xs={24} sm={24} md={6}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, marginBottom: 12 }}>异常统计</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
{[
|
||||
{ icon: <BellOutlined style={{ color: '#F53F3F' }} />, label: '严重异常', value: 2, color: '#F53F3F' },
|
||||
{ icon: <InfoCircleOutlined style={{ color: '#FF7D00' }} />, label: '异常', value: 4, color: '#FF7D00' },
|
||||
{ icon: <div style={{ width: 12, height: 12, background: '#56C1FF', borderRadius: 2 }} />, label: '轻微异常', value: 2, color: '#56C1FF' },
|
||||
{ icon: <div style={{ width: 12, height: 12, background: '#86909C', borderRadius: 2 }} />, label: '离线', value: 0, color: '#86909C' },
|
||||
].map(item => (
|
||||
<div key={item.label} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Space size={4} style={{ fontSize: 11 }}>{item.icon}{item.label}</Space>
|
||||
<span style={{ fontWeight: 700, color: item.color, fontSize: 12 }}>{item.value}</span>
|
||||
</div>
|
||||
))}
|
||||
<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>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -299,124 +353,147 @@ export default function AIDiagnosisPage() {
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* 第三排:衰减分析、发电表现、AI总结建议 */}
|
||||
{/* 第三排:三个主要分析区域 */}
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Col xs={24} xl={16}>
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col xs={24} md={12}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>组件衰减分析<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Line {...degradationConfig} height={220} autoFit />
|
||||
<div style={{ textAlign: 'right', marginTop: 12, fontSize: 12, color: '#4E5969' }}>
|
||||
当前平均衰减率 <span style={{ fontWeight: 700, color: '#F53F3F' }}>-5.32%</span>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} md={12}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>发电表现分析<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ display: 'flex', gap: 16, height: 220, flexWrap: "wrap" }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
<Line {...generationPerformanceConfig} height={220} autoFit />
|
||||
</div>
|
||||
<div style={{ width: 100, fontSize: 11, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 12, flexShrink: 0 }}>
|
||||
{[
|
||||
{ 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: 2 }}>{item.label}</div>
|
||||
<div style={{ fontWeight: 700, color: item.color }}>{item.value} <span style={{ fontSize: 9 }}>{item.unit}</span></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* 数据来源 */}
|
||||
<Row gutter={[12, 12]} style={{ marginTop: 12 }}>
|
||||
<Col span={24}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 13, fontWeight: 700 }}>数据来源</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
style={cardStyle}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
{[
|
||||
{ title: '无人机热成像', time: '05-20 09:30', icon: <ScanOutlined /> },
|
||||
{ title: 'SCADA历史数据', time: '05-20 00:00', icon: <DatabaseOutlined /> },
|
||||
{ title: '气象实况数据', time: '05-20 09:45', icon: <CloudOutlined /> },
|
||||
{ title: '最近清洗记录', time: '05-12 14:20', icon: <RestOutlined /> },
|
||||
].map((source, idx) => (
|
||||
<Col xs={12} sm={12} md={6} key={idx}>
|
||||
<div style={{ background: '#f8fafc', padding: '12px', borderRadius: 8, display: 'flex', alignItems: 'center', gap: 10, border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ fontSize: 20, color: '#165DFF', flexShrink: 0 }}>{source.icon}</div>
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{source.title}</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginTop: 2 }}>{source.time}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<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>
|
||||
<Line {...degradationConfig} height={240} autoFit />
|
||||
<div style={{ marginTop: 16, padding: '12px', background: '#FFF7E8', borderRadius: 8, border: '1px solid #FFE4BA' }}>
|
||||
<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>
|
||||
|
||||
{/* 右侧:AI 诊断与处置 */}
|
||||
<Col xs={24} xl={8}>
|
||||
<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>
|
||||
<Line {...generationPerformanceConfig} height={240} autoFit />
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} lg={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>AI 诊断与建议措施</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ padding: '0 8px' }}>
|
||||
<div style={{ padding: '16px 20px' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
|
||||
<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>AI 智能诊断总结</span>
|
||||
<Tag color="blue" style={{ margin: 0 }}>实时更新</Tag>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '诊断项', dataIndex: 'diagnosis', key: 'diagnosis', width: 90 },
|
||||
{ title: '状态', dataIndex: 'status', key: 'status', render: renderStatusTag, width: 50 },
|
||||
{ title: '结论', dataIndex: 'conclusion', key: 'conclusion', ellipsis: true },
|
||||
{ title: '诊断项', dataIndex: 'diagnosis', key: 'diagnosis', width: 85 },
|
||||
{ title: '状态', dataIndex: 'status', key: 'status', render: renderStatusTag, width: 60 },
|
||||
{ title: '置信度', dataIndex: 'confidence', key: 'confidence', width: 70 },
|
||||
{ title: '影响', dataIndex: 'impact', key: 'impact', render: renderImpactTag, width: 60 },
|
||||
]}
|
||||
dataSource={aiSummaryData}
|
||||
dataSource={aiSummaryData.slice(0, 4)}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
<Divider style={{ margin: '12px 0' }} />
|
||||
</div>
|
||||
<Divider style={{ margin: 0 }} />
|
||||
<div style={{ padding: '16px 20px' }}>
|
||||
<div style={{ fontSize: 15, fontWeight: 700, color: '#1D2129', marginBottom: 16, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
AI 建议与智能处置
|
||||
<Button type="link" size="small" style={{ fontSize: 12, padding: 0 }}>批量处理</Button>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '建议措施', dataIndex: 'measure', key: 'measure', ellipsis: true },
|
||||
{ title: '预期收益', dataIndex: 'expectedGain', key: 'expectedGain', render: (g) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>, width: 80 },
|
||||
{ title: '收益', dataIndex: 'expectedGain', key: 'expectedGain', render: (g) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>, width: 70 },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 65,
|
||||
render: () => <Button type="primary" size="small" style={{ fontSize: 11, borderRadius: 4 }}>工单</Button>
|
||||
width: 80,
|
||||
render: (text, record) => (
|
||||
<Button type="primary" size="small" style={{ fontSize: 11, borderRadius: 6, height: 24 }}>
|
||||
{record.key === '5' ? '详情' : '派单'}
|
||||
</Button>
|
||||
)
|
||||
},
|
||||
]}
|
||||
dataSource={aiRecommendations}
|
||||
dataSource={aiRecommendations.slice(0, 4)}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* 底部:数据来源 */}
|
||||
<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>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user