From 2b3d9f38998fa0a3903e7789c690e62cf957d4b9 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 01 四月 2026 16:38:39 +0800
Subject: [PATCH] 追踪进度接口对接,主生产计划右侧操作栏透光问题修改

---
 src/views/index.vue |   69 +++++++++++++++++++++++++++++++---
 1 files changed, 62 insertions(+), 7 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index c6f00fc..65babe5 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -16,9 +16,9 @@
                    type="primary"
                    plain
                    @click="refreshDashboardData">鍒锋柊鏁版嵁</el-button>
-        <el-button size="small"
+        <!-- <el-button size="small"
                    plain
-                   @click="configDialogVisible = true">棣栭〉閰嶇疆</el-button>
+                   @click="configDialogVisible = true">棣栭〉閰嶇疆</el-button> -->
       </div>
     </div>
     <div class="content-grid">
@@ -40,7 +40,7 @@
             </el-button>
           </div>
         </section>
-        <section class="section-card">
+        <!-- <section class="section-card">
           <div class="section-title">閲嶇偣寰呭姙</div>
           <div class="todo-row"
                v-for="todo in todos"
@@ -49,7 +49,7 @@
                     :type="todo.type">{{ todo.level }}</el-tag>
             <span>{{ todo.title }}</span>
           </div>
-        </section>
+        </section> -->
         <section class="section-card">
           <div class="section-title">缁忚惀鍏虫敞</div>
           <div class="focus-row"
@@ -157,11 +157,10 @@
           </section>
           <section class="section-card"
                    v-if="isSectionVisible('costChart')">
-            <div class="section-title">鑳借�椾笌鎴愭湰缁撴瀯</div>
+            <div class="section-title">鑳借�楃被鍨嬪崰姣�</div>
             <Echarts :chartStyle="chartStyle"
-                     :legend="costLegend"
                      :tooltip="pieTooltip"
-                     :series="costSeries"
+                     :series="energyTypeSeries"
                      style="height: 260px" />
           </section>
         </div>
@@ -542,6 +541,61 @@
       data: [],
     },
   ]);
+
+  // 鑳借�楃被鍨嬪崰姣旀暟鎹�
+  const energyTypeSeries = reactive([
+    {
+      type: "pie",
+      radius: ["40%", "70%"],
+      center: ["50%", "50%"],
+      avoidLabelOverlap: false,
+      itemStyle: {
+        borderRadius: 10,
+        borderColor: "#fff",
+        borderWidth: 2,
+      },
+      label: {
+        show: true,
+        formatter: "{b}: {d}%",
+      },
+      data: [
+        { value: 0, name: "姘�", itemStyle: { color: "#409EFF" } },
+        { value: 0, name: "鐢�", itemStyle: { color: "#E6A23C" } },
+        { value: 0, name: "姘�", itemStyle: { color: "#F56C6C" } },
+      ],
+    },
+  ]);
+
+  // 妯℃嫙鑳借�楁暟鎹�
+  const energyData = reactive({
+    water: 120,
+    electricity: 350,
+    gas: 80,
+  });
+
+  // 鏇存柊鑳借�楃被鍨嬪崰姣斿浘琛�
+  const updateEnergyTypeChart = () => {
+    const { water, electricity, gas } = energyData;
+    const total = water + electricity + gas;
+
+    energyTypeSeries[0].data = [
+      {
+        value: total > 0 ? ((water / total) * 100).toFixed(2) : 0,
+        name: "姘�",
+        itemStyle: { color: "#409EFF" },
+      },
+      {
+        value: total > 0 ? ((electricity / total) * 100).toFixed(2) : 0,
+        name: "鐢�",
+        itemStyle: { color: "#E6A23C" },
+      },
+      {
+        value: total > 0 ? ((gas / total) * 100).toFixed(2) : 0,
+        name: "姘�",
+        itemStyle: { color: "#F56C6C" },
+      },
+    ];
+  };
 
   const planTable = reactive([]);
   const recentTrendCards = reactive([
@@ -982,6 +1036,7 @@
     loadQualityData();
     loadCostComposition();
     loadWarningCenter();
+    updateEnergyTypeChart();
     lastUpdatedAt.value = new Date().toLocaleString();
   };
 

--
Gitblit v1.9.3