114 lines
2.4 KiB
Vue
114 lines
2.4 KiB
Vue
<template>
|
|
<view class="fullHeight bgWhite">
|
|
<headers :showBack="true">
|
|
<view class="headerName">
|
|
人员列表
|
|
</view>
|
|
</headers>
|
|
<scroll-view scroll-y="true" class="pageContent">
|
|
<view class="personContent">
|
|
<view class="personItem" v-for="(item,index) in personList" :key="index" @click="searchPerson(item.id)">
|
|
<image v-if="item.fieldAcquisitionUrl" :src="url_config+'image/'+item.fieldAcquisitionUrl" class="profile_photo"></image>
|
|
<image v-else src="/static/profile_photo.png" class="profile_photo"></image>
|
|
<view class="personInfo">
|
|
<view class="name">
|
|
{{item.workerName}}
|
|
</view>
|
|
<view class="teamName">
|
|
{{item.teamName}}
|
|
</view>
|
|
<view class="small">
|
|
{{item.sex==2?'女':'男'}} {{item.age}}
|
|
</view>
|
|
</view>
|
|
<image src="/static/icon-right.png" class="icon-right"></image>
|
|
</view>
|
|
<view class="placeholderBox" v-show="personList.length==0">
|
|
<image src="/static/noData.png" class="noDataImg"></image>
|
|
<view class="text">
|
|
暂无数据
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import headers from "@/components/headers/headers.vue"
|
|
export default {
|
|
components:{headers},
|
|
data() {
|
|
return {
|
|
personList:[],
|
|
projectDetail:{},
|
|
workerName:'',
|
|
teamId:0
|
|
};
|
|
},
|
|
onLoad(options){
|
|
this.teamId=options.id
|
|
this.projectDetail=JSON.parse(uni.getStorageSync('projectDetail'))
|
|
this.loadData()
|
|
},
|
|
methods:{
|
|
loadData(){
|
|
var that = this
|
|
this.sendRequest({
|
|
url: 'xmgl/workerInfo/selectWorkerInfoList',
|
|
data: {teamId:this.teamId,projectSn:this.projectDetail.projectSn,pageNo:1,pageSize:100},
|
|
method: "POST",
|
|
success(res){
|
|
that.personList=res.result.records
|
|
}
|
|
})
|
|
},
|
|
searchPerson(id){
|
|
uni.navigateTo({
|
|
url:'./personDetail?id='+id
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.personContent{
|
|
padding: 15px;
|
|
}
|
|
.personItem{
|
|
display: flex;
|
|
align-items: center;
|
|
box-shadow: 0px 4px 13px 0px rgba(212, 220, 236, 0.53);
|
|
position: relative;
|
|
margin-bottom: 5px;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
// padding: 0 15px;
|
|
font-size: 15px;
|
|
.teamName{
|
|
font-size: 13px;
|
|
}
|
|
.small{
|
|
font-size: 12px;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
}
|
|
|
|
.profile_photo{
|
|
width: 50px;
|
|
height: 60px;
|
|
margin-right: 10px;
|
|
}
|
|
.icon-right{
|
|
position: absolute;
|
|
width: 8px;
|
|
height: 14px;
|
|
right: 15px;
|
|
top: calc(50% - 7px);
|
|
}
|
|
</style>
|