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

182 lines
4.2 KiB
Vue
Raw Normal View History

2022-01-13 11:13:06 +08:00
<template>
<div class="Organization">
<div class="title">网格人员</div>
2022-06-13 09:57:52 +08:00
<div class="user-content" v-for="(item, index) in dataInfo.parentGirdMembers" :key="item.id">
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-06-13 09:57:52 +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-06-13 09:57:52 +08:00
<div class="user-content user-item" v-for="(item, index) in dataInfo.girdMembers" :key="item.id" @click="viewUser(item.wxUserId)">
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-06-13 09:57:52 +08:00
<div class="name">{{ item.name }}
<span class="gird">{{ item.checkType == 2 ? '网格长' : '网格员' }}</span>
<span class="family-btn" @click.stop="linkTo(`./FamilyList?id=${item.id}&girdId=${userGird.id}`)" v-if="item.checkType == 1">责任家庭 ></span>
2022-01-13 11:13:06 +08:00
</div>
2022-06-13 09:57:52 +08:00
<p>{{ item.girdName }} </p>
2022-01-13 11:13:06 +08:00
</div>
</div>
2022-06-13 09:57:52 +08:00
<AiEmpty description="暂无数据" class="emptyWrap"
v-if="dataInfo.parentGirdMembers && !dataInfo.parentGirdMembers.length && !dataInfo.girdMembers.length"></AiEmpty>
<AiGap h="112"/>
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-06-13 09:57: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-06-13 09:57:52 +08:00
})
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})
2022-06-13 09:57:52 +08:00
},
viewUser(userid) {
userid && this.injectJWeixin('openUserProfile').then(() => {
this.wxInvoke(['openUserProfile', {type: 1, userid}, () => 0])
})
},
2022-01-13 11:13:06 +08:00
},
}
</script>
<style lang="scss" scoped>
.Organization {
2022-01-14 17:25:40 +08:00
background-color: #f5f5f5;
2022-06-13 09:57:52 +08:00
.title {
2022-01-13 11:13:06 +08:00
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 52px;
padding-left: 32px;
margin-bottom: 32px;
}
2022-06-13 09:57:52 +08:00
.user-content {
2022-01-13 11:13:06 +08:00
width: calc(100% - 64px);
margin: 0 0 32px 32px;
background-color: #fff;
padding: 32px;
box-sizing: border-box;
display: flex;
2022-06-13 09:57:52 +08:00
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
}
2022-06-13 09:57:52 +08:00
image {
2022-01-14 16:44:32 +08:00
width: 200px;
height: 200px;
margin-right: 32px;
2022-01-13 11:13:06 +08:00
}
2022-06-13 09:57:52 +08:00
.right {
2022-01-17 09:33:40 +08:00
width: 100%;
2022-06-13 09:57:52 +08:00
.name {
2022-01-13 11:13:06 +08:00
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
margin-bottom: 12px;
}
2022-06-13 09:57:52 +08:00
.gird {
2022-01-13 11:13:06 +08:00
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;
}
2022-06-13 09:57:52 +08:00
p {
2022-01-13 11:13:06 +08:00
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 36px;
}
}
}
2022-06-13 09:57:52 +08:00
.user-item {
img {
2022-01-13 11:13:06 +08:00
width: 96px;
height: 96px;
2022-01-14 16:36:43 +08:00
border-radius: 50%;
2022-01-13 11:13:06 +08:00
}
2022-06-13 09:57:52 +08:00
image {
2022-01-14 16:44:32 +08:00
width: 96px;
height: 96px;
border-radius: 50%;
}
2022-06-13 09:57:52 +08:00
.gird {
2022-01-13 11:13:06 +08:00
display: inline-block;
margin-left: 16px;
2022-06-13 09:57:52 +08:00
margin-bottom: 0 !important;
2022-01-13 11:13:06 +08:00
}
2022-06-13 09:57:52 +08:00
.name {
margin-bottom: 8px !important;
2022-01-13 11:13:06 +08:00
}
}
2022-06-13 09:57:52 +08:00
.family-btn {
2022-01-13 11:13:06 +08:00
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #3975C6;
line-height: 36px;
float: right;
}
2022-06-13 09:57:52 +08:00
.pad-b112 {
2022-01-14 10:56:52 +08:00
padding-bottom: 112px;
}
2022-01-13 11:13:06 +08:00
}
</style>