Просмотр исходного кода

refactor(checkIn):修改了checkIn页面的一些样式和功能

HMY 1 год назад
Родитель
Сommit
0c61a47bb2

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

@@ -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); // 错误处理
 		}

+ 6 - 0
pages/mine/index.vue

@@ -223,5 +223,11 @@
 
 	::v-deep .uni-input {
 		padding: 15rpx 8rpx;
+		text-decoration: underline; /* 给文字添加下划线 */
+		text-decoration-color: blue;
+	}
+	
+	::v-deep .uni-list-cell-db picker{
+		width: 100px;
 	}
 </style>

+ 31 - 11
static/font/ygoa/iconfont.css

@@ -2,9 +2,9 @@
   font-family: "ygoa-icon"; /* Project id 4740271 */
   /* Color fonts */
   src: 
-       url('iconfont.woff2?t=1731295948139') format('woff2'),
-       url('iconfont.woff?t=1731295948139') format('woff'),
-       url('iconfont.ttf?t=1731295948139') format('truetype');
+       url('iconfont.woff2?t=1731396840757') format('woff2'),
+       url('iconfont.woff?t=1731396840757') format('woff'),
+       url('iconfont.ttf?t=1731396840757') format('truetype');
 }
 
 .ygoa-icon {
@@ -15,6 +15,34 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-checkIn:before {
+  content: "\e60a";
+}
+
+.icon-clockIn:before {
+  content: "\f493";
+}
+
+.icon-businessTrip:before {
+  content: "\e6bc";
+}
+
+.icon-attendance:before {
+  content: "\e61c";
+}
+
+.icon-makeUp:before {
+  content: "\e607";
+}
+
+.icon-clockIn1:before {
+  content: "\e852";
+}
+
+.icon-leave:before {
+  content: "\e614";
+}
+
 .icon-afterWork:before {
   content: "\e61f";
 }
@@ -31,10 +59,6 @@
   content: "\e668";
 }
 
-.icon-clockIn:before {
-  content: "\e64d";
-}
-
 .icon-date:before {
   content: "\e647";
 }
@@ -59,10 +83,6 @@
   content: "\ee17";
 }
 
-.icon-checkIn:before {
-  content: "\100bc";
-}
-
 .icon-location:before {
   content: "\e619";
 }

BIN
static/font/ygoa/iconfont.ttf


BIN
static/font/ygoa/iconfont.woff


BIN
static/font/ygoa/iconfont.woff2