This commit is contained in:
yanran200730
2022-01-20 14:07:35 +08:00
5 changed files with 47 additions and 7 deletions

View File

@@ -56,7 +56,8 @@ export default {
userList: {}, userList: {},
userId: '', userId: '',
areaId: '', areaId: '',
areaName:'' areaName:'',
girdId: ''
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
@@ -88,7 +89,8 @@ export default {
var info = { var info = {
girdMemberId: this.userId, girdMemberId: this.userId,
residentId: item.id, residentId: item.id,
name: item.name name: item.name,
girdId: this.girdId
} }
checkUserList.push(info) checkUserList.push(info)
} }
@@ -117,6 +119,7 @@ export default {
this.userId = option.id this.userId = option.id
this.areaId = this.user.areaId this.areaId = this.user.areaId
this.areaName = this.user.areaName this.areaName = this.user.areaName
this.girdId = option.girdId
}, },
onShow() { onShow() {
document.title = '新增责任家庭' document.title = '新增责任家庭'

View File

@@ -42,7 +42,8 @@ export default {
current:1, current:1,
userId: '', userId: '',
edit: true, edit: true,
checked: true checked: true,
girdId: ''
} }
}, },
methods: { methods: {
@@ -54,7 +55,7 @@ export default {
}) })
}, },
toAddFamily(){ toAddFamily(){
uni.navigateTo({url: `./AddFamily?id=${this.userId}`}) uni.navigateTo({url: `./AddFamily?id=${this.userId}&girdId=${this.girdId}`})
}, },
userClick(index) { userClick(index) {
this.list[index].checked = !this.list[index].checked this.list[index].checked = !this.list[index].checked
@@ -91,6 +92,7 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.userId = option.id this.userId = option.id
this.girdId = option.girdId
console.log(this.userId) console.log(this.userId)
}, },
onShow() { onShow() {

View File

@@ -16,7 +16,7 @@
<div class="right"> <div class="right">
<div class="name">{{item.name}} <div class="name">{{item.name}}
<span class="gird">{{item.checkType == 2 ? '网格长' : '网格员'}}</span> <span class="gird">{{item.checkType == 2 ? '网格长' : '网格员'}}</span>
<span class="family-btn" @click="linkTo(`./FamilyList?id=${item.id}`)" v-if="item.checkType == 1">责任家庭 ></span> <span class="family-btn" @click="linkTo(`./FamilyList?id=${item.id}&girdId=${userGird.id}`)" v-if="item.checkType == 1">责任家庭 ></span>
</div> </div>
<p>{{item.girdName}} </p> <p>{{item.girdName}} </p>
</div> </div>

View File

@@ -1,5 +1,15 @@
<template> <template>
<div class="AppMailList"> <div class="AppMailList">
<AiTopFixed>
<div class="area-content">
<AiAreaPicker :areaId="user.areaId" :value="areaId" @select="areaSelect" :name.sync="areaName">
<img src="./img/local-icon.png" alt="">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24"/>
</AiAreaPicker>
</div>
</AiTopFixed>
<div class="list-content"> <div class="list-content">
<u-index-list :scrollTop="scrollTop" :index-list="indexList"> <u-index-list :scrollTop="scrollTop" :index-list="indexList">
<div v-for="(letter, index) in indexList" :key="index"> <div v-for="(letter, index) in indexList" :key="index">
@@ -41,11 +51,15 @@ export default {
return { return {
scrollTop: 0, scrollTop: 0,
list: [], list: [],
indexList: [] indexList: [],
areaId: '',
areaName: ''
} }
}, },
computed: { ...mapState(['user']) }, computed: { ...mapState(['user']) },
mounted() { mounted() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList() this.getList()
uni.$on('updateList', () => { uni.$on('updateList', () => {
this.getList() this.getList()
@@ -56,13 +70,17 @@ export default {
}, },
methods: { methods: {
areaSelect(e) {
this.areaId = e
this.getList()
},
callPhone(phone) { callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone}) uni.makePhoneCall({phoneNumber: phone})
}, },
getList() { getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, { this.$http.post(`/app/appconvenientaddressbook/list`, null, {
params: { params: {
areaId: this.user.areaId, areaId: this.areaId,
isPublic: 1, isPublic: 1,
resource: "portal", resource: "portal",
size: 999 size: 999
@@ -89,6 +107,23 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.AppMailList { .AppMailList {
::v-deep .fixed{
z-index: 9999;
}
.area-content {
width: 100%;
line-height: 64px;
img {
width: 42px;
vertical-align: middle;
margin-right: 16px;
}
.u-icon {
margin-left: 6px;
}
}
// background-color: #F3F6F9; // background-color: #F3F6F9;
.list-content{ .list-content{
padding-bottom: 112px; padding-bottom: 112px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB