From 43c2f5b94d87263cf189f7ba51c8dc6c5e6144c8 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 23 十一月 2023 08:52:22 +0800
Subject: [PATCH] 1.修改了雷达图传入的数据 2.数据指标排名一进来按日均值倒序排列 3.修改了一些局部的样式

---
 src/views/risk_assessment/components/DustRadarChart.vue |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/src/views/risk_assessment/components/DustRadarChart.vue b/src/views/risk_assessment/components/DustRadarChart.vue
index 1936eb3..1848330 100644
--- a/src/views/risk_assessment/components/DustRadarChart.vue
+++ b/src/views/risk_assessment/components/DustRadarChart.vue
@@ -14,9 +14,9 @@
     },
     // 鏁版嵁
     yData: {
-      type: Array,
+      type: Object,
       default: () => {
-        return [100,0,0,0,100];
+        return {};
       }
     }
   },
@@ -26,8 +26,11 @@
     };
   },
   watch: {
-    yData() {
-      this.set();
+    yData: {
+      handler() {
+        this.set()
+      },
+      deep:true
     }
   },
   mounted() {
@@ -36,19 +39,19 @@
   },
   computed:{
     valid(){
-      return (100-this.yData[0]).toFixed(2)
+      return (this.yData.validRisk*100).toFixed(2)
     },
     exceptionRecurrence(){
-      return this.yData[1]*100
+      return (this.yData.exceptionTypeAggregation*100).toFixed(2)
     },
     exceptionTypeAggregation(){
-      return this.yData[2]*100
+      return (this.yData.exceptionTypeAggregation*100).toFixed(2)
     },
     exceeding(){
-      return  this.yData[3]
+      return  (this.yData.exceedRisk*100).toFixed(2)
     },
     online(){
-      return   (100-this.yData[4]).toFixed(2)
+      return   (this.yData.onlineRisk*100).toFixed(2)
     }
   },
   methods: {
@@ -92,11 +95,11 @@
             data: [
               {
                 value: [
-                  (1 - this.yData[0]/100).toFixed(4),
-                  this.yData[1],
-                  this.yData[2],
-                 (this.yData[3]/100).toFixed(4),
-                  (1-this.yData[4]/100).toFixed(4)
+                  this.yData.validRisk.toFixed(4),
+                  this.yData.typicalExceptionRepetitionRate,
+                 this.yData.exceptionTypeAggregation,
+                 this.yData.exceedRisk.toFixed(4),
+                  this.yData.onlineRisk.toFixed(4)
                 ],
    
                 name: '寮傚父鍒嗘瀽'

--
Gitblit v1.9.3