页面样式还原
This commit is contained in:
@@ -144,19 +144,30 @@ export default function AIDiagnosisPage() {
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
// 状态标签渲染
|
||||
const renderStatusTag = (status: string) => {
|
||||
const colorMap: Record<string, string> = {
|
||||
'异常': '#F53F3F',
|
||||
'正常': '#00B42A',
|
||||
'轻微': '#F7BA1E',
|
||||
};
|
||||
return <span style={{ color: colorMap[status], fontWeight: 600 }}>{status}</span>;
|
||||
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>;
|
||||
};
|
||||
|
||||
// 影响程度标签渲染
|
||||
const renderImpactTag = (impact: string) => {
|
||||
const colorMap: Record<string, string> = { '高': '#F53F3F', '中': '#FF7D00', '低': '#00B42A' };
|
||||
return <span style={{ color: colorMap[impact], fontWeight: 600 }}>{impact}</span>;
|
||||
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>;
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -488,49 +499,122 @@ export default function AIDiagnosisPage() {
|
||||
bodyStyle={{ padding: 0 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
{/* AI诊断总结 */}
|
||||
<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>
|
||||
<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>AI 诊断总结</span>
|
||||
<span style={{ fontSize: 13, color: '#86909C' }}>更新时间: 2025-05-20 09:45</span>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ 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 },
|
||||
{
|
||||
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: '所有逆变器运行正常' },
|
||||
]}
|
||||
dataSource={aiSummaryData.slice(0, 4)}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
rowKey="key"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Divider style={{ margin: 0 }} />
|
||||
|
||||
{/* AI建议与处置 */}
|
||||
<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 style={{ fontSize: 15, fontWeight: 700, color: '#1D2129', marginBottom: 16 }}>
|
||||
AI 建议与处置
|
||||
</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: 70 },
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 80,
|
||||
render: (text, record) => (
|
||||
<Button type="primary" size="small" style={{ fontSize: 11, borderRadius: 6, height: 24 }}>
|
||||
{record.key === '5' ? '详情' : '派单'}
|
||||
width: 90,
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
style={{ fontSize: 12, borderRadius: 6, height: 28 }}
|
||||
>
|
||||
{record.isView ? '查看详情' : '创建工单'}
|
||||
</Button>
|
||||
)
|
||||
},
|
||||
]}
|
||||
dataSource={aiRecommendations.slice(0, 4)}
|
||||
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 },
|
||||
]}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
rowKey="key"
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user