From 9b2b08c3b44de3d2f76069936dfe5ba0e0ece0aa Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 21 十一月 2024 13:08:01 +0800
Subject: [PATCH] 1. 修改审核后左侧列表状态和顶部统计数据的

---
 src/views/fysp/check/ProCheck.vue                   |   14 ++++++++++++--
 src/views/fysp/check/ProCheckProxy.js               |   11 +++++++++++
 src/components.d.ts                                 |    3 ---
 src/views/fysp/check/components/CompProblemCard.vue |    8 +++++---
 4 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/src/components.d.ts b/src/components.d.ts
index f302504..0ac0d9e 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -25,7 +25,6 @@
     ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElContainer: typeof import('element-plus/es')['ElContainer']
-    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
     ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
     ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
@@ -44,8 +43,6 @@
     ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPopover: typeof import('element-plus/es')['ElPopover']
-    ElRadio: typeof import('element-plus/es')['ElRadio']
-    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
diff --git a/src/views/fysp/check/ProCheck.vue b/src/views/fysp/check/ProCheck.vue
index f35f1e0..f4d78a2 100644
--- a/src/views/fysp/check/ProCheck.vue
+++ b/src/views/fysp/check/ProCheck.vue
@@ -34,6 +34,7 @@
           :subtask="curSubtask.data"
           :topTask="topTask"
           @submit="updateSubtask"
+          @check="handleProblemCheck"
         ></CompProblemCard>
       </el-scrollbar>
       <el-empty v-else description="鏆傛棤璁板綍" v-loading="mainLoading" />
@@ -314,7 +315,7 @@
     // 鍒锋柊褰撳墠閫変腑瀛愪换鍔�
     refreshCurrSubtask(refresh) {
       this.sideLoading = false;
-      this.mainLoading = true;
+      // this.mainLoading = true;
       setTimeout(() => {
         taskApi
           .getProBySubtask(this.curSubtask.data.stGuid)
@@ -336,9 +337,18 @@
             // this.curSubtask = s;
           })
           .finally(() => {
-            this.mainLoading = false;
+            // this.mainLoading = false;
           });
       }, 150);
+    },
+    // 闂瀹℃牳瀹屾垚鍚庯紝鏇存柊宸︿晶鍒楄〃瀵瑰簲瀛愪换鍔$姸鎬�
+    handleProblemCheck(){
+      const status = ProCheckProxy.calProStatus(this.curProList)
+      this.curSubtask.data.proNum = status.proNum
+      this.curSubtask.data.proCheckedNum = status.proCheckedNum
+      this.curSubtask.data.changeNum = status.changeNum
+      this.curSubtask.data.changeCheckedNum = status.changeCheckedNum
+      this.curSubtask.type = this.getSubtaskType(this.curSubtask.data)
     }
   },
   mounted() {}
diff --git a/src/views/fysp/check/ProCheckProxy.js b/src/views/fysp/check/ProCheckProxy.js
index be0f719..bebef21 100644
--- a/src/views/fysp/check/ProCheckProxy.js
+++ b/src/views/fysp/check/ProCheckProxy.js
@@ -16,8 +16,12 @@
     const status = {
       //闂鏁伴噺
       proNum: proList.length,
+      // 闂瀹℃牳鏁�
+      proCheckedNum: 0,
       //鏁存敼鏁伴噺
       changeNum: 0,
+      //鏁存敼瀹℃牳鏁伴噺
+      changeCheckedNum: 0,
       //寰呭鏍告暟閲�
       uncheckNum: 0,
       //宸插鏍搁�氳繃鏁伴噺
@@ -44,6 +48,13 @@
         status.uncheckNum++
       else status.passNum++
 
+      if (p.extension3 == proStatus.pass) {
+        status.proCheckedNum++
+      }
+      if (p.extension3 == proStatus.change_pass) {
+        status.changeCheckedNum++
+      }
+
       status.changePer =
         String(
           (status.changeNum / status.proNum) * 100
diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue
index d97b17b..224c591 100644
--- a/src/views/fysp/check/components/CompProblemCard.vue
+++ b/src/views/fysp/check/components/CompProblemCard.vue
@@ -175,7 +175,7 @@
 import CompProRecent from './CompProRecent.vue';
 import { useCloned } from '@vueuse/core';
 export default {
-  emits: ['submmit', 'cancel'],
+  emits: ['check', 'submit', 'cancel'],
   components: {
     CompProblemAddOrUpd,
     ComChangeEdit,
@@ -340,7 +340,8 @@
             .checkProblem({ pId: pro.guid, action: action })
             .then((res) => {
               if (res.success) {
-                this.$emit('submit', false);
+                pro.extension3 = status
+                this.$emit('check');
               }
             });
         }
@@ -361,7 +362,8 @@
             .checkProblem({ pId: pro.guid, action: action })
             .then((res) => {
               if (res.success) {
-                this.$emit('submit', false);
+                pro.extension3 = status
+                this.$emit('check');
               }
             });
         }

--
Gitblit v1.9.3