From d7808a38e154e5e388cb6eb83256286a0c5131ec Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Thu, 14 May 2026 10:52:45 +0800 Subject: [PATCH] =?UTF-8?q?AI=E5=88=86=E6=9E=90=E8=AF=8A=E6=96=AD=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AIAnalysis.tsx | 337 +++++++++++++++++---------------------- 1 file changed, 144 insertions(+), 193 deletions(-) diff --git a/src/pages/AIAnalysis.tsx b/src/pages/AIAnalysis.tsx index 0cd18f6..aba52ef 100644 --- a/src/pages/AIAnalysis.tsx +++ b/src/pages/AIAnalysis.tsx @@ -133,19 +133,17 @@ export default function AIDiagnosisPage() { }; return ( -
+
-
- AI诊断分析 +
+ AI诊断分析
-
+ + {/* 第一排:顶部统计卡片 */} {[ { title: 'PR值', value: '82.6%', trend: '较昨日 -1.3%', icon: , color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' }, @@ -155,34 +153,35 @@ export default function AIDiagnosisPage() { { 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' }, ].map((item, index) => ( - +
-
{item.title}
-
+
{item.title}
+
{item.value} {item.unit && {item.unit}}
-
+
{item.trend}
- {React.cloneElement(item.icon, { style: { fontSize: 24, color: item.color } })} + {React.cloneElement(item.icon, { style: { fontSize: 'clamp(20px, 1.8vw, 24px)', color: item.color } })}
@@ -191,105 +190,108 @@ export default function AIDiagnosisPage() { {/* 第二排:热成像分析 和 组串异常定位 */} - - + + 热成像分析(无人机巡检)} - extra={巡检时间:2025-05-20 09:30 } + title={热成像分析(无人机巡检)} + extra={2025-05-20 09:30 } bordered={false} bodyStyle={{ padding: 16 }} - style={cardStyle} + style={{ ...cardStyle, height: '100%' }} > {thermalImagingData.map((item, idx) => ( -
+
-
+
{item.temp}
-
{item.name}
+
{item.name}
))} -
-
- 热斑疑似点 - 高温区域 +
+
+ 疑似点 + 高温区
- 温度范围:25℃ ~ 85℃ -
+ 25℃ ~ 85℃ +
- + 组串异常定位} - extra={
总组串数:160 | 异常组串:8
} + title={组串异常定位} + extra={
异常:8 / 160
} bordered={false} bodyStyle={{ padding: 16 }} - style={cardStyle} + style={{ ...cardStyle, height: '100%' }} > - - -
-
- {Array.from({ length: 20 }).map((_, i) => ( -
{String(i + 1).padStart(2, '0')}
- ))} - {['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => ( - -
{row}排
- {Array.from({ length: 20 }).map((_, col) => { - 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'; } + + +
+
+
+
+ {Array.from({ length: 20 }).map((_, i) => ( +
{String(i + 1).padStart(2, '0')}
+ ))} + {['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => ( + +
{row}排
+ {Array.from({ length: 20 }).map((_, col) => { + 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'; } - return ( -
- {icon} -
- ); - })} -
- ))} + return ( +
+ {icon} +
+ ); + })} + + ))} +
+
-
- 正常 - 轻微异常 - 异常 - 严重异常 - 离线 +
+ {[ + { color: '#E8F3FF', label: '正常' }, + { color: '#56C1FF', label: '轻微' }, + { color: '#FF7D00', label: '异常' }, + { color: '#F53F3F', label: '严重' }, + { color: '#86909C', label: '离线' }, + ].map(item => ( + {item.label} + ))}
- -
异常类型统计
-
-
- 严重异常 - 2 -
-
- 异常 - 4 -
-
-
轻微异常 - 2 -
-
-
离线 - 0 -
+ +
异常统计
+
+ {[ + { 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} +
+ ))}
@@ -297,68 +299,47 @@ export default function AIDiagnosisPage() { - {/* 第三排:衰减分析、发电表现、AI总结建议 (等高设计) */} - - {/* 左侧:2个图表 + 数据来源 */} - - - {/* 组件衰减分析 */} - + {/* 第三排:衰减分析、发电表现、AI总结建议 */} + + + + - 组件衰减分析 - - - } + title={组件衰减分析} bordered={false} - bodyStyle={{ padding: 16, display: 'flex', flexDirection: 'column', flex: 1 }} - style={{ borderRadius: 8, height: '320px', display: 'flex', flexDirection: 'column' }} + bodyStyle={{ padding: 16 }} + style={{ ...cardStyle, height: '100%' }} > -
- -
-
- 当前平均衰减率 -5.32% + +
+ 当前平均衰减率 -5.32%
- {/* 发电表现分析 */} - + - 发电表现分析 - - - } + title={发电表现分析} bordered={false} - bodyStyle={{ padding: 16, display: 'flex', flexDirection: 'column', flex: 1 }} - style={{ borderRadius: 8, height: '320px', display: 'flex', flexDirection: 'column' }} + bodyStyle={{ padding: 16 }} + style={{ ...cardStyle, height: '100%' }} > -
+
- +
-
-
-
当日实际发电
-
4,752 kWh
-
-
-
当日预测发电
-
4,960 kWh
-
-
-
发电偏差
-
-4.35%
-
-
-
PR 值
-
82.6%
-
+
+ {[ + { 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}
+
+ ))}
@@ -366,41 +347,27 @@ export default function AIDiagnosisPage() { {/* 数据来源 */} - + 数据来源} bordered={false} bodyStyle={{ padding: 16 }} - style={{ borderRadius: 8 }} + style={cardStyle} > -
数据来源
- + {[ - { title: '无人机热成像', time: '2025-05-20 09:30', icon: }, - { title: 'SCADA历史数据', time: '2025-05-20 00:00 - 09:45', icon: }, - { title: '气象数据', time: '2025-05-20 00:00 - 09:45', icon: }, - { title: '清洗记录', time: '2025-05-12', label: '最近清洗', icon: }, + { 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.label || '数据时间'}:{source.time} -
-
- 数据状态:正常 -
+ +
+
{source.icon}
+
+
{source.title}
+
{source.time}
@@ -412,49 +379,34 @@ export default function AIDiagnosisPage() { {/* 右侧:AI 诊断与处置 */} - + AI 诊断与处置} + title={AI 诊断与建议措施} bordered={false} bodyStyle={{ padding: 0 }} - style={{ borderRadius: 8, height: '100%', display: 'flex', flexDirection: 'column' }} + style={{ ...cardStyle, height: '100%' }} > -
+
- +
{g}, - width: 70 - }, + { title: '建议措施', dataIndex: 'measure', key: 'measure', ellipsis: true }, + { title: '预期收益', dataIndex: 'expectedGain', key: 'expectedGain', render: (g) => {g}, width: 80 }, { title: '操作', key: 'action', - width: 70, - render: () => ( - - ) + width: 65, + render: () => }, ]} dataSource={aiRecommendations} @@ -465,7 +417,6 @@ export default function AIDiagnosisPage() { - ); }