From cfb38defe43a3c3e4d42a95e0128e08a7908490f Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 29 May 2025 17:07:33 +0800
Subject: [PATCH] feat:图表适配,修改任务管理图表的大小

---
 src/views/wel/index.vue |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 8a78355..00a2d9b 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -235,14 +235,14 @@
       borderWidth: 0,
       formatter: params => {
         return `<div style="background-color: rgba($color: #FFFFFF, $alpha: 0.95);
-          box-shadow: 0 4px 9px 0 rgba($color: #000000, $alpha: 0.1);
-          padding:0 12px;
+          box-shadow: 0 0.4rem 0.9rem 0 rgba($color: #000000, $alpha: 0.1);
+          padding:0 1.2rem;
           display: flex;
           align-items: center;
-          border-radius: 4px;
-          font-size: 12px;" class="tooltip-area">
+          border-radius: 0.4rem;
+          font-size: 1.2rem;" class="tooltip-area">
           <p>${params.marker}${params.name}</p>
-          <h4 style="margin-left: 30px;">${params.data.rate || params.percent}%</h4>
+          <h4 style="margin-left: 3rem;">${params.data.rate || params.percent}%</h4>
         </div>`;
       },
     },
@@ -253,13 +253,13 @@
       text: data.total.title,
       textStyle: {
         color: 'rgba(28, 31, 35, 0.80)',
-        fontSize: '12px',
+        fontSize: '1.2rem',
         fontWeight: 'bold',
       },
       subtext: data.total.figure,
       subtextStyle: {
         color: '#1C1F23',
-        fontSize: '20px',
+        fontSize: '2rem',
         fontWeight: '600',
       },
       top: '40%',
@@ -283,11 +283,11 @@
           rich: {
             a: {
               color: 'rgba(28, 31, 35, 0.80)',
-              fontSize: 12, // 建议去掉引号使用数字
+              fontSize: '1.2rem', 
             },
             b: {
               color: '#1C1F23',
-              fontSize: 14,
+              fontSize: '1.4rem',
               fontWeight: 'bold', // 确保加粗
             },
           },
@@ -308,7 +308,7 @@
   chart.value.setOption(echartsOption);
 };
 
-// 柱状图
+// 折线/柱状图
 const lineCharts = bardata => {
   const categories = bardata?.map(item => item.name); // x轴类别
   const flight_distance = [];
@@ -377,7 +377,7 @@
       },
       axisLabel: {
         interval: 0,
-        color: '#383838', // 直接配置颜色
+        color: '#383838', 
       },
     },
     yAxis: [
@@ -509,7 +509,7 @@
 </style>
 <style scoped lang="scss">
 .workbench {
-  padding: 0px 20px 0 20px;
+  padding: 0px 20px 0 10px;
   display: flex;
   justify-content: space-between;
 }

--
Gitblit v1.9.3