个人打卡记录以及人员查询多部门问题

This commit is contained in:
shijing 2023-03-16 11:16:20 +08:00
parent feab95bc8f
commit a1c2b81c71
3 changed files with 71 additions and 16 deletions

View File

@ -2,8 +2,8 @@
"name" : "曲阳金隅EHS", "name" : "曲阳金隅EHS",
"appid" : "__UNI__B00D419", "appid" : "__UNI__B00D419",
"description" : "曲阳金隅EHS", "description" : "曲阳金隅EHS",
"versionName" : "1.01.25", "versionName" : "1.01.27",
"versionCode" : 101025, "versionCode" : 101027,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -90,7 +90,7 @@ export default {
let showDepts = []; let showDepts = [];
let params = { let params = {
page: 0, page: 0,
belong_dept: dept.id, depts: dept.id,
is_active: true, is_active: true,
query: '{id, name, belong_dept}' query: '{id, name, belong_dept}'
}; };

View File

@ -16,10 +16,21 @@
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id"> <view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
<view class="clock_in_-item"> <view class="clock_in_-item">
<view class="center-info"> <view class="center-info">
<view class="info-details">触发模式{{val.detail.openTypeStr}}</view> <view class="info-details">
<view class="info-details">打卡类型<text v-if="val.type==10">上班打卡</text><text v-else>下班打卡</text></view> 触发设备
<view class="info-details">其他信息{{val.detail.deviceName}}</view> {{trigger_[val.trigger]}}
</view>
<view class="info-details">触发地点{{val.detail.deviceName}}</view>
<view class="info-details">打卡时间{{val.create_time}}</view> <view class="info-details">打卡时间{{val.create_time}}</view>
<view class="info-details">考勤推测
<text v-if="val.type==10" class="nomalState type01">上班打卡</text>
<text v-else-if="val.type==20" class="nomalState type02">下班打卡</text>
<span v-if="(val.type==10 || val.type==20)&&val.exception_type!==null">-</span>
<text v-if="val.exception_type==10" class="nomalState type1">在岗时间短</text>
<text v-else-if="val.exception_type==20" class="nomalState type2">在岗时间长</text>
<text v-else-if="val.exception_type==30" class="nomalState type3">缺卡</text>
<text v-else-if="val.exception_type==40" class="nomalState type4">加班</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -35,11 +46,16 @@
return { return {
params: { params: {
employee: '', employee: '',
pageSize: 10, page_size: 10,
pageNum: 1, page: 1,
month: '', month: '',
year:'' year:''
}, },
trigger_:{
"door": "门禁",
"location": "定位",
"panel":"面板机"
},
totalNum: 0, totalNum: 0,
activeIndex:true,// activeIndex:true,//
lists: [], lists: [],
@ -50,10 +66,10 @@
}, },
// //
onReachBottom() { onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.pageSize); const totalPage = Math.ceil(this.totalNum / this.params.page_size);
if (this.params.pageNum < totalPage) { if (this.params.page < totalPage) {
this.params.pageNum += 1; this.params.page += 1;
this.getLists();
} else { } else {
uni.showToast({ uni.showToast({
title: "已全部加载", title: "已全部加载",
@ -82,7 +98,7 @@
}, },
// //
onPullDownRefresh() { onPullDownRefresh() {
this.params.pageNum = 1; this.params.page = 1;
this.lists = []; this.lists = [];
this.getLists(); this.getLists();
}, },
@ -98,7 +114,7 @@
}else{ }else{
that.activeIndex=false; that.activeIndex=false;
} }
that.params.pageNum = 1; that.params.page = 1;
that.lists = []; that.lists = [];
that.getLists(); that.getLists();
}, },
@ -114,7 +130,7 @@
that.activeIndex = index; that.activeIndex = index;
that.params.month = that.currentMonth; that.params.month = that.currentMonth;
that.params.year = that.currentYear; that.params.year = that.currentYear;
that.params.pageNum = 1; that.params.page = 1;
that.lists = []; that.lists = [];
that.getLists(); that.getLists();
}, },
@ -180,5 +196,44 @@
line-height: 40rpx; line-height: 40rpx;
color: #5b5b5b; color: #5b5b5b;
} }
.nomalState {
font-size: 12px;
padding: 0 9px;
height: 24px;
line-height: 23px;
border-radius: 5px;
vertical-align: top;
display: inline-block;
}
.nomalState.type1{
color: #F8DD4E;
background-color: #f9f7e6;
border: 1px solid #f3f0d5;
}
.nomalState.type2{
color: #FF0000;
background-color: #f7e7e7;
border: 1px solid #fbe0e0;
}
.nomalState.type3{
color: #FA8435;
background-color: #fef6ed;
border: 1px solid #fde9cc;
}
.nomalState.type4{
color: #44CEF6;
background-color: #f0f9fb;
border: 1px solid #d2f9ff;
}
.nomalState.type01{
color: #536dfe;
background-color: #edf0fe;
border: 1px solid #dce1fe;
}
.nomalState.type02{
color: #67c23a;
background-color: #f0f9eb;
border: 1px solid #e1f3d8;
}
</style> </style>