From 6f1229d08cf208bfb9ea71b6909e46620948ad9a Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 04 十二月 2023 13:40:32 +0800
Subject: [PATCH] 饼图样式优化

---
 src/views/cockpitPage/components/StatisticalBox.vue |   59 ++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/src/views/cockpitPage/components/StatisticalBox.vue b/src/views/cockpitPage/components/StatisticalBox.vue
index 934dd76..c354d63 100644
--- a/src/views/cockpitPage/components/StatisticalBox.vue
+++ b/src/views/cockpitPage/components/StatisticalBox.vue
@@ -2,8 +2,17 @@
   <div class="statistical-box">
     <div v-for="item in allList" class="all-bg">
       <div class="box">
-        <div class="commom-title">{{ item.title }}</div>
-        <div class="commom-value">{{ item.value }}</div>
+        <div class="commom-title">{{ item.label }}</div>
+        <div
+          class="commom-value"
+          :class="
+            item.label == '寤舵湡浜や粯' || item.label == '鐗╂枡涓嶈冻'
+              ? 'redColor'
+              : ''
+          "
+        >
+          {{ item.value }}
+        </div>
       </div>
     </div>
   </div>
@@ -12,18 +21,39 @@
 <script>
 export default {
   components: {},
-  props: {},
-  data() {
-    return {
-      allList: [
-        { title: "寮�鏈哄彴鏁�", value: 200 },
-        { title: "鎬讳骇閲�", value: 1200 },
-        { title: "鐢熶骇宸ュ崟鏁�", value: 200 },
-        { title: "寤舵湡浜や粯", value: 20 },
-        { title: "鐗╂枡涓嶈冻", value: 10 },
-        { title: "璁″垝杈炬垚鐜�", value: 2 },
+  props: {
+    allList: {
+      type: Array,
+      default: () => [
+        {
+          value: 200,
+          label: "寮�鏈哄彴鏁�",
+        },
+        {
+          value: 1200,
+          label: "鎬讳骇閲�",
+        },
+        {
+          value: 200,
+          label: "鐢熶骇宸ュ崟鏁�",
+        },
+        {
+          value: 20,
+          label: "寤舵湡浜や粯",
+        },
+        {
+          value: 10,
+          label: "鐗╂枡涓嶈冻",
+        },
+        {
+          value: 2,
+          label: "璁″垝杈炬垚鐜�",
+        },
       ],
-    };
+    },
+  },
+  data() {
+    return {};
   },
   mounted() {},
   watch: {},
@@ -59,6 +89,9 @@
         font-family: "Arial Negreta", "Arial Normal", "Arial";
         font-weight: 700;
       }
+      .redColor {
+        color: #ff0000;
+      }
     }
   }
 }

--
Gitblit v1.8.0