2022-01-13 11:13:06 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="FamilyList">
|
2022-01-14 13:57:47 +08:00
|
|
|
<div class="title">户主列表</div>
|
2022-01-14 16:23:53 +08:00
|
|
|
<div class="main" v-if="list.length">
|
2022-01-14 13:57:47 +08:00
|
|
|
<ul v-for="item in list" :key="item.id">
|
|
|
|
|
<li>
|
|
|
|
|
<div class="user">
|
|
|
|
|
<div>
|
2022-01-14 14:26:07 +08:00
|
|
|
<img :src="item.photo" class="userImg" v-if="item.photo">
|
|
|
|
|
<img src="./components/img/user-img.png" alt="" class="userImg" v-else>
|
2022-01-14 13:57:47 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="info">
|
|
|
|
|
<div class="name">
|
|
|
|
|
<span class="user-name">{{item.name}}</span>
|
|
|
|
|
<span class="user-tel">{{item.phone}}</span>
|
|
|
|
|
</div>
|
2022-01-14 15:37:29 +08:00
|
|
|
<div class="idCard">{{item.idNumber && item.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")}}</div>
|
2022-01-14 16:04:11 +08:00
|
|
|
<div class="address">{{item.currentAreaName || '' + item.currentAddress}}</div>
|
2022-01-14 13:57:47 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2022-01-14 15:05:15 +08:00
|
|
|
<AiEmpty description="暂无数据" class="emptyWrap" v-if="!list.length"></AiEmpty>
|
2022-01-14 15:37:29 +08:00
|
|
|
<div class="footer" @click="toAddFamily()">新增责任家庭</div>
|
2022-01-13 11:13:06 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-01-14 13:57:47 +08:00
|
|
|
list:[],
|
|
|
|
|
current:1,
|
|
|
|
|
userId: '',
|
2022-01-13 11:13:06 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2022-01-14 13:57:47 +08:00
|
|
|
getList(){
|
|
|
|
|
this.$http.post(`/app/appgirdmemberresident/listByGirdMember?current=${this.current}&girdMemberId=${this.userId}`).then((res) => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
toAddFamily(){
|
|
|
|
|
uni.navigateTo({url: `./AddFamily?id=${this.userId}`})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
onLoad(option) {
|
|
|
|
|
this.userId = option.id
|
|
|
|
|
console.log(this.userId)
|
2022-01-13 11:13:06 +08:00
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
document.title = '责任家庭'
|
2022-01-14 13:57:47 +08:00
|
|
|
this.getList()
|
|
|
|
|
uni.$on('updateList', () => {
|
|
|
|
|
this.current = 1
|
|
|
|
|
this.getList()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
this.current = this.current + 1
|
|
|
|
|
this.getList()
|
2022-01-13 11:13:06 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.FamilyList {
|
2022-01-14 13:57:47 +08:00
|
|
|
.title {
|
|
|
|
|
padding: 24px 32px;
|
|
|
|
|
background-color: #F3F6F9;
|
|
|
|
|
font-size: 34px;
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
}
|
|
|
|
|
.main {
|
|
|
|
|
background-color: #FFFFFF ;
|
2022-01-14 16:15:31 +08:00
|
|
|
padding-bottom: 112px;
|
2022-01-14 13:57:47 +08:00
|
|
|
ul {
|
|
|
|
|
padding: 0px 32px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
li {
|
|
|
|
|
list-style-type: none;
|
|
|
|
|
.user {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
padding-top: 24px;
|
|
|
|
|
.userImg {
|
|
|
|
|
padding-right: 32px;
|
|
|
|
|
width: 80px;
|
|
|
|
|
height: 80px;
|
|
|
|
|
}
|
|
|
|
|
.info {
|
|
|
|
|
border-bottom: 1px solid #E4E5E6;
|
|
|
|
|
width: 606px;
|
|
|
|
|
div {
|
|
|
|
|
margin: 2px 0;
|
|
|
|
|
}
|
|
|
|
|
.name {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
.user-name {
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
}
|
|
|
|
|
.user-tel {
|
|
|
|
|
font-size: 26px;
|
|
|
|
|
color: #999999 ;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.idCard {
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
font-size: 26px;
|
|
|
|
|
color: #999999;
|
|
|
|
|
}
|
|
|
|
|
.address {
|
2022-01-14 17:42:40 +08:00
|
|
|
max-width: 100%;
|
|
|
|
|
word-wrap:break-word;
|
2022-01-14 13:57:47 +08:00
|
|
|
margin-bottom: 18px;
|
|
|
|
|
font-size: 26px;
|
|
|
|
|
color: #999999;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.footer{
|
|
|
|
|
position: fixed;
|
|
|
|
|
left: 0px;
|
|
|
|
|
bottom: 0px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 112px;
|
|
|
|
|
background-color: #1365DD;
|
|
|
|
|
line-height: 112px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 36px;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
}
|
2022-01-13 11:13:06 +08:00
|
|
|
}
|
|
|
|
|
</style>
|