2023-07-19 11:58:18 +08:00
|
|
|
<template>
|
|
|
|
<view class="personnel">
|
2023-07-21 16:05:49 +08:00
|
|
|
<!-- <button class="new_btn">创建</button> -->
|
|
|
|
<view class="personnel_list">
|
2023-07-22 14:41:42 +08:00
|
|
|
<block v-for="(item, index) in userList" :key="item.id">
|
|
|
|
<view class="personnel_item">
|
|
|
|
<view class="type" :class="item.is_contract?'type_blue':''">
|
|
|
|
<image v-if="item.is_contract" src="../../static/icons/ok_w.png"></image>
|
|
|
|
<image v-else src="../../static/icons/err_w.png"></image>
|
|
|
|
<text>{{item.is_contract?'已签约':'未签约'}}</text>
|
2023-07-21 16:50:34 +08:00
|
|
|
</view>
|
2023-07-22 14:41:42 +08:00
|
|
|
<view class="top">
|
|
|
|
<view class="left">
|
|
|
|
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'" width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
|
2023-07-21 16:50:34 +08:00
|
|
|
</view>
|
2023-07-22 14:41:42 +08:00
|
|
|
<view class="right">
|
|
|
|
<view class="info_top">
|
|
|
|
<view class="info_name">{{item.name}}</view>
|
|
|
|
<view>{{item.company}}</view>
|
2023-07-21 16:50:34 +08:00
|
|
|
</view>
|
2023-07-22 14:41:42 +08:00
|
|
|
<view class="info_bottom">
|
|
|
|
<view class="item phone">
|
|
|
|
<uni-icons type="phone" color="#999999FF"></uni-icons>
|
|
|
|
{{item.phone}}
|
|
|
|
</view>
|
|
|
|
<view class="item">
|
|
|
|
<uni-icons type="location" color="#999999FF"></uni-icons>
|
|
|
|
<view class="location">{{item.city_name+item.area_name+item.street_name}}</view>
|
|
|
|
</view>
|
2023-07-21 16:50:34 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2023-07-22 14:41:42 +08:00
|
|
|
<view class="center">
|
|
|
|
<view class="top" v-for="(role, roleIndex) in item.roles" :key="roleIndex">
|
|
|
|
{{role}}
|
|
|
|
<!-- <text class="green">管理人</text> -->
|
|
|
|
</view>
|
|
|
|
<view class="bottom">
|
2023-07-24 16:07:55 +08:00
|
|
|
<view><image :src="item.qualification&&item.qualification.id_card?'../../static/icons/ok.png':'../../static/icons/err.png'"></image>身份证</view>
|
|
|
|
<view><image :src="item.qualification&&item.qualification.car_card?'../../static/icons/ok.png':'../../static/icons/err.png'"></image>驾驶证</view>
|
|
|
|
<view><image :src="item.qualification&&item.qualification.bank_account?'../../static/icons/ok.png':'../../static/icons/err.png'"></image>银行卡</view>
|
2023-07-22 14:41:42 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<u-line color="#999999FF"></u-line>
|
|
|
|
<view class="bottom" style="margin-top: 28rpx;">
|
|
|
|
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">查看</button>
|
2023-07-21 16:50:34 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2023-07-22 14:41:42 +08:00
|
|
|
</block>
|
2023-07-22 15:16:06 +08:00
|
|
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
2023-07-19 11:58:18 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-07-22 10:13:49 +08:00
|
|
|
import { Toast } from '@/libs/uniApi.js'
|
2023-07-22 14:41:42 +08:00
|
|
|
import {companyUser} from "@/api/company.js"
|
2023-07-19 11:58:18 +08:00
|
|
|
export default {
|
|
|
|
onReady() {
|
|
|
|
uni.setNavigationBarColor({
|
|
|
|
frontColor: '#ffffff',
|
|
|
|
backgroundColor: '#3175f9'
|
|
|
|
})
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2023-07-22 15:16:06 +08:00
|
|
|
loadConfig:{
|
|
|
|
page: 1,
|
|
|
|
limit: 15,
|
|
|
|
loadingText: '努力加载中',
|
|
|
|
loadmoreText: '轻轻上拉',
|
|
|
|
nomoreText: '我也是有底线的~~',
|
|
|
|
status: 'loadmore'
|
|
|
|
},
|
2023-07-22 14:41:42 +08:00
|
|
|
userList: []
|
2023-07-19 11:58:18 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {},
|
2023-07-22 14:41:42 +08:00
|
|
|
onShow() {
|
|
|
|
this.loadUserList()
|
|
|
|
},
|
2023-07-22 10:13:49 +08:00
|
|
|
methods: {
|
|
|
|
navTo(url) {
|
|
|
|
url ?
|
|
|
|
uni.navigateTo({
|
|
|
|
url: url,
|
|
|
|
}) : Toast('暂未开放')
|
|
|
|
},
|
2023-07-22 15:16:06 +08:00
|
|
|
async loadUserList(){
|
2023-07-22 14:41:42 +08:00
|
|
|
let that = this;
|
2023-07-22 15:16:06 +08:00
|
|
|
if(this.loadConfig.status=="nomore")return;
|
|
|
|
this.loadConfig.status="loading"
|
|
|
|
let res = await companyUser({
|
|
|
|
page: this.loadConfig.page,
|
|
|
|
limit: this.loadConfig.limit
|
2023-07-22 14:41:42 +08:00
|
|
|
})
|
2023-07-22 15:16:06 +08:00
|
|
|
this.loadConfig.status="loadmore"
|
|
|
|
if(res.data.data.length<this.loadConfig.limit){
|
|
|
|
this.loadConfig.status="nomore"
|
|
|
|
}else {
|
|
|
|
this.loadConfig.page++;
|
|
|
|
}
|
|
|
|
this.userList = [...this.userList, ...res.data?.data]
|
2023-07-22 14:41:42 +08:00
|
|
|
}
|
2023-07-22 10:13:49 +08:00
|
|
|
},
|
2023-07-19 11:58:18 +08:00
|
|
|
onPullDownRefresh() {
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.personnel{
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
.new_btn{
|
|
|
|
margin-top: 32rpx;
|
|
|
|
margin-bottom: 40rpx;
|
|
|
|
width: 694rpx;
|
|
|
|
height: 84rpx;
|
|
|
|
background: #3274F9;
|
|
|
|
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
|
|
|
color: #fff;
|
|
|
|
line-height: 80rpx;
|
|
|
|
text-align: center;
|
|
|
|
}
|
2023-07-21 16:05:49 +08:00
|
|
|
.personnel_list{
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
padding-top: 32rpx;
|
|
|
|
.personnel_item{
|
|
|
|
width: 694rpx;
|
2023-07-21 16:50:34 +08:00
|
|
|
// height: 407rpx;
|
2023-07-21 16:05:49 +08:00
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
|
|
|
margin-bottom: 32rpx;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
2023-07-21 16:50:34 +08:00
|
|
|
padding: 28rpx;
|
2023-07-21 16:05:49 +08:00
|
|
|
.type{
|
|
|
|
width: 137rpx;
|
|
|
|
height: 53rpx;
|
|
|
|
background-color: #F02828;
|
|
|
|
border-radius: 0rpx 14rpx 0rpx 14rpx;
|
|
|
|
font-size: 25rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #FFFFFF;
|
|
|
|
line-height: 35rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
image{
|
|
|
|
width: 18rpx;
|
|
|
|
height: 18rpx;
|
|
|
|
margin-right: 9rpx;
|
|
|
|
}
|
|
|
|
}
|
2023-07-21 16:50:34 +08:00
|
|
|
.type_blue{
|
|
|
|
background-color: #3274f9;
|
|
|
|
}
|
2023-07-21 16:05:49 +08:00
|
|
|
.top{
|
|
|
|
// background-color: #3274F9;
|
2023-07-21 16:50:34 +08:00
|
|
|
display: flex;
|
|
|
|
.right{
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-around;
|
|
|
|
margin-left: 28rpx;
|
|
|
|
font-size: 25rpx;
|
|
|
|
font-weight: 400;
|
2023-07-22 14:41:42 +08:00
|
|
|
overflow: hidden;
|
2023-07-21 16:50:34 +08:00
|
|
|
color: #999999;
|
|
|
|
.info_top{
|
|
|
|
display: flex;
|
|
|
|
align-items: flex-end;
|
|
|
|
font-size: 25rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #3274F9;
|
|
|
|
.info_name{
|
|
|
|
font-size: 32rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #333333;
|
|
|
|
margin-right: 18rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.info_bottom{
|
|
|
|
display: flex;
|
|
|
|
.item{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
.phone{
|
|
|
|
margin-right: 28rpx;
|
|
|
|
}
|
|
|
|
.location{
|
2023-07-22 14:41:42 +08:00
|
|
|
width: 250rpx;
|
2023-07-21 16:50:34 +08:00
|
|
|
white-space: nowrap; /* 不换行 */
|
|
|
|
overflow: hidden; /* 将超出文本隐藏 */
|
|
|
|
text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.center{
|
|
|
|
padding: 28rpx 0;
|
|
|
|
.top{
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #666666FF;
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
.green{
|
|
|
|
color: #34A853FF;
|
|
|
|
}
|
|
|
|
.yellow{
|
|
|
|
color: #F9AA32FF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bottom{
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-around;
|
|
|
|
font-size: 25rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #999999;
|
|
|
|
image{
|
|
|
|
width: 18rpx;
|
|
|
|
height: 18rpx;
|
|
|
|
margin-right: 9rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bottom{
|
|
|
|
display: flex;
|
|
|
|
justify-content: right;
|
|
|
|
.look{
|
|
|
|
width: 158rpx;
|
|
|
|
height: 53rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 26rpx 26rpx 26rpx 26rpx;
|
|
|
|
opacity: 1;
|
|
|
|
border: 2rpx solid #3274F9;
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #3274F9;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2023-07-19 11:58:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-21 16:05:49 +08:00
|
|
|
|
2023-07-19 11:58:18 +08:00
|
|
|
}
|
|
|
|
</style>
|