|
@@ -2,31 +2,56 @@
|
|
|
<view>
|
|
|
<back :text="'今日打卡'"></back>
|
|
|
|
|
|
- <view class="card">
|
|
|
- <view class="calendar_container">
|
|
|
- <zsyCalendar :sundayIndex="6" @change="dateHandler" />
|
|
|
+ <view class="card-box">
|
|
|
+
|
|
|
+ <view class="card-item">
|
|
|
+ <view class="total">
|
|
|
+ <view class="total-title">本月汇总</view>
|
|
|
+ <view class="total-content">
|
|
|
+ <view class="number-box">
|
|
|
+ <view class="number">15</view>
|
|
|
+ <view class="number-detail">打卡次数</view>
|
|
|
+ </view>
|
|
|
+ <view class="number-box">
|
|
|
+ <view class="number">2</view>
|
|
|
+ <view class="number-detail">迟到次数</view>
|
|
|
+ </view>
|
|
|
+ <view class="number-box">
|
|
|
+ <view class="number">优秀</view>
|
|
|
+ <view class="number-detail">本月出勤质量</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="state-box">
|
|
|
- <view class="state">
|
|
|
- <view class="state-text">{{attendance}}</view>
|
|
|
+
|
|
|
+ <view class="card-item">
|
|
|
+ <view class="calendar_container">
|
|
|
+ <zsyCalendar :sundayIndex="6" @change="dateHandler"/>
|
|
|
</view>
|
|
|
- <view class="msg-box">
|
|
|
- <view class="flex">
|
|
|
- <text class="msg-text" style="font-weight: normal;font-size: 28rpx;">打卡时间:</text>
|
|
|
- <text class="msg-text">{{attendanceTime}}</text>
|
|
|
+ <view class="state-box">
|
|
|
+ <view class="state">
|
|
|
+ <view class="state-text">{{attendance}}</view>
|
|
|
</view>
|
|
|
- <view class="flex">
|
|
|
- <text class="msg-text" style="font-weight: normal;font-size: 28rpx;">本周出勤质量:</text>
|
|
|
- <text class="msg-text">{{attendanceQuality}}</text>
|
|
|
+ <view class="msg-box">
|
|
|
+ <view class="flex">
|
|
|
+ <text class="msg-text" style="font-weight: normal;font-size: 28rpx;">打卡时间:</text>
|
|
|
+ <text class="msg-text">{{attendanceTime}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex">
|
|
|
+ <text class="msg-text" style="font-weight: normal;font-size: 28rpx;">本周出勤质量:</text>
|
|
|
+ <text class="msg-text">{{attendanceQuality}}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import getdata from '../../common/data.js'
|
|
|
import zsyCalendar from '@/subpkg/zsy-calendar/zsy-calendar.vue'
|
|
|
export default {
|
|
|
name: 'Calendar',
|
|
@@ -35,6 +60,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ //当日打卡信息
|
|
|
attendance: '',
|
|
|
attendanceTime: '',
|
|
|
attendanceQuality: ''
|
|
@@ -55,62 +81,108 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .card {
|
|
|
- margin: 14rpx 20rpx;
|
|
|
+ .card-box {
|
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- background-color: #FFF;
|
|
|
- border-radius: $card-border-radius;
|
|
|
+ flex-flow: column wrap;
|
|
|
+ margin: 0 20rpx 0 20rpx;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- //日历组件
|
|
|
- .calendar_container {
|
|
|
- height: 100%;
|
|
|
+ .card-item {
|
|
|
+ margin: 2% 0;
|
|
|
width: 100%;
|
|
|
+ height: auto;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-around;
|
|
|
background-color: #FFF;
|
|
|
- margin: 0 20rpx;
|
|
|
- box-sizing: border-box;
|
|
|
border-radius: $card-border-radius;
|
|
|
+
|
|
|
+ //日历组件
|
|
|
+ .calendar_container {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ background-color: #FFF;
|
|
|
+ margin: 0 auto;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: $card-border-radius;
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .state-box {
|
|
|
+ .total {
|
|
|
+ height: 250rpx;
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .total-title {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #2C2C2C;
|
|
|
+ margin: 30rpx 30rpx 0rpx 30rpx;
|
|
|
+ }
|
|
|
+ .total-content{
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- height: 200rpx;
|
|
|
- width: 100%;
|
|
|
-
|
|
|
- .state {
|
|
|
+ justify-content: space-around;
|
|
|
+ height: 175rpx;
|
|
|
+ .number-box{
|
|
|
display: flex;
|
|
|
+ flex-direction: column;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin: 20rpx;
|
|
|
- border-radius: 100%;
|
|
|
- height: 130rpx;
|
|
|
- width: 130rpx;
|
|
|
- background-color: #3C9CFF;
|
|
|
-
|
|
|
- .state-text {
|
|
|
- font-size: 28rpx;
|
|
|
+ .number{
|
|
|
+ font-size: 46rpx;
|
|
|
font-weight: bold;
|
|
|
- color: #FFF;
|
|
|
+ color: #2C2C2C;
|
|
|
}
|
|
|
- }
|
|
|
- .msg-box{
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-around;
|
|
|
- height: 150rpx;
|
|
|
- width: auto;
|
|
|
- .msg-text{
|
|
|
- color: $color-title;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 36rpx;
|
|
|
- margin-left: 20rpx;
|
|
|
+ .number-detail{
|
|
|
+ margin-top: 10rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #afafaf;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .state-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 200rpx;
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .state {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 20rpx;
|
|
|
+ border-radius: 100%;
|
|
|
+ height: 130rpx;
|
|
|
+ width: 130rpx;
|
|
|
+ background-color: #3C9CFF;
|
|
|
+
|
|
|
+ .state-text {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #FFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .msg-box {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-around;
|
|
|
+ height: 150rpx;
|
|
|
+ width: auto;
|
|
|
+
|
|
|
+ .msg-text {
|
|
|
+ color: #2C2C2C;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 36rpx;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- .flex{
|
|
|
+
|
|
|
+ .flex {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|