From db5872786c1e1697a59af41386136ee002bb68ad Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 30 六月 2023 17:17:12 +0800
Subject: [PATCH] 修改为汇丰默认图标,修改处理率计算方式

---
 src/views/manageCenter/index.vue |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/views/manageCenter/index.vue b/src/views/manageCenter/index.vue
index 97b7298..09ed50e 100644
--- a/src/views/manageCenter/index.vue
+++ b/src/views/manageCenter/index.vue
@@ -132,7 +132,7 @@
         <div class="equipmentCard">
           <div class="label">澶勭悊鐜�</div>
           <div class="number">
-            {{ warningManage }}
+            {{ disposeRate }}
             <div class="downIcon iconfont">&#xe651;</div>
           </div>
 
@@ -160,7 +160,7 @@
 
       <div class="hashRate">
         <div class="left">
-          <div class="title">棰勮鏁版嵁鍗犳瘮:</div>
+          <div class="title">鏁存敼鏁版嵁璇︽儏</div>
           <div class="info">
             <div class="equipmentInfo" style="margin-top: 25px">
               <div class="equipmentCard">
@@ -246,11 +246,11 @@
       }
       return parseInt(this.solvedTotal / this.tableDataList.length)
     },
-    warningManage() {
-      if (this.warningChecked == 0 || this.warningTotal == 0) {
+    disposeRate() {
+      if (this.solvedTotal == 0 || this.warningTotal == 0) {
         return 0
       }
-      return parseInt((this.warningChecked / this.warningTotal) * 100) + "%"
+      return parseInt((this.solvedTotal / this.warningTotal) * 100) + "%"
     },
     permissionMenuList() {
       let user = JSON.parse(sessionStorage.getItem("userInfo"))
@@ -683,17 +683,20 @@
     //key 1=璇姤鏁版嵁,2=宸叉暣鏀�,3=鏈暣鏀�,4=宸叉帓鏌� doc_count=鏁伴噺 total=鎬婚噺
     decodeWarningRate(b64data) {
       if (b64data) {
-        this.warningTotal = 0
-        this.warningSolved = 0
-        this.warningChecked = 0
+        this.warningTotal = 0 // 鎬婚噺
+        this.warningSolved = 0 // 宸叉暣鏀�
+        this.warningChecked = 0 //宸叉帓鏌�
+        let falseAlarm = 0 // 璇姤
 
         let decodeString = Base64.decode(b64data)
         if (decodeString != "") {
           let decodeResult = JSON.parse(decodeString)
           if (decodeResult && decodeResult.total > 0) {
-            this.warningTotal = decodeResult.total
             decodeResult.buckets.forEach((element) => {
               switch (element.key) {
+                case 1:
+                  falseAlarm += element.doc_count
+                  break
                 case 2:
                   this.warningSolved += element.doc_count
                   break
@@ -704,6 +707,10 @@
                   break
               }
             })
+
+            // 2023/4/12 淇敼, 棰勮鎬婚噺涓嶇粺璁¤鎶�
+            // this.warningTotal = decodeResult.total - falseAlarm
+            this.warningTotal = decodeResult.total
           }
           // console.log("WarningRate:", decodeResult)
         }

--
Gitblit v1.8.0