|
@@ -151,40 +151,40 @@ export default {
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
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 () {
|
|
categoryList () {
|
|
|
const list = { '已签到': 1, '已补签': 2, '未签到': 3 }
|
|
const list = { '已签到': 1, '已补签': 2, '未签到': 3 }
|
|
|
const tempList = this.selectItem === '全部' ? this.tableList : this.tableList.filter(item => item.status === this.selectItem)
|
|
const tempList = this.selectItem === '全部' ? this.tableList : this.tableList.filter(item => item.status === this.selectItem)
|