Forráskód Böngészése

内审、管审签到功能统一性调整

luoaoxuan 1 éve
szülő
commit
bf2e76dd1a

+ 5 - 5
src/views/component/trainingManage/registerInfoDialog.vue

@@ -162,9 +162,9 @@ export default {
                 if (item.status === '已补签') laterSignIn++
             })
 
-            const signInRate = signIn / total * 100
-            const noSignInRate = noSignIn / total * 100
-            const laterSignInRate = laterSignIn / total * 100
+            const signInRate = total === 0 ? 0 : signIn / total * 100
+            const noSignInRate = total === 0 ? 0 : noSignIn / total * 100
+            const laterSignInRate = total === 0 ? 0 : laterSignIn / total * 100
             return {
                 total,
                 signIn,
@@ -282,8 +282,8 @@ export default {
                         }
                     })
                 }
-            } else if (this.params.tableName === 't_fwxyhyqdb') {
-                if (data[0].shi_fou_guo_shen_ !== '已结束') {
+            } else if (this.params.tableName === 't_fwxyhyqdb' || this.params.tableName === 't_nshyjyb' || this.params.tableName === 't_gshyjyb') {
+                if (data[0].shi_fou_guo_shen_ !== '已完成') {
                     this.addPeople()
                 }
             }