Browse Source

refactor(my_attendance): 优化考勤信息展示逻辑

-动态显示考勤状态、日期、校区名称和备注信息
- 增加签到和签退时间的显示逻辑
-优化地图样式
- 调整列表项样式,增加最小宽度和换行显示
master
liutong 10 months ago
parent
commit
285d1999cd
  1. 26
      pages/common/my_attendance.vue

26
pages/common/my_attendance.vue

@ -211,19 +211,26 @@
<view class="info_ul"> <view class="info_ul">
<view class="li"> <view class="li">
<view class="title">考勤状态</view> <view class="title">考勤状态</view>
<view class="content">请假</view> <view class="content">{{info_data.status_name}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">考勤日期</view> <view class="title">考勤日期</view>
<view class="content">请假</view> <view class="content">
<text style="padding: 0;">{{info_data.attendance_date}}</text>
<text v-if="info_data.status == 'present'">{{info_data.check_in_time}}</text>
<text v-if="info_data.status == 'present' && (info_data.check_out_time || '')">-</text>
<text v-if="info_data.status == 'present' && (info_data.check_out_time || '')">{{info_data.check_out_time || ''}}</text>
<text v-if="info_data.status == 'present' && !(info_data.check_out_time || '')">(未签退)</text>
</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">校区名称</view> <view class="title">校区名称</view>
<view class="content">请假</view> <view class="content">{{info_data.campus_id_name || ''}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">备注</view> <view class="title">备注</view>
<view class="content">请假</view> <view class="content">{{info_data.remarks || ''}}</view>
</view> </view>
<view class="map_section" v-if="info_data.id && info_data.latitude"> <view class="map_section" v-if="info_data.id && info_data.latitude">
<view class="title">地图</view> <view class="title">地图</view>
@ -915,10 +922,15 @@ export default {
gap: 20rpx; gap: 20rpx;
width: 100%; width: 100%;
.li{ .li{
border: 1px solid red;
display: flex; display: flex;
.title{ .title{
width: 130rpx; min-width: 140rpx;
}
.content{
word-break: break-all;
text{
padding:0 10rpx;
}
} }
} }
.map_section{ .map_section{
@ -928,8 +940,8 @@ export default {
width: 130rpx; width: 130rpx;
} }
.map{ .map{
border: 1px solid #8b8b8b;
margin-top: 10rpx; margin-top: 10rpx;
border: 1px solid red;
width: 100%; width: 100%;
} }
} }

Loading…
Cancel
Save