Browse Source

考勤统计修改

wgl 4 years ago
parent
commit
110ea63df0
1 changed files with 5 additions and 20 deletions
  1. 5 20
      src/projects/business/views/Master/Attendance/StatisticList.vue

+ 5 - 20
src/projects/business/views/Master/Attendance/StatisticList.vue

@@ -44,7 +44,7 @@
 					</div>
 					<ul class="mui-table-view">
 						<template v-for="(iten,index) in recordList">
-							<li v-for="(item,index) in iten.personList" class="mui-table-view-cell">
+							<li v-show="filterStatus=='-1' || item.result==filterStatus" v-for="(item,index) in iten.personList" class="mui-table-view-cell">
 								<div class="mui-media-body">
 									{{item.name}}
 									<span v-if="item.result=='0'" class="mui-h6 vongi-kqtj-time">{{timeName}}</span>
@@ -132,6 +132,7 @@
 				leaveEarlyCount: 0,
 				lateCount: 0,
 				recordList: [],
+				tempRecordList: [],
 				timeList: [],
 				timeName: '',
 
@@ -196,6 +197,7 @@
 					this.isLoading = false;
 
 					this.recordList = response.groupList;
+					this.tempRecordList = this.recordList;
 					this.absentCount = response.absentCount;
 					this.workCount = response.workCount;
 					this.leaveEarlyCount = response.leaveEarlyCount;
@@ -279,7 +281,8 @@
 				picker.show(function(selectItems) {
 					_this.subForm.alarmConfigId = selectItems[0].value;
 					_this.timeName = selectItems[0].text;
-					_this.getList();
+					_this.getCompanyList();
+					_this.getPersonList();
 				})
 			},
 			//跳转到详情页
@@ -353,24 +356,6 @@
 				immediate: true,
 				deep: true
 			},
-			'filterStatus': {
-				handler(newValue) {
-					if (newValue != '-1') {
-						var list = this.recordList[0]['personList'];
-						var newList = [];
-						for (var i = 0; i < list.length; i++) {
-							if (list[i]['result'] == newValue) {
-								newList.push(list[i]);
-							}
-						}
-						this.recordList[0]['personList'] = newList;
-					} else {
-						this.getPersonList();
-					}
-				},
-				immediate: true,
-				deep: true
-			}
 		}
 	}
 </script>