From 2ee7d1183d9caab0068ac32a905c6c3b09c339b8 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Mon, 11 May 2026 13:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1 + package.json | 1 + src/pages/CleanOptimization.tsx | 2 +- src/pages/Home.tsx | 196 ++++++++++++++++++++++++++------ 4 files changed, 165 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index bbf05ae..4f2253c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@ant-design/charts": "^2.6.7", "@ant-design/icons": "^6.2.2", + "@ant-design/plots": "^2.6.8", "@reduxjs/toolkit": "^2.11.2", "@tailwindcss/vite": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", diff --git a/package.json b/package.json index a8fca00..21ed66a 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "@ant-design/charts": "^2.6.7", "@ant-design/icons": "^6.2.2", + "@ant-design/plots": "^2.6.8", "@reduxjs/toolkit": "^2.11.2", "@tailwindcss/vite": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", diff --git a/src/pages/CleanOptimization.tsx b/src/pages/CleanOptimization.tsx index 7ac69fe..5362421 100644 --- a/src/pages/CleanOptimization.tsx +++ b/src/pages/CleanOptimization.tsx @@ -195,7 +195,7 @@ export default function CleanOptimizationPage() {
上次清洗时间
- 2025-05-12 + 2025-05-12
距今 12 天 diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 7f20303..e587114 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -3,19 +3,19 @@ import { Card, Row, Col, Statistic, Button, Space, Tag, Typography } from 'antd' import { CloudOutlined, ThunderboltOutlined, BarChartOutlined, RiseOutlined, BellOutlined, WalletOutlined, - MinusOutlined, PlusOutlined, SyncOutlined + MinusOutlined, PlusOutlined, SyncOutlined, + MoneyCollectOutlined, + DashboardOutlined } from '@ant-design/icons'; import { Line, Bar, Pie } from '@ant-design/charts'; import { getWeatherData } from '../lib/utils'; + const { Text } = Typography; export default function StationDashboard() { - // ============================================== - // 🔥 接入真实天气状态(从你第一个组件复制过来) - // ============================================== const [weatherdata, setWeatherData] = useState({ province: "江苏省", city: "南通市", @@ -45,14 +45,14 @@ export default function StationDashboard() { // 模拟数据 const stationOverview = { - todayEnergy: 45.9, - currentPower: 66811.3, - systemEfficiency: 66.8, + todayEnergy: 4752.0, + currentPower: 812.6, + systemEfficiency: 82.6, yesterdayEfficiency: 81.3, - systemAvailability: 92.31, + systemAvailability: 99.35, onlineDevices: "12/13", - alarmCount: 5, - costSaved: 8278 + alarmCount: 8, + costSaved: 36540 }; const realtimeAlerts = [ @@ -260,46 +260,174 @@ export default function StationDashboard() { overflow: 'hidden' }} > + {/* 今日发电量 */} - - 今日发电量} - value={stationOverview.todayEnergy} precision={1} valueStyle={{ color: '#1890ff', fontSize: 24, fontWeight: 800 }} prefix={} suffix="kWh" /> -
日发电实时累计
+ +
+
+
今日发电量
+
+ 4,752 + kWh +
+
日目标 5,000 kWh
+
+
+ +
+
+ + {/* 当前功率 */} - - 当前功率} - value={stationOverview.currentPower} precision={1} valueStyle={{ color: '#1890ff', fontSize: 24, fontWeight: 800 }} prefix={} suffix="kW" /> -
装机容量 100.0 MWp
+ +
+
+
当前功率
+
+ 812.6 + kW +
+
装机容量 1,000 kWp
+
+
+ +
+
+ + {/* Performance Ratio(PR) */} - - 系统效率 PR} - value={stationOverview.systemEfficiency} precision={1} valueStyle={{ color: '#52c41a', fontSize: 24, fontWeight: 800 }} prefix={} suffix="%" /> -
昨日 {stationOverview.yesterdayEfficiency}% +1.3%
+ +
+
+
Performance Ratio(PR)
+
+ 82.6% +
+
+ 昨日 81.3%   环比 ↑1.3% +
+
+
+ +
+
+ + {/* 系统可用率 */} - - 系统可用率} - value={stationOverview.systemAvailability} precision={2} valueStyle={{ color: '#faad14', fontSize: 24, fontWeight: 800 }} prefix={} suffix="%" /> -
在线设备 {stationOverview.onlineDevices}
+ +
+
+
系统可用率
+
+ 99.35% +
+
+ 昨日 99.12%   环比 ↑0.23% +
+
+
+ +
+ +
+ + {/* 告警数量 */} - - 告警数量} - value={stationOverview.alarmCount} valueStyle={{ color: '#ff4d4f', fontSize: 24, fontWeight: 800 }} prefix={} suffix="条" /> -
今日新增 0 条
+ +
+
+
告警数量
+
+ 8 +
+
+ 未处理 5   已处理 3 +
+
+
+ +
+
+ + {/* 节省运维成本 */} - - 节省运维成本} - value={stationOverview.costSaved} valueStyle={{ color: '#1890ff', fontSize: 24, fontWeight: 800 }} prefix="¥" /> -
清洗收益 + 工单闭环估算
+ +
+
+
节省运维成本
+
+ ¥ 36,540 +
+
本月累计节省
+
+
+ +
+