From c7b33db117fd2893d7d1c93bf5d46e87d33e44d0 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期一, 16 十二月 2024 16:08:51 +0800
Subject: [PATCH] 初审结果查询

---
 src/views/index.vue |  103 +++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 74 insertions(+), 29 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index 3a8f877..8ccd4ef 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -1,5 +1,8 @@
 <template>
   <div class="centre">
+    <div style="display:flex;justify-content: center;align-items: center;">
+      <h4>浠婃棩缁熻</h4>
+    </div>
     <div class="top">
       <div class="add">
         <div class="img">
@@ -33,6 +36,9 @@
           <div class="day">浠婃棩寰呮 {{ TobeToday }}</div>
         </div>
       </div>
+    </div>
+     <div style="display:flex;justify-content: center;align-items: center;">
+      <h4>杩戜竴鏈堢粺璁�</h4>
     </div>
     <div class="data-view">
       <div id="main" style="width:95%;height:330px"></div>
@@ -72,10 +78,18 @@
 
   created() {
     this.getList();
+
   },
+  watch: {
+        $route(to, from) {
+            window.location.reload(); //鐩戞祴鍒拌矾鐢卞彂鐢熻烦杞椂鍒锋柊涓�娆¢〉闈�
+            // this.$router.go(0);
+        },
+    },
+ 
 
   methods: {
-
+ 
     getList() {
       this.loading = true;
       // 鏌ヨ浠婃棩鐧昏
@@ -102,8 +116,8 @@
       getChart().then((response) => {
         response.data.forEach(item => {
           this.LineChart.push(item.date)
-          this.personYYNum.push(item.tdcoun);
-          this.reportNum.push(item.grcoun);
+          this.reportNum.push(item.tdcoun);
+          this.personYYNum.push(item.grcoun);
           this.teamYYNum.push(item.bgcoun);
 
         });
@@ -144,7 +158,7 @@
           yAxis: {
             type: 'value',
             min: 0,
-            max: 50,
+            max: 100,
             interval: 5
           },
           series: [
@@ -169,7 +183,7 @@
           ]
 
         })
-        let sizeFun = function () {
+        let sizeFun =  ()=> {
           myChart.resize()
         }
         window.addEventListener("resize", sizeFun)
@@ -180,17 +194,28 @@
       // 楗肩姸鍥�
       getPieChart().then((response) => {
         if (response.data) {
-         
-          if (response.data.tjdj.length === 0) {
+
+          if(response.data.tjdj == 0){
             this.PieChart = []
             this.PieChart = [
-                {
-                  "name": "浣撴鐧昏浜烘暟鍒嗗竷",
-                  "count": 1,
-                  "value": 10
-                },
-              
-              ]
+              {
+                "name": "浣撴鐧昏浜烘暟鍒嗗竷",
+                "count": 1,
+                "value": 10
+              },
+
+            ]
+          }else if (response.data.tjdj.length === 0) {
+
+            this.PieChart = []
+            this.PieChart = [
+              {
+                "name": "浣撴鐧昏浜烘暟鍒嗗竷",
+                "count": 1,
+                "value": 10
+              },
+
+            ]
           } else {
             this.PieChart = response.data.tjdj
             this.PieChart.forEach(item => {
@@ -223,6 +248,9 @@
                 type: 'pie',
                 radius: ['16%', '54%'],
                 center: ["50%", "43%"],
+                avoidLabelOveralap:false,
+                startAngle:180,
+                minAngle:10,
                 data: this.PieChart,
                 emphasis: {
                   itemStyle: {
@@ -234,16 +262,26 @@
               }]
           })
 
-          if (response.data.tjyc.length === 0) {
+          if(response.data.tjyc == 0){
             this.PieChart2 = []
             this.PieChart2 = [
-                {
-                  "name": "浣撴缁撴灉寮傚父浜烘暟鍒嗗竷",
-                  "count": 1,
-                  "value": 10
-                },
-              
-              ]
+              {
+                "name": "浣撴缁撴灉寮傚父浜烘暟鍒嗗竷",
+                "count": 1,
+                "value": 0
+              },
+
+            ]
+          }else if (response.data.tjyc.length === 0) {
+            this.PieChart2 = []
+            this.PieChart2 = [
+              {
+                "name": "浣撴缁撴灉寮傚父浜烘暟鍒嗗竷",
+                "count": 1,
+                "value": 0
+              },
+
+            ]
           } else {
             this.PieChart2 = response.data.tjyc
             this.PieChart2.reverse()
@@ -275,6 +313,9 @@
                 type: 'pie',
                 radius: ['16%', '54%'],
                 center: ["50%", "43%"],
+                avoidLabelOveralap:false,
+                startAngle:180,
+                minAngle:10,
                 data: this.PieChart2,
                 emphasis: {
                   itemStyle: {
@@ -285,13 +326,14 @@
                 }
               }]
           })
-        }
-
-
-        window.onresize = function () {
+          window.onresize =  () =>{
           myChart2.resize()
           myChart3.resize()
         }
+        }
+
+
+      
         this.loading = false;
       });
 
@@ -309,9 +351,10 @@
 
 <style>
 .centre {
-  height: 820px;
+  min-height: 820px;
   margin: 15px 15px;
   background-color: #f3f3f3;
+  padding: 10px 10px 10px 10px;
 }
 
 .top {
@@ -357,7 +400,8 @@
 }
 
 .data-view {
-  margin: 5px 15px;
+  margin: 0 15px;
+  height: 323px !important
 }
 
 #main {
@@ -366,7 +410,8 @@
 
 .view {
   margin: 0px 15px;
-  height: 350px;
+  padding-top: 15px;
+  min-height: 350px;
   display: flex;
 }
 

--
Gitblit v1.8.0