| | |
| | | size="16"></u-icon> |
| | | <text class="shift-text">白班: 09:00-18:00</text> |
| | | </view> |
| | | <!-- <view v-if="todayRecord?.checkInTime" |
| | | class="shift-item"> |
| | | <u-icon name="checkmark-circle" |
| | | color="#4cd964" |
| | | size="16"></u-icon> |
| | | <text class="shift-text">{{ todayRecord.checkInTime }}已打卡</text> |
| | | </view> --> |
| | | </view> |
| | | <!-- 打卡按钮 --> |
| | | <view class="checkin-button-container"> |
| | |
| | | return "下班打卡"; |
| | | } |
| | | return "已打卡"; |
| | | }); |
| | | |
| | | // 生成最近日期 |
| | | const recentDates = computed(() => { |
| | | const dates = []; |
| | | const today = new Date(); |
| | | |
| | | // 获取最近7天的日期 |
| | | for (let i = 6; i >= 0; i--) { |
| | | const date = new Date(today); |
| | | date.setDate(today.getDate() - i); |
| | | |
| | | const dateStr = `${date.getFullYear()}-${String( |
| | | date.getMonth() + 1 |
| | | ).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`; |
| | | const hasRecord = rawAttendance.value.some(item => item.date === dateStr); |
| | | |
| | | dates.push({ |
| | | date: dateStr, |
| | | day: date.getDate(), |
| | | isToday: i === 0, |
| | | hasRecord, |
| | | }); |
| | | } |
| | | |
| | | return dates; |
| | | }); |
| | | |
| | | // 导航到详细报告页面 |
| | |
| | | flex: 1; |
| | | } |
| | | |
| | | /* 日期选择器 */ |
| | | .date-picker { |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .weekday { |
| | | display: inline-block; |
| | | width: 44rpx; |
| | | text-align: center; |
| | | font-size: 12px; |
| | | color: $text-tertiary; |
| | | margin-bottom: 12rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .date-items { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .date-item { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 14px; |
| | | color: $text-secondary; |
| | | background-color: rgba($primary-color, 0.05); |
| | | transition: all 0.3s ease; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .date-item:hover { |
| | | background-color: rgba($primary-color, 0.1); |
| | | transform: scale(1.1); |
| | | } |
| | | |
| | | .date-item.active { |
| | | background-color: $primary-color; |
| | | color: #ffffff; |
| | | font-weight: 600; |
| | | box-shadow: 0 2rpx 8rpx rgba($primary-color, 0.3); |
| | | } |
| | | |
| | | .date-item.has-record { |
| | | position: relative; |
| | | } |
| | | |
| | | .date-item.has-record::after { |
| | | content: ""; |
| | | position: absolute; |
| | | bottom: 4rpx; |
| | | width: 8rpx; |
| | | height: 8rpx; |
| | | border-radius: 50%; |
| | | background-color: $success-color; |
| | | box-shadow: 0 1rpx 2rpx rgba($success-color, 0.3); |
| | | } |
| | | |
| | | /* 今日考勤状态 */ |
| | | .today-status { |
| | | display: flex; |
| | |
| | | |
| | | .checkin-time { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .weekday { |
| | | width: 38rpx; |
| | | } |
| | | |
| | | .date-item { |
| | | width: 38rpx; |
| | | height: 38rpx; |
| | | } |
| | | } |
| | | |