From 1c829f9177eab675b22be4d20ef2761ed1bbb423 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 15 九月 2026 16:15:48 +0800
Subject: [PATCH] refactor(layout): 调整布局样式并优化轮播卡片组件

---
 src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue |   79 +++++++++++++++++++++++++++++----------
 1 files changed, 58 insertions(+), 21 deletions(-)

diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue
index 0937b32..b07561b 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue
@@ -3,11 +3,27 @@
     <!-- 椤堕儴缁熻鍗$墖 -->
     <div class="stats-cards">
       <div
-        v-for="item in statItems"
+        v-for="(item, index) in statItems"
         :key="item.name"
         class="stat-card"
       >
-        <img src="@/assets/BI/icon@2x.png" alt="鍥炬爣" class="card-icon" />
+        <div class="card-icon" :style="{ color: iconColors[index % iconColors.length] }">
+          <!-- 閿�鍞� -->
+          <svg v-if="index % 3 === 0" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
+            <path d="M3 17l6-6 4 4 8-8" />
+            <path d="M15 7h6v6" />
+          </svg>
+          <!-- 閲囪喘 -->
+          <svg v-else-if="index % 3 === 1" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
+            <path d="M21 8l-9-5-9 5 9 5 9-5z" />
+            <path d="M3 8v8l9 5 9-5V8" />
+          </svg>
+          <!-- 搴撳瓨 -->
+          <svg v-else width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
+            <rect x="3" y="4" width="18" height="16" rx="2" />
+            <path d="M3 10h18M12 4v16" />
+          </svg>
+        </div>
         <div class="card-content">
           <span class="card-label">{{ item.name }}</span>
           <span class="card-value">{{ item.value }}</span>
@@ -26,8 +42,10 @@
 <script setup>
 import { ref, onMounted } from 'vue'
 import { salesPurchaseStorageProductCount } from '@/api/viewIndex.js'
+import { BI } from '../theme.js'
 
 const statItems = ref([])
+const iconColors = [BI.accentBright, '#35C6D6', '#8E7CE6']
 
 const formatPercent = (val) => {
   const num = Number(val) || 0
@@ -67,38 +85,56 @@
   flex: 1;
   display: flex;
   align-items: center;
-  background-image: url('@/assets/BI/border@2x.png');
-  background-size: 100% 100%;
-  background-position: center;
-  background-repeat: no-repeat;
+  background: var(--bi-panel-bg);
+  border: 1px solid var(--bi-panel-border);
+  border-radius: 8px;
+  position: relative;
+  overflow: hidden;
   height: 142px;
 }
 
+/* 椤堕儴鍝佺墝钃濅寒绾匡紝鏇夸唬鍥剧墖鎻忚竟 */
+.stat-card::before {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  height: 2px;
+  background: linear-gradient(90deg, var(--bi-accent) 0%, transparent 70%);
+}
+
 .card-icon {
-  width: 100px;
-  height: 100px;
-  margin: 20px 20px 0 10px;
+  width: 52px;
+  height: 52px;
+  margin: 0 16px 0 20px;
+  border-radius: 8px;
+  background: rgba(74, 108, 240, 0.12);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-shrink: 0;
 }
 
 .card-content {
   display: flex;
   flex-direction: column;
-  gap: 10px;
+  gap: 8px;
+  min-width: 0;
 }
 
 .card-value {
-  font-weight: 500;
-  font-size: 40px;
-  background: linear-gradient(360deg, #008bfd 0%, #ffffff 100%);
-  -webkit-background-clip: text;
-  -webkit-text-fill-color: transparent;
-  background-clip: text;
+  font-weight: 600;
+  font-size: 36px;
+  color: var(--bi-text-strong);
+  font-variant-numeric: tabular-nums;
+  line-height: 1.1;
 }
 
 .card-label {
   font-weight: 400;
-  font-size: 19px;
-  color: rgba(208, 231, 255, 0.7);
+  font-size: 16px;
+  color: var(--bi-text);
 }
 
 .card-compare {
@@ -111,11 +147,12 @@
 
 .card-compare > span:first-child {
   font-size: 13px;
-  opacity: 0.8;
+  color: var(--bi-text);
 }
 
 .compare-value {
   font-weight: 600;
+  font-variant-numeric: tabular-nums;
 }
 
 .compare-icon {
@@ -126,12 +163,12 @@
 
 .compare-up .compare-value,
 .compare-up .compare-icon {
-  color: #00c853;
+  color: var(--bi-up, #34c77b);
 }
 
 .compare-down .compare-value,
 .compare-down .compare-icon {
-  color: #ff5252;
+  color: var(--bi-down, #ff6b6b);
 }
 
 </style>

--
Gitblit v1.9.3