Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-08-08 09:59:36 +08:00
3 changed files with 131 additions and 128 deletions

View File

@@ -1,33 +1,26 @@
<template> <template>
<div class="AppResidentDocument"> <div class="AppResidentDocument">
<div class="areatop"> <u-tabs class="tabs" :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change" :bar-width="196"></u-tabs>
<!-- <div>区域选择</div>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj"></AiAreaPicker>
<u-icon name="photo"></u-icon> -->
<!-- @select="areaSelect" -->
<!-- <u-form label-width="auto">
<u-form-item label="区域选择" right-icon="arrow-right" class="areaIds">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj" :name.sync="areaName"></AiAreaPicker>
</u-form-item>
</u-form> -->
</div>
<!-- <div class="line"></div> -->
<u-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 > 0"> <div class="datass" v-for="(item, index) in datas" :key="index" @click="toDetailCard(item)">
<div class="datass" v-for="(item, iindex) in datas" :key="iindex" @click="toDetailCard(item)">
<div class="left"> <div class="left">
<img :src="item.photo" alt="" v-if="item.photo"/> <img :src="item.photo" alt="" v-if="item.photo"/>
<img src="./components/img/4.png" alt="" v-else/> <img src="./components/img/4.png" alt="" v-else/>
</div> </div>
<div class="right"> <div class="right">
<div class="rightTop"> <div class="rightTop">
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
@@ -38,14 +31,12 @@
</div> </div>
<div class="rightBottom"> <div class="rightBottom">
<span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span>
<span>{{ item.phone }}</span> <span>{{ item.phone }}</span>
</div> </div>
</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-else>
<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>
</div> </div>
@@ -80,7 +71,8 @@ export default {
], ],
currentTabs: 0, currentTabs: 0,
areaId: '', areaId: '',
areaName: '', isMore: false,
areaName: ''
} }
}, },
computed: { computed: {
@@ -101,25 +93,31 @@ export default {
}, },
methods: { methods: {
getList() { getList() {
this.$http this.$loading()
.post('/app/appresident/list', null, { this.$http.post('/app/appresident/list', null, {
params: { params: {
size: this.size, size: this.size,
current: this.current, current: this.current,
con: this.keyword, con: this.keyword,
residentType: this.currentTabs == 0 ? '0' : '1', residentType: this.currentTabs == 0 ? '0' : '1',
}, }
}) }).then((res) => {
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages this.pages = res.data.pages
if (this.current === 1 && !res.data.records.length) {
this.isMore = true
} else {
this.isMore = false
}
} }
}) })
}, },
change(index) { change(index) {
this.isMore = false
this.currentTabs = index this.currentTabs = index
this.current = 1 this.current = 1
this.datas = [] this.datas = []
@@ -176,6 +174,15 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.AppResidentDocument { .AppResidentDocument {
height: 100%; height: 100%;
padding-top: 96rpx;
.tabs {
position: fixed;
left: 0;
top: 0;
z-index: 11;
width: 100%;
}
.areatop { .areatop {
display: flex; display: flex;
@@ -233,7 +240,13 @@ export default {
.datass { .datass {
display: flex; display: flex;
padding: 24px 32px; align-items: center;
height: 128rpx;
padding: 0 0 0 32px;
&:active {
background: #eee;
}
.left { .left {
img { img {
@@ -245,9 +258,13 @@ export default {
.right { .right {
display: flex; display: flex;
justify-content: center;
flex-direction: column; flex-direction: column;
margin-left: 32px; margin-left: 32px;
width: 100%; padding-right: 32px;
flex: 1;
height: 100%;
border-bottom: 1rpx solid #E4E5E6;
.rightTop { .rightTop {
font-size: 32px; font-size: 32px;
@@ -271,6 +288,12 @@ export default {
margin-top: 8px; margin-top: 8px;
} }
} }
&:last-child {
.right {
border-bottom: none;
}
}
} }
} }

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,46 +49,48 @@
</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 this.$dict.load('householdRelation', 'fileStatus').then(() => {
this.$dict.load('householdRelation', 'fileStatus').then(() => { this.getDetail()
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()
})
}
}) })
}, },
toDetailPeople(item) { methods: {
uni.navigateTo({ url: `./DetailPeople?id=${item.id}` }) 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> </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() {
return { data() {
id: '', return {
data: [], id: '',
} data: [],
}, pageShow: false
computed: {}, }
watch: {}, },
onLoad(o) {
this.id = o.id onLoad(o) {
this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => { this.id = o.id
this.getDetail() this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => {
}) this.getDetail()
},
onShow() {
document.title = '家庭成员信息'
},
methods: {
getDetail() {
this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.data = res.data
// this.$nextTick(() => {
// this.currentAreaName = res.data.resident.currentAreaName
// })
}
}) })
}, },
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone }) methods: {
}, getDetail() {
}, this.$loading()
} this.$http.post(`/app/appresident/detail?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.data = res.data
this.pageShow = true
}
})
},
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
}
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">