Browse Source

fix(checkIn):考勤页数据显示错误

HMY 1 year ago
parent
commit
c1aa8863d2
1 changed files with 11 additions and 12 deletions
  1. 11 12
      pages/mine/checkIn/checkIn.vue

+ 11 - 12
pages/mine/checkIn/checkIn.vue

@@ -44,7 +44,7 @@
 			<view class="divider"></view>
 
 			<!-- 打卡记录 -->
-			<!-- <view class="container">
+			<view class="container">
 				<view class="header">
 					<text class="clockRecordTitle">打卡记录</text>
 				</view>
@@ -65,17 +65,17 @@
 						</view>
 					</z-paging>
 				</view>
-			</view> -->
+			</view>
 
 			<!-- 日历板块 -->
-			<template>
+			<!-- <template>
 				<view class="calendar-content" >
 					<view>
 						<uni-calendar class="uni-calendar--hook" :selected="calenderData" :showMonth="true" @change="change"
 							@monthSwitch="monthSwitch" />
 					</view>
 				</view>
-			</template>
+			</template> -->
 		</view>
 
 
@@ -486,14 +486,13 @@
 							}
 						]
 					}],
-
 				};
-				const weekData = mockData.series[0].data;
-				attendanceCount.value = weekData[0].value;
-				goOutCount.value = weekData[2].value;
-				lateCount.value = weekData[4].value;
-				leaveEarlyCount.value = weekData[5].value;
-				absenteeismCount.value = weekData[6].value;
+				// const weekData = mockData.series[0].data;
+				attendanceCount.value = myWeekAttData.type1;
+				goOutCount.value = myWeekAttData.type1;
+				lateCount.value = myWeekAttData.type4;
+				leaveEarlyCount.value = myWeekAttData.type5;
+				absenteeismCount.value = myWeekAttData.type6;
 				resolve(mockData)
 			}).catch(error => {
 				reject(error)
@@ -505,7 +504,7 @@
 	// 获取月考勤记录
 	function fetchMonthAttData() {
 		return new Promise((resolve, reject) => {
-			const weekNodeList = [];
+			const weekNodeList = [];// 存储近月每周的周一,周天日期
 			weekNodeList.unshift(thisMondayDate.value, todayData.day);
 			while (weekNodeList.length !== 8) {
 				const weekNode = getOneDaysAgo(weekNodeList[0]);