Răsfoiți Sursa

task-4803 培训统计看板

tianxinyu 7 luni în urmă
părinte
comite
18fec0be43

+ 2 - 2
src/views/business/trainManagement/components/jobPlanChart.vue

@@ -4,11 +4,11 @@
         <div v-show="show" style="height:92%;display:flex">
             <div style="width:28%;margin: 4% 5% 0 0;">
                 <div class="leftSty">
-                    <div class="numSize">动<div class="numColor"> {{ data.autoNum + ' ' }}
+                    <div class="numSize">动<div class="numColor"> {{ data.autoNum + ' ' }}
                             ({{ calculatedPercentage(data.autoNum, data.total) }}%) </div>
                     </div>
                     <div style="flex: 1;"></div>
-                    <div class="numSize">动<div class="numColor">{{ data.manual + ' ' }}
+                    <div class="numSize">动<div class="numColor">{{ data.manual + ' ' }}
                             ({{ calculatedPercentage(data.manual, data.total) }}%) </div>
                     </div>
                     <div style="flex: 6;">

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

@@ -151,40 +151,40 @@ export default {
   },
   computed: {
     // 计算各种统计率
-    calRate () {
-      const total = this.tableList.length
-      let mustPeople = this.tableList.filter(i => i.flag).length
-      let noSignIn = 0
-      let signIn = 0
-      let mustSignIn = 0 // 应参人数中签到的人数
-      let laterSignIn = 0
-      this.tableList.forEach(item => {
-        if (item.status === '已签到') {
-          signIn++
-          if (item.flag) mustSignIn++
-        }
-        if (item.status === '未签到') noSignIn++
-        if (item.status === '已补签') laterSignIn++
-      })
-      if (mustPeople === 0) { // 没有确定参会人员的情况
-        mustPeople = total
-        mustSignIn = signIn
-      }
-      const signInRate = mustPeople === 0 ? 0 : mustSignIn / mustPeople * 100
-      const noSignInRate = mustPeople === 0 ? 0 : noSignIn / mustPeople * 100
-      const laterSignInRate = mustPeople === 0 ? 0 : laterSignIn / mustPeople * 100
-      return {
-        mustSignIn,
-        mustPeople,
-        total,
-        signIn,
-        noSignIn,
-        laterSignIn,
-        signInRate: signInRate.toFixed(2),
-        noSignInRate: noSignInRate.toFixed(2),
-        laterSignInRate: laterSignInRate.toFixed(2)
-      }
-    },
+        calRate () {
+            const total = this.tableList.length
+            let mustPeople = this.tableList.filter(i => i.flag).length
+            let noSignIn = 0
+            let signIn = 0
+            let mustSignIn = 0 // 应参人数中签到的人数
+            let laterSignIn = 0
+            this.tableList.forEach(item => {
+                if (item.status === '已签到') {
+                    signIn++
+                    if (item.flag) mustSignIn++
+                }
+                if (item.status === '未签到') noSignIn++
+                if (item.status === '已补签') laterSignIn++
+            })
+            if (mustPeople === 0) { // 没有确定参会人员的情况
+                mustPeople = total
+                mustSignIn = signIn
+            }
+            const signInRate = mustPeople === 0 ? 0 : mustSignIn / mustPeople * 100
+            const noSignInRate = mustPeople === 0 ? 0 : noSignIn / mustPeople * 100
+            const laterSignInRate = mustPeople === 0 ? 0 : laterSignIn / mustPeople * 100
+            return {
+                mustSignIn,
+                mustPeople,
+                total,
+                signIn,
+                noSignIn,
+                laterSignIn,
+                signInRate: signInRate.toFixed(2),
+                noSignInRate: noSignInRate.toFixed(2),
+                laterSignInRate: laterSignInRate.toFixed(2)
+            }
+        },
     categoryList () {
       const list = { '已签到': 1, '已补签': 2, '未签到': 3 }
       const tempList = this.selectItem === '全部' ? this.tableList : this.tableList.filter(item => item.status === this.selectItem)