From 1bfeece1092a13df7f269454ac01103fc29cb53c Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 2 Mar 2026 05:24:00 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-web):=20=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E9=A2=84=E7=A7=8D=E7=BB=9F=E8=AE=A1=E6=94=B9=E4=B8=BA=E6=96=B9?= =?UTF-8?q?=E5=9D=97=E5=8D=A1=E7=89=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 预种待合并/已合并从深色条形卡片改为与认种统计一致的 StatCard - 统计网格从 4 列调整为 3 列(3+3 布局更工整) - 骨架屏占位从 4 个调整为 6 个 Co-Authored-By: Claude Opus 4.6 --- .../dashboard/dashboard.module.scss | 2 +- .../src/app/(dashboard)/dashboard/page.tsx | 46 ++++++------------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/frontend/admin-web/src/app/(dashboard)/dashboard/dashboard.module.scss b/frontend/admin-web/src/app/(dashboard)/dashboard/dashboard.module.scss index 85f389ce..1bd8cde5 100644 --- a/frontend/admin-web/src/app/(dashboard)/dashboard/dashboard.module.scss +++ b/frontend/admin-web/src/app/(dashboard)/dashboard/dashboard.module.scss @@ -8,7 +8,7 @@ &__stats { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(3, 1fr); gap: $spacing-lg; @include respond-below(xl) { diff --git a/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx b/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx index b76a4caf..20cde46f 100644 --- a/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx +++ b/frontend/admin-web/src/app/(dashboard)/dashboard/page.tsx @@ -137,6 +137,20 @@ export default function DashboardPage() { change: { value: 0, trend: 'up' as const }, color: '#8b5cf6', }, + { + title: '预种待合并', + value: prePlantingStats?.pendingMergePortions ?? 0, + suffix: '份', + change: { value: 0, trend: 'up' as const }, + color: '#ef4444', + }, + { + title: '预种已合并', + value: prePlantingStats?.totalTreesMerged ?? 0, + suffix: '棵', + change: { value: 0, trend: 'up' as const }, + color: '#06b6d4', + }, ] : []; const headerActions = ( @@ -165,7 +179,7 @@ export default function DashboardPage() { {statsLoading ? ( // 加载状态显示骨架屏 <> - {[1, 2, 3, 4].map((i) => ( + {[1, 2, 3, 4, 5, 6].map((i) => ( ))} @@ -226,36 +240,6 @@ export default function DashboardPage() { - {/* 预种统计区域 */} -
-
-
预种待合并
-
- {prePlantingStatsLoading ? ( - 加载中... - ) : ( - - {(prePlantingStats?.pendingMergePortions ?? 0).toLocaleString()} - - - )} -
-
-
-
预种已合并
-
- {prePlantingStatsLoading ? ( - 加载中... - ) : ( - - {(prePlantingStats?.totalTreesMerged ?? 0).toLocaleString()} - - - )} -
-
-
- {/* 图表区 - [2026-01-06] 使用 planting-service 数据 */}