From edcc7abaecb5621e399a90deab23a9fa096052e6 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期三, 23 四月 2025 14:48:25 +0800
Subject: [PATCH] 修改页面

---
 src/view/home/index.vue |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/view/home/index.vue b/src/view/home/index.vue
index b9c4e4c..678ea7e 100644
--- a/src/view/home/index.vue
+++ b/src/view/home/index.vue
@@ -167,7 +167,7 @@
       </div>
       <!-- 预警情况统计 -->
       <div class="warnCount">
-        <div class="title">预警情况统计</div>
+        <div class="title ">预警情况统计</div>
         <div class="countChart" id="countChart"></div>
         <div class="noData" v-if="countList.length == 0">
           <el-empty description="暂无数据" :image-size="80"></el-empty>
@@ -175,7 +175,7 @@
       </div>
       <!-- 预警排行榜(前10) -->
       <div class="warnRank">
-        <div class="title">预警排行榜(前10)</div>
+        <div class="title mt-0">预警排行榜(前10)</div>
         <div class="rankChart" id="rankChart">
           <div class="rankItem" v-for="(item, index) in rankList" :key="index">
             <div class="left">{{ item.name }}</div>
@@ -839,6 +839,18 @@
             },
             axisLabel: {
               color: "rgba(0, 0, 0, 0.45)",
+              interval: 0, // 强制显示所有标签
+              width: 60, // 设置标签宽度
+              height: 20, // 设置标签高度
+              overflow: 'truncate', // 截断模式
+              ellipsis: true, // 超出显示省略号
+              rotate: -40, // 可以根据需要调整角度
+              formatter: function(value) {
+                if (value.length > 4) {
+                  return value.substring(0, 4) + '...';
+                }
+                return value;
+              }
             },
           },
         ],
@@ -1163,6 +1175,9 @@
       text-transform: none;
       margin-bottom: 10px;
     }
+    .mt-0{
+      margin-top: 0 !important;
+    }
 
     .firCard {
       display: flex;
@@ -1318,7 +1333,7 @@
 
       #countChart {
         width: 453px;
-        height: 150px;
+        height: 180px;
       }
 
       .noData {
@@ -1330,7 +1345,7 @@
         bottom: 0;
         left: 0;
         width: 100%;
-        height: 150px;
+        height: 180px;
       }
     }
 
@@ -1350,7 +1365,7 @@
             flex: 2;
             padding-right: 25px;
             font-weight: 400;
-            font-size: 12px;
+            font-size: 13px;
             color: rgba(0, 0, 0, 0.45);
             line-height: 17px;
             text-align: right;

--
Gitblit v1.7.1