From 19753a8639e59608a50ac417e530d4ea3135267b Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 2 Mar 2026 05:19:03 -0800 Subject: [PATCH] =?UTF-8?q?feat(admin-web):=20=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E7=A7=8D=E5=BE=85=E5=90=88=E5=B9=B6?= =?UTF-8?q?/=E5=B7=B2=E5=90=88=E5=B9=B6=E7=BB=9F=E8=AE=A1=E5=8D=A1?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在网络因子/加速因子下方新增一行: - 预种待合并: 显示全网 pendingMergePortions(份) - 预种已合并: 显示全网 totalTreesMerged(棵) Co-Authored-By: Claude Opus 4.6 --- .../src/app/(dashboard)/dashboard/page.tsx | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx b/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx index edcf4ac1..b76a4caf 100644 --- a/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx +++ b/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx @@ -19,6 +19,7 @@ import { usePlantingStats, usePlantingTrendForDashboard, useHotWalletBalance, + usePrePlantingStats, } from '@/hooks'; import type { DashboardPeriod } from '@/types'; import styles from './dashboard.module.scss'; @@ -100,6 +101,12 @@ export default function DashboardPage() { isLoading: hotWalletLoading, } = useHotWalletBalance(); + // 预种统计(待合并/已合并) + const { + data: prePlantingStats, + isLoading: prePlantingStatsLoading, + } = usePrePlantingStats(); + // [2026-01-06] 基于 planting-service 数据构建统计卡片数据 const statsCards = plantingStatsData ? [ { @@ -219,6 +226,36 @@ export default function DashboardPage() { + {/* 预种统计区域 */} +
+
+
预种待合并
+
+ {prePlantingStatsLoading ? ( + 加载中... + ) : ( + + {(prePlantingStats?.pendingMergePortions ?? 0).toLocaleString()} + + + )} +
+
+
+
预种已合并
+
+ {prePlantingStatsLoading ? ( + 加载中... + ) : ( + + {(prePlantingStats?.totalTreesMerged ?? 0).toLocaleString()} + + + )} +
+
+
+ {/* 图表区 - [2026-01-06] 使用 planting-service 数据 */}