Przeglądaj źródła

考勤统计修改

wgl 4 lat temu
rodzic
commit
6cb67e3c31

+ 9 - 0
src/projects/business/apis/Master/attendance.js

@@ -86,3 +86,12 @@ export function getAttednance(params) {
 		method: 'get',
 	})
 }
+
+//获取考勤统计列表更多
+export function getMoreList(params) {
+	return request({
+		url: '/mobile/workAttendance/workAttendanceStatByCompanyId',
+		params: params,
+		method: 'get',
+	})
+}

+ 24 - 1
src/projects/business/views/Master/Attendance/StatisticList.vue

@@ -20,7 +20,9 @@
 								<span class="color55f868" v-show="iten.result" v-text="iten.result"></span>
 							</div>
 						</li>
-						<a class="vongi-lodtext">加载更多统计数据<span class="iconfont icon-xiajiantou_huaban"></span></a>
+						<li v-if="item.totalPage>1 && item.pageNumber<item.totalPage" class="mui-table-view-cell">
+							<a @click="loadMore(item.companyId,index)" class="vongi-lodtext">加载更多统计数据<span class="iconfont icon-xiajiantou_huaban"></span></a>
+						</li>
 					</ul>
 				</li>
 			</ul>
@@ -173,6 +175,27 @@
 					}
 				}
 			},
+			//加载更多
+			loadMore(companyId, index) {
+				this.isLoading = true;
+				this.recordList[index]['pageNumber']++;
+				let data = {
+					queryDate: this.subForm.queryDate,
+					alarmConfigId: this.subForm.alarmConfigId,
+					pageNum: this.recordList[index]['pageNumber'],
+					companyId: companyId,
+				};
+				API_Attendance.getMoreList(data).then(response => {
+					this.isLoading = false;
+
+					this.recordList[index]['personList'] = this.recordList[index]['personList'].concat(response['groupList'][0][
+						'personList'
+					])
+				}).catch(error => {
+					this.isLoading = false;
+					mui.toast(error);
+				})
+			},
 			asynCallBack() {
 
 			},