责任家庭 网格id

This commit is contained in:
liuye
2022-01-20 13:57:19 +08:00
parent 0b919756b1
commit d242a787e4
3 changed files with 10 additions and 5 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>