547 lines
13 KiB
Vue
547 lines
13 KiB
Vue
<template>
|
|
<view class="page">
|
|
<!-- <view class="card" v-for="item in list" :key="item.id" @click="navTo('/subpkg/archives/archives?id='+item.id)">
|
|
<view class="top">
|
|
<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>
|
|
<view class="text">
|
|
<view class="name">{{item.nickname}}</view>
|
|
<view class="mobile">
|
|
<uni-icons type="phone" color="#999999FF"></uni-icons>联系方式-<text>{{item.account}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bottom">
|
|
<view class="left">
|
|
<view class="circle"></view>
|
|
<view class="green">片区</view>
|
|
<view class="b_l_text">{{item.area_name+item.street_name}}</view>
|
|
</view>
|
|
<view class="right">{{'管理户数: '+item.informationg_count+" 户"}}</view>
|
|
</view>
|
|
</view>
|
|
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> -->
|
|
<view class="personnel_list">
|
|
<view class="card" v-for="(item, index) in list" :key="item.id"
|
|
@click="navTo(`/subpkg/archives/archives?id=${item.id}&task_id=${task_id}`)">
|
|
<view class="card_head">
|
|
<text style="font-size: 34rpx;">最后更新: {{item.informationg_update_time.split(' ')[0]}}</text>
|
|
<view v-if="task_id<=0">{{'管理户数: '+item.informationg_count+" 户"}}<u-icon
|
|
style="display: inline-block;margin-left: 10rpx;" color="white"
|
|
name="arrow-right"></u-icon></view>
|
|
<view v-else>{{'累计更新: '+item.informationg_update_count+" 户"}}<u-icon
|
|
style="display: inline-block;margin-left: 10rpx;" color="white"
|
|
name="arrow-right"></u-icon></view>
|
|
</view>
|
|
<view class="card_content">
|
|
<view class="left">
|
|
<view class="cir">
|
|
<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>
|
|
</view>
|
|
|
|
<view style="margin-top: 40rpx;">
|
|
<u-icon style="display: inline-block;" color="white" name="edit-pen-fill"></u-icon>
|
|
{{item.is_contract?"已签约":"未签约"}}
|
|
</view>
|
|
</view>
|
|
<view class="right">
|
|
<view class="">
|
|
<text>公司名称 :</text>
|
|
<text> {{item.company.company_name}}</text>
|
|
</view>
|
|
<view class="">
|
|
<text>人员姓名 :</text>
|
|
<text>{{item.nickname}}</text>
|
|
</view>
|
|
<view class="">
|
|
<text>联系电话 :</text>
|
|
<text>{{item.phone||item.account}}</text>
|
|
</view>
|
|
<view class="">
|
|
<text>负责区域 :</text>
|
|
<text>{{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <block v-for="(item, index) in list" :key="item.id">
|
|
<view class="personnel_item" @click="navTo('/subpkg/archives/archives?id='+item.id)">
|
|
<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>
|
|
</view>
|
|
<view class="top" style="margin-bottom: 28rpx;">
|
|
<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>
|
|
</view>
|
|
<view class="right">
|
|
<view class="info_top">
|
|
<view class="info_name">{{item.nickname}}</view>
|
|
<text class="phone">电话:</text>
|
|
<text class="tel">{{item.phone||item.account}}</text>
|
|
</view>
|
|
<view class="info_bottom">
|
|
<text class="item phone">
|
|
分管片区:
|
|
</text>
|
|
<view class="item">
|
|
<view class="location">
|
|
<text>{{ (item.street_name||'')+(item.village_name||'')+(item.brigade_name||'') }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="info_bottom">
|
|
<text class="item phone">
|
|
所属公司:
|
|
</text>
|
|
<view class="item" v-if="item.company">
|
|
<view class="location">
|
|
{{item.company.company_name}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-line color="#999999FF"></u-line>
|
|
<view class="bottom" style="margin-top: 28rpx;float: right;">
|
|
<view class="look">{{'管理户数: '+item.informationg_count+" 户"}}</view>
|
|
</view>
|
|
</view>
|
|
</block> -->
|
|
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" icon="/static/img/empty/data.png"></u-empty>
|
|
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
|
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
companyUser
|
|
} from "@/api/company.js"
|
|
import {
|
|
Toast
|
|
} from '@/libs/uniApi.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
list: [],
|
|
loadConfig: {
|
|
page: 1,
|
|
limit: 15,
|
|
lastpage: '',
|
|
loadingText: '努力加载中',
|
|
loadmoreText: '轻轻上拉',
|
|
nomoreText: '我也是有底线的~~',
|
|
status: 'loadmore'
|
|
},
|
|
task_id: -1
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
if(options.task_id){
|
|
this.task_id = options.task_id;
|
|
uni.setNavigationBarTitle({
|
|
title:'任务:队长列表'
|
|
})
|
|
}
|
|
this.initLoad()
|
|
},
|
|
onShow() {},
|
|
onReachBottom() {
|
|
this.loadList();
|
|
},
|
|
methods: {
|
|
navTo(url) {
|
|
if(url){
|
|
uni.showLoading({
|
|
title: '加载中',
|
|
mask: true
|
|
});
|
|
uni.navigateTo({
|
|
url: url,
|
|
success() {
|
|
uni.hideLoading()
|
|
}
|
|
})
|
|
}else Toast('暂未开放')
|
|
},
|
|
initLoad() {
|
|
this.loadConfig.page = 1;
|
|
this.loadConfig.status = "loadmore";
|
|
this.list = [];
|
|
this.loadList();
|
|
uni.stopPullDownRefresh();
|
|
},
|
|
async loadList() {
|
|
if (this.loadConfig.status == "nomore") return;
|
|
this.loadConfig.status = "loading";
|
|
let queryPramas = {
|
|
page: this.loadConfig.page,
|
|
limit: this.loadConfig.limit,
|
|
company_id: this.$store.state.app.userInfo.company_id,
|
|
is_captain: 1,
|
|
};
|
|
this.task_id>0?queryPramas.task_id=this.task_id:null;
|
|
let res = await companyUser(queryPramas)
|
|
this.loadConfig.status = "loadmore"
|
|
if (res.data.data.length < this.loadConfig.limit) {
|
|
this.loadConfig.status = "nomore"
|
|
} else {
|
|
this.loadConfig.page++;
|
|
}
|
|
this.list = [...this.list, ...res.data.data];
|
|
},
|
|
},
|
|
onPullDownRefresh() {
|
|
this.initLoad();
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.page {
|
|
padding-top: 28rpx;
|
|
}
|
|
|
|
.card {
|
|
margin: 0 auto;
|
|
margin-bottom: 28rpx;
|
|
width: 694rpx;
|
|
background: #FFFFFF;
|
|
border-radius: 30rpx;
|
|
opacity: 1;
|
|
overflow: hidden;
|
|
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
|
|
|
.card_head {
|
|
padding: 28rpx;
|
|
background-color: $theme-oa-color;
|
|
color: white;
|
|
height: 100rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.card_content {
|
|
padding: 28rpx;
|
|
display: flex;
|
|
|
|
.left {
|
|
text-align: center;
|
|
// padding: 15rpx 25rpx;
|
|
// padding-top: 20rpx;
|
|
padding: 20rpx 20rpx 10px 0;
|
|
margin-right: 20rpx;
|
|
width: 170rpx;
|
|
background-color: $theme-oa-color;
|
|
color: white;
|
|
border-radius: 40rpx;
|
|
|
|
.cir {
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
background-color: #ffffff;
|
|
margin-left: 25rpx;
|
|
border-radius: 120rpx;
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
.right {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
|
|
view {
|
|
text:nth-child(2) {
|
|
margin-left: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// .top {
|
|
// display: flex;
|
|
// justify-content: left;
|
|
// // align-items: center;
|
|
|
|
// .avatar {
|
|
// width: 88rpx;
|
|
// height: 88rpx;
|
|
// border-radius: 50%;
|
|
// margin-right: 18rpx;
|
|
// }
|
|
|
|
.u_avatar {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
// .text {
|
|
// display: flex;
|
|
// justify-content: space-around;
|
|
// flex-direction: column;
|
|
|
|
// .name {
|
|
// font-size: 32rpx;
|
|
// font-weight: 500;
|
|
// color: #333333;
|
|
// }
|
|
|
|
// .mobile {
|
|
// color: #999999;
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
// .bottom {
|
|
// display: flex;
|
|
// justify-content: space-between;
|
|
// font-size: 25rpx;
|
|
// font-weight: 400;
|
|
|
|
// .left {
|
|
// display: flex;
|
|
// justify-content: left;
|
|
// align-items: center;
|
|
// margin-top: 20rpx;
|
|
|
|
// .circle {
|
|
// width: 11rpx;
|
|
// height: 11rpx;
|
|
// opacity: 1;
|
|
// border: 2rpx solid #34A853;
|
|
// margin-right: 10rpx;
|
|
// border-radius: 50%;
|
|
// }
|
|
|
|
// .green {
|
|
// font-weight: 400;
|
|
// color: #34A853;
|
|
// line-height: 0rpx;
|
|
// margin-right: 18rpx;
|
|
// -webkit-background-clip: text;
|
|
// }
|
|
|
|
// .b_l_text {
|
|
// width: 360rpx;
|
|
// overflow: hidden;
|
|
// text-overflow: ellipsis;
|
|
// white-space: nowrap;
|
|
// }
|
|
// }
|
|
|
|
// .right {
|
|
// color: #3274F9;
|
|
// margin-top: 20rpx;
|
|
// }
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
// .personnel_list {
|
|
// display: flex;
|
|
// flex-direction: column;
|
|
// align-items: center;
|
|
// padding-bottom: 130rpx;
|
|
|
|
// .personnel_item {
|
|
// width: 694rpx;
|
|
// // height: 407rpx;
|
|
// background: #FFFFFF;
|
|
// border-radius: 14rpx 14rpx 14rpx 14rpx;
|
|
// margin-bottom: 32rpx;
|
|
// overflow: hidden;
|
|
// position: relative;
|
|
// padding: 28rpx;
|
|
|
|
// .type {
|
|
// width: 50rpx;
|
|
// height: 50rpx;
|
|
// background-color: #F02828;
|
|
// border-radius: 50%;
|
|
// font-size: 25rpx;
|
|
// font-weight: 400;
|
|
// color: #FFFFFF;
|
|
// line-height: 35rpx;
|
|
// display: flex;
|
|
// justify-content: center;
|
|
// align-items: center;
|
|
// position: absolute;
|
|
// top: 28rpx;
|
|
// right: 28rpx;
|
|
|
|
// image {
|
|
// width: 18rpx;
|
|
// height: 18rpx;
|
|
// margin-right: 1rpx;
|
|
// }
|
|
// }
|
|
|
|
// .type_blue {
|
|
// background-color: #34A853;
|
|
// }
|
|
|
|
// .top {
|
|
// // background-color: #3274F9;
|
|
// display: flex;
|
|
|
|
// .right {
|
|
// display: flex;
|
|
// flex-direction: column;
|
|
// justify-content: space-around;
|
|
// margin-left: 28rpx;
|
|
// font-size: 25rpx;
|
|
// font-weight: 400;
|
|
// overflow: hidden;
|
|
// color: #999999;
|
|
|
|
// .info_top {
|
|
// display: flex;
|
|
// align-items: flex-end;
|
|
// font-size: 25rpx;
|
|
// font-weight: 400;
|
|
// color: $theme-oa-color;
|
|
// margin-bottom: 10rpx;
|
|
|
|
// .info_name {
|
|
// font-size: 32rpx;
|
|
// font-weight: 400;
|
|
// color: #333333;
|
|
// margin-right: 18rpx;
|
|
// }
|
|
|
|
// .phone {
|
|
// margin-left: 30rpx;
|
|
// color: #999999;
|
|
// }
|
|
|
|
// .tel {
|
|
// color: #000;
|
|
// }
|
|
// }
|
|
|
|
// .info_bottom {
|
|
// display: flex;
|
|
// margin-bottom: 8rpx;
|
|
|
|
// .item {
|
|
// display: flex;
|
|
// align-items: flex-start;
|
|
// }
|
|
|
|
// .phone {
|
|
// margin-right: 28rpx;
|
|
// }
|
|
|
|
// .location {
|
|
// width: 320rpx;
|
|
// // white-space: nowrap;
|
|
// // /* 不换行 */
|
|
// // overflow: hidden;
|
|
// // /* 将超出文本隐藏 */
|
|
// // text-overflow: ellipsis;
|
|
// // /* 使用省略号表示被隐藏的文本 */
|
|
// color: #000;
|
|
// }
|
|
// }
|
|
|
|
// .company {
|
|
// display: flex;
|
|
|
|
// text {
|
|
// margin-right: 30rpx;
|
|
// flex-shrink: 0;
|
|
// }
|
|
|
|
// .itm {
|
|
// width: 320rpx;
|
|
// // white-space: nowrap;
|
|
// // /* 不换行 */
|
|
// // overflow: hidden;
|
|
// // /* 将超出文本隐藏 */
|
|
// // text-overflow: ellipsis;
|
|
// // /* 使用省略号表示被隐藏的文本 */
|
|
// color: #000;
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
// .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: center;
|
|
|
|
// .look {
|
|
// height: 43rpx;
|
|
// background: #FFFFFF;
|
|
// border-radius: 26rpx 26rpx 26rpx 26rpx;
|
|
// opacity: 1;
|
|
// // border: 2rpx solid $theme-oa-color;
|
|
// font-size: 28rpx;
|
|
// font-weight: 400;
|
|
// margin-left: 28rpx;
|
|
// color: $theme-oa-color;
|
|
// display: flex;
|
|
// justify-content: center;
|
|
// align-items: center;
|
|
// }
|
|
|
|
// .sign {
|
|
// color: #34A853;
|
|
// // border: 2rpx solid #34A853;
|
|
// }
|
|
|
|
// .red {
|
|
// color: #F02828;
|
|
// // border: 2rpx solid #F02828;
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
</style> |