|
|
@@ -5,7 +5,7 @@
|
|
|
<text class="title">我的考勤记录</text>
|
|
|
<picker mode="selector" :range="timeRanges" @change="onTimeRangeChange">
|
|
|
<view class="picker">
|
|
|
- {{ selectedTimeRange }}
|
|
|
+ {{ selectedTimeRange }}/切换
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
@@ -15,23 +15,40 @@
|
|
|
<view class="statistic-card">
|
|
|
<view class="statistic-title">考勤统计</view>
|
|
|
<view class="statistic-item">
|
|
|
- <text class="label">出勤:</text>
|
|
|
+ <view>
|
|
|
+ <text class="ygoa-icon icon-attendance"></text>
|
|
|
+ <text class="label">出勤:</text>
|
|
|
+ </view>
|
|
|
<text class="value">{{ attendanceCount }}</text>
|
|
|
</view>
|
|
|
<view class="statistic-item">
|
|
|
- <text class="label">请假:</text>
|
|
|
+ <view>
|
|
|
+ <text class="ygoa-icon icon-leave"></text>
|
|
|
+ <text class="label">请假:</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
<text class="value">{{ leaveCount }}</text>
|
|
|
</view>
|
|
|
<view class="statistic-item">
|
|
|
- <text class="label">出差:</text>
|
|
|
+ <view>
|
|
|
+ <text class="ygoa-icon icon-businessTrip"></text>
|
|
|
+ <text class="label">出差:</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
<text class="value">{{ businessTripCount }}</text>
|
|
|
</view>
|
|
|
<view class="statistic-item">
|
|
|
- <text class="label">打卡:</text>
|
|
|
+ <view>
|
|
|
+ <text class="ygoa-icon icon-clockIn1"></text>
|
|
|
+ <text class="label">打卡:</text>
|
|
|
+ </view>
|
|
|
<text class="value">{{ clockInCount }}</text>
|
|
|
</view>
|
|
|
<view class="statistic-item">
|
|
|
- <text class="label">补卡:</text>
|
|
|
+ <view>
|
|
|
+ <text class="ygoa-icon icon-makeUp"></text>
|
|
|
+ <text class="label">补卡:</text>
|
|
|
+ </view>
|
|
|
<text class="value">{{ makeUpCount }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -267,11 +284,20 @@
|
|
|
|
|
|
// 更新统计数据
|
|
|
if (currentData1) {
|
|
|
- attendanceCount.value = currentData1.attendance;
|
|
|
- leaveCount.value = currentData1.leave;
|
|
|
- businessTripCount.value = currentData1.businessTrip;
|
|
|
- clockInCount.value = currentData1.clockIn;
|
|
|
- makeUpCount.value = currentData1.makeUp;
|
|
|
+ if('周'==selectedTimeRange.value){
|
|
|
+ const weekData=currentData1.res.series[0].data;
|
|
|
+ attendanceCount.value = weekData[0].value;
|
|
|
+ leaveCount.value = weekData[1].value;
|
|
|
+ businessTripCount.value = weekData[2].value;
|
|
|
+ clockInCount.value = weekData[3].value;
|
|
|
+ makeUpCount.value = weekData[4].value;
|
|
|
+ }else{
|
|
|
+ attendanceCount.value = currentData1.attendance;
|
|
|
+ leaveCount.value = currentData1.leave;
|
|
|
+ businessTripCount.value = currentData1.businessTrip;
|
|
|
+ clockInCount.value = currentData1.clockIn;
|
|
|
+ makeUpCount.value = currentData1.makeUp;
|
|
|
+ }
|
|
|
} else {
|
|
|
console.error('没有找到相关的考勤数据:', selectedTimeRange.value); // 错误处理
|
|
|
}
|