From 22c4be57bd51aac52f872e52c4a9a1b4c24ca625 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 10 三月 2025 18:14:21 +0800
Subject: [PATCH] ll

---
 admin/src/views/business/dangerStatic.vue |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/admin/src/views/business/dangerStatic.vue b/admin/src/views/business/dangerStatic.vue
index 0705e66..af9f3ee 100644
--- a/admin/src/views/business/dangerStatic.vue
+++ b/admin/src/views/business/dangerStatic.vue
@@ -13,11 +13,18 @@
     <div class="main_content">
       <div class="type_wrap">
         <div class="title">闅愭偅绫诲瀷缁熻</div>
-        <div class="echart1" ref="typeRef"></div>
+        <div v-show="typeList && typeList.length > 0" class="echart1" ref="typeRef"></div>
+        <div v-show="typeList.length == 0" style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;">
+          <img style="width: 240px;" src="@/assets/images/default_homeimg.png" alt="">
+        </div>
+
       </div>
       <div class="dept_wrap">
         <div class="title">闅愭偅褰掑睘閮ㄩ棬缁熻</div>
-        <div class="echart2" ref="deptRef"></div>
+        <div v-show="deptList && deptList.length > 0" class="echart2" ref="deptRef"></div>
+        <div v-show="deptList.length == 0" style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;">
+          <img style="width: 240px;" src="@/assets/images/default_homeimg.png" alt="">
+        </div>
       </div>
     </div>
   </div>
@@ -35,7 +42,7 @@
   data() {
     return {
       filters: {
-        fastdate: '',
+        fastdate: '29',
         queryStartTime: '',
         queryEndTime: ''
       },
@@ -48,7 +55,7 @@
             options: [
               { label: '寰呭鐞�', value: '0' },
               { label: '宸插鐞�', value: '1' },
-              { label: '涓嶅鐞�', value: '2' },
+              { label: '宸查��鍥�', value: '2' },
             ]
           },
           {
@@ -70,8 +77,8 @@
     }
   },
   mounted() {
-    // this.changeRadio('0')
-    this.getData()
+    this.changeRadio('29')
+    // this.getData()
   },
   methods: {
     changeRadio(day) {
@@ -85,8 +92,11 @@
         if (res) {
           this.typeList = res.cateList || []
           this.deptList = res.departmentList || []
-          this.initType()
-          this.initDept()
+          this.$nextTick(() => {
+            this.initType()
+            this.initDept()
+          })
+
         }
       })
 
@@ -100,13 +110,13 @@
       this.typeList.forEach(i => {
         total += i.total
       })
-      let colors = ['#d75a44', '#e39f4d', '#7ac7f6', '#7ac7f6', '#4469ee', '#698af0', '#9fb5f4', '#b6c7f7', '#c8d5f8']
+      let colors = ['#d75a44', '#e39f4d', '#f0d05f', '#7ac7f6', '#4469ee', '#698af0','#86a2f1','#a1b4f6','#a0b5f5', '#9fb5f4', '#b6c7f7', '#c8d5f8']
       let option = {
         title: [
           {
             text: '闅愭偅鎬绘暟',
             top: '46%',
-            left: '46%',
+            left: '45%',
             textStyle: {
               color: '#666666',
               fontSize: 16,
@@ -114,7 +124,7 @@
           }, {
             text: total,
             top: '50%',
-            left: '48%',
+            left: '47.6%',
             textStyle: {
               color: '#080404',
               fontSize: 24,
@@ -139,9 +149,8 @@
         },
         series: [
           {
-            name: 'Access From',
             type: 'pie',
-            radius: ['28%', '46%'],
+            radius: ['24%', '40%'],
             label: {
               formatter: "{a|{b}}\n\n{c} | {d}%",
               rich: {
@@ -250,7 +259,7 @@
   }
 
   .type_wrap {
-    flex: 5;
+    flex: 11;
     flex-shrink: 0;
     height: calc(100% - 20px);
     border-right: 12px solid #f7f7f7;
@@ -263,7 +272,7 @@
   }
 
   .dept_wrap {
-    flex: 4;
+    flex: 10;
     flex-shrink: 0;
     height: calc(100% - 20px);
     padding-left: 20px;

--
Gitblit v1.9.3