居民档案

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

@@ -2,8 +2,18 @@
<div class="AppResidentDocument"> <div class="AppResidentDocument">
<u-tabs class="tabs" :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change" :bar-width="196"></u-tabs> <u-tabs class="tabs" :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change" :bar-width="196"></u-tabs>
<div class="seachObjs"> <div class="seachObjs">
<u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false" bg-color="#F5F5F5" search-icon-color="#E2E8F1" <u-search
color="#666" height="58" @search="handerSearch" @clear="handerClear"></u-search> v-model="keyword"
:clearabled="true"
placeholder="姓名/联系方式/身份证后6位"
:show-action="false"
bg-color="#F5F5F5"
search-icon-color="#E2E8F1"
color="#666"
height="58"
@search="handerSearch"
@clear="handerClear">
</u-search>
</div> </div>
<div class="dataes" v-if="datas.length"> <div class="dataes" v-if="datas.length">
<div class="datass" v-for="(item, index) in datas" :key="index" @click="toDetailCard(item)"> <div class="datass" v-for="(item, index) in datas" :key="index" @click="toDetailCard(item)">
@@ -26,7 +36,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <AiEmpty class="emptyWrap" v-else :noPermit="true" description="暂无居民<br/>信息点击按钮新增居民信息,也可在管理系统批量导入"></AiEmpty> -->
<div class="empty" v-if="!datas.length && isMore"> <div class="empty" v-if="!datas.length && isMore">
<img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt=""> <img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt="">
<p>暂无居民信息<br/>点击<span @click="edit('')">新增按钮</span>新增居民信息,也可在管理系统批量导入</p> <p>暂无居民信息<br/>点击<span @click="edit('')">新增按钮</span>新增居民信息,也可在管理系统批量导入</p>
@@ -165,7 +174,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.AppResidentDocument { .AppResidentDocument {
height: 100%; height: 100%;
padding-top: 80rpx; padding-top: 96rpx;
.tabs { .tabs {
position: fixed; position: fixed;
@@ -235,6 +244,10 @@ export default {
height: 128rpx; height: 128rpx;
padding: 0 0 0 32px; padding: 0 0 0 32px;
&:active {
background: #eee;
}
.left { .left {
img { img {
width: 80px; width: 80px;

View File

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

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="DetailPeople"> <div class="DetailPeople" v-if="pageShow">
<div class="top"> <div class="top">
<div class="photos"> <div class="photos">
<img :src="data.resident.photo" alt="" v-if="data.resident && data.resident.photo" /> <img :src="data.resident.photo" alt="" v-if="data.resident && data.resident.photo" />
@@ -18,86 +18,68 @@
<div class="rightBottom" v-if="data.resident && data.resident.phone">{{ data.resident.phone }}</div> <div class="rightBottom" v-if="data.resident && data.resident.phone">{{ data.resident.phone }}</div>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="middle"> <div class="middle">
<div class="hint">个人基本信息</div> <div class="hint">个人基本信息</div>
<div class="contents"> <div class="contents">
<div class="item"> <div class="item">
<span>籍贯</span> <span>籍贯</span>
<span>{{ data.resident && data.resident.birthplaceAreaName }}</span> <span>{{ data.resident && data.resident.birthplaceAreaName }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>身份证号</span> <span>身份证号</span>
<span>{{ data.resident && data.resident.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> <span>{{ data.resident && data.resident.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>民族</span> <span>民族</span>
<span v-if="data.resident && data.resident.nation"> {{ $dict.getLabel('nation', data.resident.nation) }}</span> <span v-if="data.resident && data.resident.nation"> {{ $dict.getLabel('nation', data.resident.nation) }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>文化程度</span> <span>文化程度</span>
<span v-if="data.resident && data.resident.education">{{ $dict.getLabel('education', data.resident.education) }}</span> <span v-if="data.resident && data.resident.education">{{ $dict.getLabel('education', data.resident.education) }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>婚姻状况</span> <span>婚姻状况</span>
<span v-if="data.resident && data.resident.maritalStatus">{{ $dict.getLabel('maritalStatus', data.resident.maritalStatus) }}</span> <span v-if="data.resident && data.resident.maritalStatus">{{ $dict.getLabel('maritalStatus', data.resident.maritalStatus) }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>政治面貌</span> <span>政治面貌</span>
<span v-if="data.resident && data.resident.politicsStatus">{{ $dict.getLabel('politicsStatus', data.resident.politicsStatus) }}</span> <span v-if="data.resident && data.resident.politicsStatus">{{ $dict.getLabel('politicsStatus', data.resident.politicsStatus) }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>兵役状况</span> <span>兵役状况</span>
<span v-if="data.resident && data.resident.militaryStatus">{{ $dict.getLabel('militaryStatus', data.resident.militaryStatus) }}</span> <span v-if="data.resident && data.resident.militaryStatus">{{ $dict.getLabel('militaryStatus', data.resident.militaryStatus) }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>宗教信仰</span> <span>宗教信仰</span>
<span v-if="data.resident && data.resident.faithType">{{ $dict.getLabel('faithType', data.resident.faithType) }}</span> <span v-if="data.resident && data.resident.faithType">{{ $dict.getLabel('faithType', data.resident.faithType) }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>职业</span> <span>职业</span>
<span v-if="data.resident && data.resident.job">{{ $dict.getLabel('job', data.resident.job) }}</span> <span v-if="data.resident && data.resident.job">{{ $dict.getLabel('job', data.resident.job) }}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="lines"></div> <div class="lines"></div>
<div class="bottom"> <div class="bottom">
<div class="hint">联络信息</div> <div class="hint">联络信息</div>
<div class="contents"> <div class="contents">
<div class="item"> <div class="item">
<span>联系方式</span> <span>联系方式</span>
<span class="phones" v-if="data.resident && data.resident.phone" @click="callPhone(data.resident.phone)">{{ data.resident.phone }}</span> <span class="phones" v-if="data.resident && data.resident.phone" @click="callPhone(data.resident.phone)">{{ data.resident.phone }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>现住址</span> <span>现住址</span>
<span v-if="data.resident && data.resident.currentAreaName">{{ data.resident.currentAreaName }}</span> <span v-if="data.resident && data.resident.currentAreaName">{{ data.resident.currentAreaName }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>现住详细地址</span> <span>现住详细地址</span>
<span v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</span> <span v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>户籍地址</span> <span>户籍地址</span>
<span v-if="data.resident && data.resident.householdAreaName">{{ data.resident.householdAreaName }}</span> <span v-if="data.resident && data.resident.householdAreaName">{{ data.resident.householdAreaName }}</span>
</div> </div>
<div class="item"> <div class="item">
<span>户籍详细地址</span> <span>户籍详细地址</span>
<span v-if="data.resident && data.resident.householdAddress">{{ data.resident.householdAddress }}</span> <span v-if="data.resident && data.resident.householdAddress">{{ data.resident.householdAddress }}</span>
@@ -108,43 +90,42 @@
</template> </template>
<script> <script>
export default { export default {
name: 'DetailPeople', name: 'DetailPeople',
components: {},
props: {}, appName: '家庭成员信息',
data() { data() {
return { return {
id: '', id: '',
data: [], data: [],
pageShow: false
} }
}, },
computed: {},
watch: {},
onLoad(o) { onLoad(o) {
this.id = o.id this.id = o.id
this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => { this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => {
this.getDetail() this.getDetail()
}) })
}, },
onShow() {
document.title = '家庭成员信息'
},
methods: { methods: {
getDetail() { getDetail() {
this.$loading()
this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => { this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.data = res.data this.data = res.data
// this.$nextTick(() => { this.pageShow = true
// this.currentAreaName = res.data.resident.currentAreaName
// })
} }
}) })
}, },
callPhone(phone) { callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone }) uni.makePhoneCall({ phoneNumber: phone })
}, }
}, }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">