Просмотр исходного кода

feat(web,backend): 后台首页 KPI v2 — 统计框一行6个更小窄;商品/订单/文章/活动前置数改待审核/待处理(pendingReview*)

Xiaogang Liao 1 час назад
Родитель
Сommit
245ad324dd

+ 18 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/stats/StatsController.java

@@ -150,6 +150,20 @@ public class StatsController {
         CompletableFuture<Long> weekNewActivitiesFuture = CompletableFuture.supplyAsync(() ->
         CompletableFuture<Long> weekNewActivitiesFuture = CompletableFuture.supplyAsync(() ->
             activityMapper.selectCount(new QueryWrapper<Activity>().eq("status", "published").ge("created_at", weekAgo)), taskExecutor);
             activityMapper.selectCount(new QueryWrapper<Activity>().eq("status", "published").ge("created_at", weekAgo)), taskExecutor);
 
 
+        // ── 前置数:待审核/待处理(首页 KPI 前置数字,需运营关注)──
+        // 商品待审核 = status='pending'
+        CompletableFuture<Long> pendingReviewProductsFuture = CompletableFuture.supplyAsync(() ->
+            productMapper.selectCount(new QueryWrapper<Product>().eq("status", "pending")), taskExecutor);
+        // 订单待发货+待售后 = status IN ('paid','refunding')(已支付待发货 + 退款中待售后)
+        CompletableFuture<Long> pendingReviewOrdersFuture = CompletableFuture.supplyAsync(() ->
+            productOrderMapper.selectCount(new QueryWrapper<ProductOrder>().in("status", "paid", "refunding")), taskExecutor);
+        // 文章待审核 = audit_status='pending'
+        CompletableFuture<Long> pendingReviewArticlesFuture = CompletableFuture.supplyAsync(() ->
+            articleMapper.selectCount(new QueryWrapper<Article>().eq("audit_status", "pending")), taskExecutor);
+        // 活动待审核 = audit_status='pending'
+        CompletableFuture<Long> pendingReviewActivitiesFuture = CompletableFuture.supplyAsync(() ->
+            activityMapper.selectCount(new QueryWrapper<Activity>().eq("audit_status", "pending")), taskExecutor);
+
         try {
         try {
             data.put("totalFamilies", familyFuture.get());
             data.put("totalFamilies", familyFuture.get());
             data.put("totalParents", parentFuture.get());
             data.put("totalParents", parentFuture.get());
@@ -170,6 +184,10 @@ public class StatsController {
             data.put("weekNewArticles", weekNewArticlesFuture.get());
             data.put("weekNewArticles", weekNewArticlesFuture.get());
             data.put("totalActivities", totalActivitiesFuture.get());
             data.put("totalActivities", totalActivitiesFuture.get());
             data.put("weekNewActivities", weekNewActivitiesFuture.get());
             data.put("weekNewActivities", weekNewActivitiesFuture.get());
+            data.put("pendingReviewProducts", pendingReviewProductsFuture.get());
+            data.put("pendingReviewOrders", pendingReviewOrdersFuture.get());
+            data.put("pendingReviewArticles", pendingReviewArticlesFuture.get());
+            data.put("pendingReviewActivities", pendingReviewActivitiesFuture.get());
             data.put("recentTasks", recentTasksFuture.get());
             data.put("recentTasks", recentTasksFuture.get());
         } catch (Exception e) {
         } catch (Exception e) {
             log.error("获取仪表盘数据失败", e);
             log.error("获取仪表盘数据失败", e);

+ 9 - 0
cfc-backend/src/test/java/com/etotem/cfc/controller/stats/StatsControllerDashboardContractTest.java

@@ -81,15 +81,19 @@ public class StatsControllerDashboardContractTest {
         // 商品(有效=on_shelf):total=45,weekNew=5
         // 商品(有效=on_shelf):total=45,weekNew=5
         when(productMapper.selectCount(argThat(w -> hasParam(w, "on_shelf") && !hasCreatedAt(w)))).thenReturn(45L);
         when(productMapper.selectCount(argThat(w -> hasParam(w, "on_shelf") && !hasCreatedAt(w)))).thenReturn(45L);
         when(productMapper.selectCount(argThat(w -> hasParam(w, "on_shelf") && hasCreatedAt(w)))).thenReturn(5L);
         when(productMapper.selectCount(argThat(w -> hasParam(w, "on_shelf") && hasCreatedAt(w)))).thenReturn(5L);
+        when(productMapper.selectCount(argThat(w -> hasParam(w, "pending")))).thenReturn(9L); // 待审核商品
         // 商品订单(有效=排除 cancelled/closed/refunded):total=210,weekNew=21
         // 商品订单(有效=排除 cancelled/closed/refunded):total=210,weekNew=21
         when(productOrderMapper.selectCount(argThat(w -> hasSql(w, "NOT IN") && !hasCreatedAt(w)))).thenReturn(210L);
         when(productOrderMapper.selectCount(argThat(w -> hasSql(w, "NOT IN") && !hasCreatedAt(w)))).thenReturn(210L);
         when(productOrderMapper.selectCount(argThat(w -> hasSql(w, "NOT IN") && hasCreatedAt(w)))).thenReturn(21L);
         when(productOrderMapper.selectCount(argThat(w -> hasSql(w, "NOT IN") && hasCreatedAt(w)))).thenReturn(21L);
+        when(productOrderMapper.selectCount(argThat(w -> hasParam(w, "paid") && hasParam(w, "refunding")))).thenReturn(15L); // 待发货+待售后
         // 文章(有效=published):total=60,weekNew=6
         // 文章(有效=published):total=60,weekNew=6
         when(articleMapper.selectCount(argThat(w -> hasParam(w, "published") && !hasCreatedAt(w)))).thenReturn(60L);
         when(articleMapper.selectCount(argThat(w -> hasParam(w, "published") && !hasCreatedAt(w)))).thenReturn(60L);
         when(articleMapper.selectCount(argThat(w -> hasParam(w, "published") && hasCreatedAt(w)))).thenReturn(6L);
         when(articleMapper.selectCount(argThat(w -> hasParam(w, "published") && hasCreatedAt(w)))).thenReturn(6L);
+        when(articleMapper.selectCount(argThat(w -> hasParam(w, "pending")))).thenReturn(7L); // 待审核文章
         // 活动(有效=published):total=25,weekNew=2
         // 活动(有效=published):total=25,weekNew=2
         when(activityMapper.selectCount(argThat(w -> hasParam(w, "published") && !hasCreatedAt(w)))).thenReturn(25L);
         when(activityMapper.selectCount(argThat(w -> hasParam(w, "published") && !hasCreatedAt(w)))).thenReturn(25L);
         when(activityMapper.selectCount(argThat(w -> hasParam(w, "published") && hasCreatedAt(w)))).thenReturn(2L);
         when(activityMapper.selectCount(argThat(w -> hasParam(w, "published") && hasCreatedAt(w)))).thenReturn(2L);
+        when(activityMapper.selectCount(argThat(w -> hasParam(w, "pending")))).thenReturn(4L); // 待审核活动
         // 任务列表(最近任务):空
         // 任务列表(最近任务):空
         when(taskMapper.selectList(any())).thenReturn(Collections.emptyList());
         when(taskMapper.selectList(any())).thenReturn(Collections.emptyList());
     }
     }
@@ -125,5 +129,10 @@ public class StatsControllerDashboardContractTest {
         // 活动(有效=published):新/总
         // 活动(有效=published):新/总
         assertEquals(25L, d.get("totalActivities"), "活动总数(仅发布中)");
         assertEquals(25L, d.get("totalActivities"), "活动总数(仅发布中)");
         assertEquals(2L, d.get("weekNewActivities"), "近7天新增活动");
         assertEquals(2L, d.get("weekNewActivities"), "近7天新增活动");
+        // 前置数:待审核商品 / 待发货+待售后订单 / 待审核文章 / 待审核活动
+        assertEquals(9L, d.get("pendingReviewProducts"), "待审核商品");
+        assertEquals(15L, d.get("pendingReviewOrders"), "待发货+待售后订单");
+        assertEquals(7L, d.get("pendingReviewArticles"), "待审核文章");
+        assertEquals(4L, d.get("pendingReviewActivities"), "待审核活动");
     }
     }
 }
 }

+ 39 - 47
cfc-web/src/__tests__/views/Dashboard.kpiNewTotal.contract.spec.js

@@ -1,86 +1,78 @@
 import { readFileSync } from 'fs'
 import { readFileSync } from 'fs'
 import { resolve } from 'path'
 import { resolve } from 'path'
 
 
-// 契约:admin.dashboard.kpiNewTotal(后台首页 KPI「新/总」口径 + 跳转链接 + 措辞改用户/非用户)
-// 需求:
-//  1) 家庭总数 → 链接 /families,显示「新/总」(weekNewFamilies/totalFamilies)
-//  2) 家长总数→用户总数(链接/users),孩子总数→非用户总数(userId为空成员)
-//  3) 商品/订单/文章/活动 新增卡,均显示「新/总」并各自链接
-//  4) 移除独立「本月新增家庭」卡
-//  5) 「待处理」角标仅显式 badge 卡(待审规划师/待审任务模板),非所有可点卡
+// 契约:admin.dashboard.kpiNewTotal(后台首页 KPI 前置数口径 + 6/行 + 注释)
+// 需求 v2:
+//  1) 一行 6 个、统计框更小窄(el-col md=4,卡片内边距/字号收缩)
+//  2) 家庭总数前置=近7天新增(weekNewFamilies);用户总数(链接/users)=家长账号;非用户总数=userId为空
+//  3) 商品/订单/文章/活动 前置数=待审核/待处理:
+//     商品=pendingReviewProducts(待审核);文章=pendingReviewArticles(待审核);
+//     活动=pendingReviewActivities(待审核);订单=pendingReviewOrders(待发货+待售后)
+//  4) 均显示 前置/总数,前置含义用 frontLabel 注释
+//  5) 移除独立「本月新增家庭」卡;「待处理」角标仅待审规划师/待审任务模板
 const source = readFileSync(resolve(__dirname, '../../views/Dashboard.vue'), 'utf8')
 const source = readFileSync(resolve(__dirname, '../../views/Dashboard.vue'), 'utf8')
 
 
-// 提取 kpiCards 数组块
 const kpiStart = source.indexOf('kpiCards: [')
 const kpiStart = source.indexOf('kpiCards: [')
 const kpiEnd = source.indexOf('],', kpiStart)
 const kpiEnd = source.indexOf('],', kpiStart)
 const kpi = source.slice(kpiStart, kpiEnd)
 const kpi = source.slice(kpiStart, kpiEnd)
 
 
-// 提取 loadDashboardData 中 stats 赋值块
 const loadStart = source.indexOf('async loadDashboardData()')
 const loadStart = source.indexOf('async loadDashboardData()')
 const loadEnd = source.indexOf('}', source.indexOf('async loadTraffic()'))
 const loadEnd = source.indexOf('}', source.indexOf('async loadTraffic()'))
 const load = source.slice(loadStart, loadEnd > 0 ? loadEnd : loadStart + 4000)
 const load = source.slice(loadStart, loadEnd > 0 ? loadEnd : loadStart + 4000)
 
 
-describe('Dashboard KPI 新/总口径与链接', () => {
-  test('家庭总数卡带新/总字段且链接到家庭运营工作台(/families)', () => {
-    const fam = kpi.match(/totalFamilies'[^\]]*\]/)?.[0] || kpi.slice(0, 300)
-    expect(kpi).toMatch(/weekNewFamilies/)
-    expect(kpi).toMatch(/totalFamilies/)
+describe('Dashboard KPI 前置数口径与布局 v2', () => {
+  test('KPI 卡一行6个(el-col md=4)', () => {
+    expect(source).toMatch(/:xs="12"[^>]*:md="4"/)
+    expect(source).not.toMatch(/:md="6"/)
+  })
+
+  test('家庭总数前置=近7天新增且链接 /families', () => {
+    expect(kpi).toMatch(/frontKey:\s*'weekNewFamilies'/)
+    expect(kpi).toMatch(/近7天新增/)
     expect(kpi).toMatch(/['"]\/families['"]/)
     expect(kpi).toMatch(/['"]\/families['"]/)
   })
   })
 
 
-  test('家长总数改为用户总数并链接用户管理(/users)', () => {
+  test('家长改为用户总数(链接/users)、孩子改为非用户总数(userId为空)', () => {
     expect(kpi).toMatch(/用户总数/)
     expect(kpi).toMatch(/用户总数/)
     expect(kpi).toMatch(/['"]\/users['"]/)
     expect(kpi).toMatch(/['"]\/users['"]/)
-    expect(kpi).toMatch(/totalParents/)
-  })
-
-  test('孩子总数改为非用户总数(userId为空成员,无链接)', () => {
     expect(kpi).toMatch(/非用户总数/)
     expect(kpi).toMatch(/非用户总数/)
     expect(kpi).toMatch(/totalNonUsers/)
     expect(kpi).toMatch(/totalNonUsers/)
   })
   })
 
 
-  test('商品/订单/文章/活动均新增且带新/总字段与各自链接', () => {
-    expect(kpi).toMatch(/totalProducts/)
-    expect(kpi).toMatch(/weekNewProducts/)
+  test('商品/文章/活动前置=待审核;订单前置=待发货/售后', () => {
+    expect(kpi).toMatch(/frontKey:\s*'pendingReviewProducts'/)
+    expect(kpi).toMatch(/frontKey:\s*'pendingReviewArticles'/)
+    expect(kpi).toMatch(/frontKey:\s*'pendingReviewActivities'/)
+    expect(kpi).toMatch(/frontKey:\s*'pendingReviewOrders'/)
+    expect(kpi).toMatch(/待发货[\/、]售后|待发货及售后|待发货、售后/)
+  })
+
+  test('商品/订单/文章/活动各自跳转正确', () => {
     expect(kpi).toMatch(/['"]\/product-manage['"]/)
     expect(kpi).toMatch(/['"]\/product-manage['"]/)
-    expect(kpi).toMatch(/totalOrders/)
-    expect(kpi).toMatch(/weekNewOrders/)
     expect(kpi).toMatch(/['"]\/order-manage['"]/)
     expect(kpi).toMatch(/['"]\/order-manage['"]/)
-    expect(kpi).toMatch(/totalArticles/)
-    expect(kpi).toMatch(/weekNewArticles/)
     expect(kpi).toMatch(/['"]\/article-manage['"]/)
     expect(kpi).toMatch(/['"]\/article-manage['"]/)
-    expect(kpi).toMatch(/totalActivities/)
-    expect(kpi).toMatch(/weekNewActivities/)
     expect(kpi).toMatch(/['"]\/activities['"]/)
     expect(kpi).toMatch(/['"]\/activities['"]/)
   })
   })
 
 
   test('移除独立「本月新增家庭」卡', () => {
   test('移除独立「本月新增家庭」卡', () => {
     expect(kpi).not.toMatch(/本月新增家庭/)
     expect(kpi).not.toMatch(/本月新增家庭/)
-    expect(kpi).not.toMatch(/monthFamilies/)
   })
   })
 
 
-  test('「待处理」角标仅显式 badge 卡(非所有可点卡)', () => {
-    // 模板中 badge 条件用 card.badge
-    expect(source).toMatch(/card\.badge/)
-    // kpiCards 中待审卡带 badge: true
+  test('前置数用 frontLabel 注释,仅待审卡显示待处理角标', () => {
+    expect(source).toMatch(/card\.frontKey/)
+    expect(source).toMatch(/card\.frontLabel/)
     expect(kpi).toMatch(/badge:\s*true/)
     expect(kpi).toMatch(/badge:\s*true/)
   })
   })
 
 
-  test('模板按 newKey/totalKey 渲染「新/总」', () => {
-    expect(source).toMatch(/card\.newKey/)
-    expect(source).toMatch(/card\.totalKey/)
-    // 值渲染表达式包含新/总拼接
-    expect(source).toMatch(/stats\[card\.newKey\]/)
+  test('模板按 frontKey/totalKey 渲染 前置/总数', () => {
+    expect(source).toMatch(/stats\[card\.frontKey\]/)
     expect(source).toMatch(/stats\[card\.totalKey\]/)
     expect(source).toMatch(/stats\[card\.totalKey\]/)
   })
   })
 
 
-  test('loadDashboardData 把 weekNew/total 写入 stats', () => {
-    expect(load).toMatch(/weekNewFamilies/)
-    expect(load).toMatch(/weekNewProducts/)
-    expect(load).toMatch(/weekNewOrders/)
-    expect(load).toMatch(/weekNewArticles/)
-    expect(load).toMatch(/weekNewActivities/)
-    expect(load).toMatch(/totalNonUsers/)
-    expect(load).toMatch(/weekNewNonUsers/)
+  test('loadDashboardData 映射 pendingReview* 到 stats', () => {
+    expect(load).toMatch(/pendingReviewProducts/)
+    expect(load).toMatch(/pendingReviewOrders/)
+    expect(load).toMatch(/pendingReviewArticles/)
+    expect(load).toMatch(/pendingReviewActivities/)
   })
   })
-})
+})

+ 28 - 17
cfc-web/src/views/Dashboard.vue

@@ -29,7 +29,7 @@
 
 
     <!-- KPI 概览 -->
     <!-- KPI 概览 -->
     <el-row :gutter="24" class="kpi-row">
     <el-row :gutter="24" class="kpi-row">
-      <el-col v-for="card in kpiCards" :key="card.key" :xs="12" :sm="12" :md="6">
+      <el-col v-for="card in kpiCards" :key="card.key" :xs="12" :sm="8" :md="4">
         <div
         <div
           class="kpi-card"
           class="kpi-card"
           :class="{ 'is-clickable': card.click }"
           :class="{ 'is-clickable': card.click }"
@@ -45,10 +45,10 @@
           </div>
           </div>
           <div class="kpi-card__body">
           <div class="kpi-card__body">
             <div class="kpi-card__value adm-num">
             <div class="kpi-card__value adm-num">
-              <template v-if="card.newKey">{{ stats[card.newKey] || 0 }}<span class="kpi-slash">/</span>{{ stats[card.totalKey] || 0 }}</template>
+              <template v-if="card.frontKey"><span class="kpi-front">{{ stats[card.frontKey] || 0 }}</span><span class="kpi-slash">/</span>{{ stats[card.totalKey] || 0 }}</template>
               <template v-else>{{ stats[card.key] || 0 }}</template>
               <template v-else>{{ stats[card.key] || 0 }}</template>
             </div>
             </div>
-            <div class="kpi-card__label">{{ card.label }}</div>
+            <div class="kpi-card__label"><span>{{ card.label }}</span><span v-if="card.frontLabel" class="kpi-front-label">{{ card.frontLabel }}</span></div>
           </div>
           </div>
           <div v-if="card.badge && stats[card.key] > 0" class="kpi-card__badge">待处理</div>
           <div v-if="card.badge && stats[card.key] > 0" class="kpi-card__badge">待处理</div>
         </div>
         </div>
@@ -300,7 +300,11 @@ export default {
         totalArticles: 0,
         totalArticles: 0,
         weekNewArticles: 0,
         weekNewArticles: 0,
         totalActivities: 0,
         totalActivities: 0,
-        weekNewActivities: 0
+        weekNewActivities: 0,
+        pendingReviewProducts: 0,
+        pendingReviewOrders: 0,
+        pendingReviewArticles: 0,
+        pendingReviewActivities: 0
       },
       },
       recentTasks: [],
       recentTasks: [],
       trafficLoading: false,
       trafficLoading: false,
@@ -338,17 +342,17 @@ export default {
         cpuUsagePercent: '--'
         cpuUsagePercent: '--'
       },
       },
       kpiCards: [
       kpiCards: [
-        { key: 'totalFamilies', label: '家庭总数', icon: 'el-icon-s-home', color: 'primary', newKey: 'weekNewFamilies', totalKey: 'totalFamilies', click: '/families' },
+        { key: 'totalFamilies', label: '家庭总数', icon: 'el-icon-s-home', color: 'primary', frontKey: 'weekNewFamilies', frontLabel: '近7天新增', totalKey: 'totalFamilies', click: '/families' },
         { key: 'totalParents', label: '用户总数', icon: 'el-icon-user', color: 'primary', click: '/users' },
         { key: 'totalParents', label: '用户总数', icon: 'el-icon-user', color: 'primary', click: '/users' },
         { key: 'totalNonUsers', label: '非用户总数', icon: 'el-icon-s-custom', color: 'warning' },
         { key: 'totalNonUsers', label: '非用户总数', icon: 'el-icon-s-custom', color: 'warning' },
         { key: 'totalTeachers', label: '规划师总数', icon: 'el-icon-s-cooperation', color: 'success' },
         { key: 'totalTeachers', label: '规划师总数', icon: 'el-icon-s-cooperation', color: 'success' },
         { key: 'pendingGuideCount', label: '待审规划师', icon: 'el-icon-s-check', color: 'danger', click: '/review-center?tab=guide', badge: true },
         { key: 'pendingGuideCount', label: '待审规划师', icon: 'el-icon-s-check', color: 'danger', click: '/review-center?tab=guide', badge: true },
         { key: 'pendingPackageCount', label: '待审任务模板', icon: 'el-icon-s-goods', color: 'danger', click: '/review-center?tab=package', badge: true },
         { key: 'pendingPackageCount', label: '待审任务模板', icon: 'el-icon-s-goods', color: 'danger', click: '/review-center?tab=package', badge: true },
         { key: 'activeUsers', label: '活跃用户', icon: 'el-icon-user-solid', color: 'primary' },
         { key: 'activeUsers', label: '活跃用户', icon: 'el-icon-user-solid', color: 'primary' },
-        { key: 'totalProducts', label: '商品', icon: 'el-icon-s-goods', color: 'primary', newKey: 'weekNewProducts', totalKey: 'totalProducts', click: '/product-manage' },
-        { key: 'totalOrders', label: '订单', icon: 'el-icon-s-order', color: 'primary', newKey: 'weekNewOrders', totalKey: 'totalOrders', click: '/order-manage' },
-        { key: 'totalArticles', label: '文章', icon: 'el-icon-document', color: 'primary', newKey: 'weekNewArticles', totalKey: 'totalArticles', click: '/article-manage' },
-        { key: 'totalActivities', label: '活动', icon: 'el-icon-star-off', color: 'primary', newKey: 'weekNewActivities', totalKey: 'totalActivities', click: '/activities' }
+        { key: 'totalProducts', label: '商品', icon: 'el-icon-s-goods', color: 'primary', frontKey: 'pendingReviewProducts', frontLabel: '待审核', totalKey: 'totalProducts', click: '/product-manage' },
+        { key: 'totalOrders', label: '订单', icon: 'el-icon-s-order', color: 'primary', frontKey: 'pendingReviewOrders', frontLabel: '待发货、售后', totalKey: 'totalOrders', click: '/order-manage' },
+        { key: 'totalArticles', label: '文章', icon: 'el-icon-document', color: 'primary', frontKey: 'pendingReviewArticles', frontLabel: '待审核', totalKey: 'totalArticles', click: '/article-manage' },
+        { key: 'totalActivities', label: '活动', icon: 'el-icon-star-off', color: 'primary', frontKey: 'pendingReviewActivities', frontLabel: '待审核', totalKey: 'totalActivities', click: '/activities' }
       ],
       ],
       dwellSections: [
       dwellSections: [
         { key: 'articleDwell', title: '文章停留时长 Top', sub: '按平均停留排序 · 近30天', icon: 'el-icon-document', iconClass: 'sec--primary', emptyHint: '暂无文章阅读停留数据' },
         { key: 'articleDwell', title: '文章停留时长 Top', sub: '按平均停留排序 · 近30天', icon: 'el-icon-document', iconClass: 'sec--primary', emptyHint: '暂无文章阅读停留数据' },
@@ -517,6 +521,10 @@ export default {
         this.stats.weekNewArticles = d.weekNewArticles || 0
         this.stats.weekNewArticles = d.weekNewArticles || 0
         this.stats.totalActivities = d.totalActivities || 0
         this.stats.totalActivities = d.totalActivities || 0
         this.stats.weekNewActivities = d.weekNewActivities || 0
         this.stats.weekNewActivities = d.weekNewActivities || 0
+        this.stats.pendingReviewProducts = d.pendingReviewProducts || 0
+        this.stats.pendingReviewOrders = d.pendingReviewOrders || 0
+        this.stats.pendingReviewArticles = d.pendingReviewArticles || 0
+        this.stats.pendingReviewActivities = d.pendingReviewActivities || 0
       } catch (error) {
       } catch (error) {
         console.error('加载仪表盘数据失败:', error)
         console.error('加载仪表盘数据失败:', error)
       }
       }
@@ -854,13 +862,13 @@ export default {
 .kpi-card {
 .kpi-card {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
-  gap: 14px;
+  gap: 10px;
   background: var(--adm-bg-container);
   background: var(--adm-bg-container);
   border: 1px solid var(--adm-border-split);
   border: 1px solid var(--adm-border-split);
   border-radius: var(--adm-radius-card);
   border-radius: var(--adm-radius-card);
   box-shadow: var(--adm-shadow-card);
   box-shadow: var(--adm-shadow-card);
-  padding: 18px 20px;
-  margin-bottom: 24px;
+  padding: 12px 12px;
+  margin-bottom: 16px;
   position: relative;
   position: relative;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
 }
 }
@@ -875,13 +883,13 @@ export default {
   outline-offset: 2px;
   outline-offset: 2px;
 }
 }
 .kpi-card__icon {
 .kpi-card__icon {
-  width: 46px;
-  height: 46px;
+  width: 34px;
+  height: 34px;
   border-radius: var(--adm-radius-control);
   border-radius: var(--adm-radius-control);
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center;
   justify-content: center;
-  font-size: 20px;
+  font-size: 15px;
   flex-shrink: 0;
   flex-shrink: 0;
 }
 }
 .kpi-icon--primary { background: var(--adm-info-bg); color: var(--adm-primary); }
 .kpi-icon--primary { background: var(--adm-info-bg); color: var(--adm-primary); }
@@ -889,12 +897,15 @@ export default {
 .kpi-icon--warning { background: var(--adm-warning-bg); color: var(--adm-warning-text); }
 .kpi-icon--warning { background: var(--adm-warning-bg); color: var(--adm-warning-text); }
 .kpi-icon--danger { background: var(--adm-error-bg); color: var(--adm-error-text); }
 .kpi-icon--danger { background: var(--adm-error-bg); color: var(--adm-error-text); }
 .kpi-card__value {
 .kpi-card__value {
-  font-size: 26px;
+  font-size: 19px;
   font-weight: 700;
   font-weight: 700;
   color: var(--adm-text-88);
   color: var(--adm-text-88);
-  line-height: 1.2;
+  line-height: 1.15;
+  white-space: nowrap;
 }
 }
 .kpi-slash { margin: 0 2px; color: var(--adm-text-45, #909399); font-weight: 400; }
 .kpi-slash { margin: 0 2px; color: var(--adm-text-45, #909399); font-weight: 400; }
+.kpi-front { color: var(--adm-warning-text, #e6a23c); font-weight: 700; }
+.kpi-front-label { margin-left: 4px; padding: 0 4px; font-size: 11px; line-height: 16px; border-radius: 3px; background: var(--adm-warning-bg); color: var(--adm-warning-text, #e6a23c); }
 .kpi-card__label {
 .kpi-card__label {
   font-size: 13px;
   font-size: 13px;
   color: var(--adm-text-45);
   color: var(--adm-text-45);