居民档案

This commit is contained in:
yanran200730
2022-08-08 09:51:48 +08:00
parent b505c32e00
commit 27da7731ba
3 changed files with 92 additions and 99 deletions

View File

@@ -1,17 +1,14 @@
<template>
<div class="DetailCard">
<div class="DetailCard" v-if="pageShow">
<div class="top"></div>
<div class="middle">
<div class="hint">家庭地址</div>
<div class="areaHint">
<u-icon name="map-fill" color="#73ABFF"></u-icon>
<span style="margin-left: 14px;">{{resident.currentAreaName}}</span>
<span v-if="resident.currentAddress">{{resident.currentAddress}}</span>
</div>
</div>
<div class="bottom">
<div class="hints">家庭成员 {{ data.family && data.family.length }}</div>
@@ -52,46 +49,48 @@
</template>
<script>
export default {
name: 'DetailCard',
components: {},
props: {},
data() {
return {
id: '',
data: [],
resident: {},
}
},
computed: {},
watch: {},
onLoad(o) {
document.title = '居民信息'
this.id = o.id
this.$dict.load('householdRelation', 'fileStatus').then(() => {
this.getDetail()
})
},
onShow() {},
methods: {
getDetail() {
this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.data = res.data
this.$forceUpdate()
this.$nextTick(() => {
this.resident = res.data.resident
this.$forceUpdate()
})
}
export default {
name: 'DetailCard',
data() {
return {
id: '',
data: [],
pageShow: false,
resident: {},
}
},
onLoad(o) {
document.title = '居民信息'
this.id = o.id
this.$dict.load('householdRelation', 'fileStatus').then(() => {
this.getDetail()
})
},
toDetailPeople(item) {
uni.navigateTo({ url: `./DetailPeople?id=${item.id}` })
},
},
}
methods: {
getDetail() {
this.$loading()
this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.data = res.data
this.$forceUpdate()
this.$nextTick(() => {
this.resident = res.data.resident
this.$forceUpdate()
})
this.pageShow = true
}
})
},
toDetailPeople(item) {
uni.navigateTo({ url: `./DetailPeople?id=${item.id}` })
}
}
}
</script>
<style scoped lang="scss">