diff --git a/src/components/alerts/AlarmOverview.tsx b/src/components/alerts/AlarmOverview.tsx index 21f7657..22ef85f 100644 --- a/src/components/alerts/AlarmOverview.tsx +++ b/src/components/alerts/AlarmOverview.tsx @@ -346,96 +346,92 @@ export default function AlarmCenterPage() { {/* 统计卡片 */} - - - - - -
- -
- - -
告警总数
-
- {statData.total || 0} -
- -
-
- - - - - - -
- -
- - -
严重告警
-
- {statData.levelStats?.[1] || 0} -
- -
-
- - - - - - -
- -
- - -
待处理
-
- {statData.pending || 0} -
- -
-
- - - - - - -
- -
- - -
处理中
-
- {statData.processing || 0} -
- -
-
- - - - - - -
- -
- - -
已关闭
-
- {statData.closed || 0} -
- -
-
- + + {[ + { + title: '今日告警总数', + value: statData.total || 0, + unit: '', + trend: '较昨日 +28.6% ↑', + trendColor: '#FF4D4F', + subText: `昨日 ${statData.yesterdayTotal || 0}`, + icon: , + color: '#FF4D4F', + bg: '#FFF1F0' + }, + { + title: '严重告警', + value: statData.levelStats?.[1] || 0, + unit: '', + trend: '较昨日 +33.3% ↑', + trendColor: '#FF4D4F', + subText: `昨日 ${statData.yesterdayCritical || 0}`, + icon: , + color: '#FF4D4F', + bg: '#FFF1F0' + }, + { + title: '处理中', + value: statData.processing || 0, + unit: '', + trend: '较昨日 +20.0% ↑', + trendColor: '#FF4D4F', + subText: `昨日 ${statData.yesterdayProcessing || 0}`, + icon: , + color: '#FA8C16', + bg: '#FFF7E8' + }, + { + title: '已关闭', + value: statData.closed || 0, + unit: '', + trend: '较昨日 +45.5% ↑', + trendColor: '#00B42A', + subText: `昨日 ${statData.yesterdayClosed || 0}`, + icon: , + color: '#00B42A', + bg: '#E8FFEA' + }, + ].map((item, idx) => ( + + + + +
+ {React.cloneElement(item.icon, { style: { fontSize: 24, color: item.color } })} +
+ + +
{item.title}
+
+ {item.value} +
+
+ {item.trend.split(' ')[0]} + + {item.trend.split(' ').slice(1).join(' ')} + +
+
+ {item.subText} +
+ +
+
+ + ))}
{/* 表格 */} diff --git a/src/pages/AIAnalysis.tsx b/src/pages/AIAnalysis.tsx index bf73398..0cd18f6 100644 --- a/src/pages/AIAnalysis.tsx +++ b/src/pages/AIAnalysis.tsx @@ -133,9 +133,13 @@ export default function AIDiagnosisPage() { }; return ( -
- {/* 顶部指标卡片 */} - {/* 优化版:宽高统一 + 最小168px + 自动换行 + 样式统一 */} +
+
+
+ AI诊断分析 +
+ +
- +
diff --git a/src/pages/Alerts.tsx b/src/pages/Alerts.tsx index 97ff320..8a05099 100644 --- a/src/pages/Alerts.tsx +++ b/src/pages/Alerts.tsx @@ -68,21 +68,27 @@ export default function AlarmCenterPage() { }; return ( - +
告警中心 告警处置闭环、规则管理与事件中心
-
- + {/* setActiveTab(key)} items={showTabs} - style={{ border: 0, height: 64, lineHeight: '64px' }} - /> + style={{ + border: 'none', + height: 64, + lineHeight: '64px', + background: 'transparent !important', + backgroundColor: 'transparent !important', + }} + />*/}
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index caac13b..ae4f4ed 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -5,11 +5,19 @@ import { RiseOutlined, BellOutlined, WalletOutlined, MinusOutlined, PlusOutlined, SyncOutlined, MoneyCollectOutlined, - DashboardOutlined + DashboardOutlined, + FullscreenOutlined, + RocketOutlined, + VideoCameraOutlined, + AppstoreOutlined, + ExperimentOutlined, + BranchesOutlined, + RobotOutlined } from '@ant-design/icons'; -import { Line, Bar, Pie } from '@ant-design/charts'; +import { Line, Bar, Pie, } from '@ant-design/charts'; import { getWeatherData, getWeatherType } from '../lib/utils'; import WeatherDisplay from '../components/Weather'; +import bgMain from '../assets/images/bgmain.jpg'; @@ -257,11 +265,27 @@ export default function StationDashboard() { legend: { position: 'right' } }; - const cardStyle = { borderRadius: 8, }; + const cardStyle = { borderRadius: 12, border: '1px solid #f0f0f0', boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }; + + // 顶部卡片微型图表配置 + const tinyAreaConfig = { + height: 40, + autoFit: true, + data: [264, 417, 438, 887, 309, 397, 550, 575, 563, 430, 525, 592, 492, 467, 513, 546, 983, 340, 539, 243, 226, 192], + smooth: true, + areaStyle: { fill: 'l(270) 0:#ffffff 0.5:#165DFF 1:#165DFF', fillOpacity: 0.1 }, + line: { color: '#165DFF' }, + }; + + const tinyColumnConfig = { + height: 40, + autoFit: true, + data: [274, 337, 81, 497, 666, 219, 269], + color: '#00B42A', + }; return ( -
- {/* 顶部统计卡片 */} +
{[ { title: '今日发电量', value: '4,752', unit: 'kWh', sub: '日目标 5,000 kWh', color: '#00B42A', bg: '#E8FFEA', icon: }, @@ -294,357 +318,216 @@ export default function StationDashboard() { ))} - - {/* 主体:左侧图表 + 中间电站 + 右侧告警 —— 强制一行不换行 */} - - {/* 左侧图表列 - 最终完美版:不溢出 + 一定可见 */} - - 发电趋势} - bordered={false} - style={{ borderRadius: 8, flex: 1, padding: 0 }} - bodyStyle={{ padding: '8px 12px' }} - > - - - - 辐照度与温度} - bordered={false} - style={{ borderRadius: 8, flex: 1, padding: 0 }} - bodyStyle={{ padding: '8px 12px' }} - > - - - - 逆变器效率} - bordered={false} - style={{ borderRadius: 8, flex: 1, padding: 0 }} - bodyStyle={{ padding: '8px 12px' }} - > - - - - 运维任务进度} - bordered={false} - style={{ borderRadius: 8, flex: 1, padding: 0 }} - bodyStyle={{ padding: '8px 12px' }} - > - - - - - - - -
-
电站概览
-
GeoTIFF 正射底图 · 设备点位叠加
-
- + {/* 主体布局 */} + + {/* 左侧:图表列 */} + + + 发电趋势} extra={} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}> +
今日发电功率趋势 (kW)
+ +
+ 辐照度与温度趋势} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}> + + + 逆变器效率对比} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}> + + + 运维任务进度} extra={} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}> +
+ +
+
+
总任务
+
12
- } - bordered={false} - style={{ ...cardStyle, height: '100%', padding: '12px' }} - bodyStyle={{ height: "86%" }} +
+
+
+
+ - > -
-
+ {/* 中间:底图与状态 */} + + + + 电站概览 +
正常 告警 离线 维护中
- {/* - - - 65% - */}
- - -
-