From 74a7a2bbef241a023110ff24c8e7c84025e267f5 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期四, 25 四月 2024 10:09:38 +0800
Subject: [PATCH] qxtj

---
 src/views/index.vue |   58 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 37 insertions(+), 21 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index 3a8f877..bc94f0d 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -72,10 +72,18 @@
 
   created() {
     this.getList();
+
   },
+  watch: {
+        $route(to, from) {
+            window.location.reload(); //鐩戞祴鍒拌矾鐢卞彂鐢熻烦杞椂鍒锋柊涓�娆¢〉闈�
+            // this.$router.go(0);
+        },
+    },
+ 
 
   methods: {
-
+ 
     getList() {
       this.loading = true;
       // 鏌ヨ浠婃棩鐧昏
@@ -180,17 +188,17 @@
       // 楗肩姸鍥�
       getPieChart().then((response) => {
         if (response.data) {
-         
+
           if (response.data.tjdj.length === 0) {
             this.PieChart = []
             this.PieChart = [
-                {
-                  "name": "浣撴鐧昏浜烘暟鍒嗗竷",
-                  "count": 1,
-                  "value": 10
-                },
-              
-              ]
+              {
+                "name": "浣撴鐧昏浜烘暟鍒嗗竷",
+                "count": 1,
+                "value": 10
+              },
+
+            ]
           } else {
             this.PieChart = response.data.tjdj
             this.PieChart.forEach(item => {
@@ -223,6 +231,9 @@
                 type: 'pie',
                 radius: ['16%', '54%'],
                 center: ["50%", "43%"],
+                avoidLabelOveralap:false,
+                startAngle:180,
+                minAngle:10,
                 data: this.PieChart,
                 emphasis: {
                   itemStyle: {
@@ -237,13 +248,13 @@
           if (response.data.tjyc.length === 0) {
             this.PieChart2 = []
             this.PieChart2 = [
-                {
-                  "name": "浣撴缁撴灉寮傚父浜烘暟鍒嗗竷",
-                  "count": 1,
-                  "value": 10
-                },
-              
-              ]
+              {
+                "name": "浣撴缁撴灉寮傚父浜烘暟鍒嗗竷",
+                "count": 1,
+                "value": 10
+              },
+
+            ]
           } else {
             this.PieChart2 = response.data.tjyc
             this.PieChart2.reverse()
@@ -275,6 +286,9 @@
                 type: 'pie',
                 radius: ['16%', '54%'],
                 center: ["50%", "43%"],
+                avoidLabelOveralap:false,
+                startAngle:180,
+                minAngle:10,
                 data: this.PieChart2,
                 emphasis: {
                   itemStyle: {
@@ -288,10 +302,10 @@
         }
 
 
-        window.onresize = function () {
-          myChart2.resize()
-          myChart3.resize()
-        }
+        // window.onresize = function () {
+        //   myChart2.resize()
+        //   myChart3.resize()
+        // }
         this.loading = false;
       });
 
@@ -357,7 +371,8 @@
 }
 
 .data-view {
-  margin: 5px 15px;
+  margin: 0 15px;
+  height: 323px !important
 }
 
 #main {
@@ -366,6 +381,7 @@
 
 .view {
   margin: 0px 15px;
+  padding-top: 15px;
   height: 350px;
   display: flex;
 }

--
Gitblit v1.8.0