Files
dvcp_v2_wxcp_app/src/apps/AppGridManagement/Organization.vue

162 lines
4.0 KiB
Vue
Raw Normal View History

2022-01-13 11:13:06 +08:00
<template>
<div class="Organization">
<div class="title">网格人员</div>
2022-01-13 17:07:59 +08:00
<div class="user-content" v-for="(item, index) in dataInfo.parentGirdMembers" :key="index">
2022-01-25 13:45:26 +08:00
<div>
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
<img :src="item.photo" alt="" v-if="item.photo">
<img src="./components/img/big-user.png" alt="" v-else>
</div>
2022-01-13 11:13:06 +08:00
<div class="right">
2022-01-13 17:07:59 +08:00
<div class="name">{{item.name}}</div>
<div class="gird">{{item.checkType == 2 ? '网格长' : '网格员'}}</div>
<p>{{item.girdName}}</p>
2022-01-13 11:13:06 +08:00
</div>
</div>
2022-01-13 17:07:59 +08:00
<div class="user-content user-item" v-for="(item, index) in dataInfo.girdMembers" :key="index">
2022-01-25 13:45:26 +08:00
<div>
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
<img :src="item.photo" alt="" v-if="item.photo">
<img src="./components/img/big-user.png" alt="" v-else>
</div>
2022-01-13 11:13:06 +08:00
<div class="right">
2022-01-13 17:07:59 +08:00
<div class="name">{{item.name}}
<span class="gird">{{item.checkType == 2 ? '网格长' : '网格员'}}</span>
2022-01-20 13:57:19 +08:00
<span class="family-btn" @click="linkTo(`./FamilyList?id=${item.id}&girdId=${userGird.id}`)" v-if="item.checkType == 1">责任家庭 ></span>
2022-01-13 11:13:06 +08:00
</div>
2022-01-13 17:07:59 +08:00
<p>{{item.girdName}} </p>
2022-01-13 11:13:06 +08:00
</div>
</div>
2022-01-14 18:03:17 +08:00
<AiEmpty description="暂无数据" class="emptyWrap" v-if="dataInfo.parentGirdMembers && !dataInfo.parentGirdMembers.length && !dataInfo.girdMembers.length"></AiEmpty>
2022-01-14 10:56:52 +08:00
<div class="pad-b112"></div>
2022-01-13 11:13:06 +08:00
</div>
</template>
<script>
export default {
data() {
return {
2022-01-13 17:07:59 +08:00
userGird: {},
2022-01-14 10:56:52 +08:00
dataInfo: {},
2022-01-13 11:13:06 +08:00
}
},
2022-01-17 14:24:54 +08:00
props: ['params'],
2022-01-13 11:13:06 +08:00
onShow() {
document.title = '网格管理'
2022-01-14 10:56:52 +08:00
2022-01-13 11:13:06 +08:00
},
2022-01-13 14:41:10 +08:00
mounted() {
2022-01-17 14:24:54 +08:00
this.userGird = this.params
this.getGirdUserList()
2022-01-14 10:56:52 +08:00
uni.$on('goback', (res) => {
this.userGird = res
this.getGirdUserList()
})
2022-01-13 14:41:10 +08:00
},
2022-01-13 11:13:06 +08:00
methods: {
2022-01-13 17:07:59 +08:00
getGirdUserList() {
this.$http.post(`/app/appgirdmemberinfo/listGirdMemberByGirdId?girdId=${this.userGird.id}`).then((res) => {
if (res.code == 0) {
this.dataInfo = res.data
}
})
},
2022-01-13 11:13:06 +08:00
linkTo(url) {
uni.navigateTo({url})
}
},
}
</script>
<style lang="scss" scoped>
.Organization {
2022-01-14 17:25:40 +08:00
background-color: #f5f5f5;
2022-01-13 11:13:06 +08:00
.title{
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 52px;
padding-left: 32px;
margin-bottom: 32px;
}
.user-content{
width: calc(100% - 64px);
margin: 0 0 32px 32px;
background-color: #fff;
padding: 32px;
box-sizing: border-box;
display: flex;
img{
2022-01-25 13:45:26 +08:00
display: inline-block;
2022-01-13 11:13:06 +08:00
width: 200px;
height: 200px;
margin-right: 32px;
2022-01-14 16:44:32 +08:00
}
image{
width: 200px;
height: 200px;
margin-right: 32px;
2022-01-13 11:13:06 +08:00
}
.right{
2022-01-17 09:33:40 +08:00
width: 100%;
2022-01-13 11:13:06 +08:00
.name{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
margin-bottom: 12px;
}
.gird{
display: inline-block;
line-height: 44px;
background: #E8EFFF;
border-radius: 8px;
padding: 0 8px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #26F;
margin-bottom: 12px;
}
p{
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 36px;
}
}
}
.user-item{
img{
width: 96px;
height: 96px;
2022-01-14 16:36:43 +08:00
border-radius: 50%;
2022-01-13 11:13:06 +08:00
}
2022-01-14 16:44:32 +08:00
image{
width: 96px;
height: 96px;
border-radius: 50%;
}
2022-01-13 11:13:06 +08:00
.gird{
display: inline-block;
margin-left: 16px;
margin-bottom: 0!important;
}
.name{
margin-bottom: 8px!important;
}
}
.family-btn{
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #3975C6;
line-height: 36px;
float: right;
}
2022-01-14 10:56:52 +08:00
.pad-b112{
padding-bottom: 112px;
}
2022-01-13 11:13:06 +08:00
}
</style>