Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1,33 +1,26 @@
|
||||
<template>
|
||||
<div class="AppResidentDocument">
|
||||
<div class="areatop">
|
||||
<!-- <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>
|
||||
|
||||
<u-tabs class="tabs" :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change" :bar-width="196"></u-tabs>
|
||||
<div class="seachObjs">
|
||||
<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>
|
||||
<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 class="dataes" v-if="datas.length > 0">
|
||||
<div class="datass" v-for="(item, iindex) in datas" :key="iindex" @click="toDetailCard(item)">
|
||||
<div class="dataes" v-if="datas.length">
|
||||
<div class="datass" v-for="(item, index) in datas" :key="index" @click="toDetailCard(item)">
|
||||
<div class="left">
|
||||
<img :src="item.photo" alt="" v-if="item.photo"/>
|
||||
<img src="./components/img/4.png" alt="" v-else/>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<div class="rightTop">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
@@ -38,14 +31,12 @@
|
||||
</div>
|
||||
<div class="rightBottom">
|
||||
<span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span>
|
||||
|
||||
<span>{{ item.phone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <AiEmpty class="emptyWrap" v-else :noPermit="true" description="暂无居民<br/>信息点击按钮新增居民信息,也可在管理系统批量导入"></AiEmpty> -->
|
||||
<div class="empty" v-else>
|
||||
<div class="empty" v-if="!datas.length && isMore">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt="">
|
||||
<p>暂无居民信息<br/>点击<span @click="edit('')">新增按钮</span>新增居民信息,也可在管理系统批量导入</p>
|
||||
</div>
|
||||
@@ -80,7 +71,8 @@ export default {
|
||||
],
|
||||
currentTabs: 0,
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
isMore: false,
|
||||
areaName: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -101,25 +93,31 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http
|
||||
.post('/app/appresident/list', null, {
|
||||
this.$loading()
|
||||
this.$http.post('/app/appresident/list', null, {
|
||||
params: {
|
||||
size: this.size,
|
||||
current: this.current,
|
||||
con: this.keyword,
|
||||
residentType: this.currentTabs == 0 ? '0' : '1',
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
||||
|
||||
this.pages = res.data.pages
|
||||
|
||||
if (this.current === 1 && !res.data.records.length) {
|
||||
this.isMore = true
|
||||
} else {
|
||||
this.isMore = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
change(index) {
|
||||
this.isMore = false
|
||||
this.currentTabs = index
|
||||
this.current = 1
|
||||
this.datas = []
|
||||
@@ -176,6 +174,15 @@ export default {
|
||||
<style scoped lang="scss">
|
||||
.AppResidentDocument {
|
||||
height: 100%;
|
||||
padding-top: 96rpx;
|
||||
|
||||
.tabs {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.areatop {
|
||||
display: flex;
|
||||
@@ -233,7 +240,13 @@ export default {
|
||||
|
||||
.datass {
|
||||
display: flex;
|
||||
padding: 24px 32px;
|
||||
align-items: center;
|
||||
height: 128rpx;
|
||||
padding: 0 0 0 32px;
|
||||
|
||||
&:active {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.left {
|
||||
img {
|
||||
@@ -245,9 +258,13 @@ export default {
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
margin-left: 32px;
|
||||
width: 100%;
|
||||
padding-right: 32px;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border-bottom: 1rpx solid #E4E5E6;
|
||||
|
||||
.rightTop {
|
||||
font-size: 32px;
|
||||
@@ -271,6 +288,12 @@ export default {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.right {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="DetailPeople">
|
||||
<div class="DetailPeople" v-if="pageShow">
|
||||
<div class="top">
|
||||
<div class="photos">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="middle">
|
||||
<div class="hint">个人基本信息</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="item">
|
||||
<span>籍贯</span>
|
||||
<span>{{ data.resident && data.resident.birthplaceAreaName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>身份证号</span>
|
||||
<span>{{ data.resident && data.resident.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>民族</span>
|
||||
<span v-if="data.resident && data.resident.nation"> {{ $dict.getLabel('nation', data.resident.nation) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>文化程度</span>
|
||||
<span v-if="data.resident && data.resident.education">{{ $dict.getLabel('education', data.resident.education) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>婚姻状况</span>
|
||||
<span v-if="data.resident && data.resident.maritalStatus">{{ $dict.getLabel('maritalStatus', data.resident.maritalStatus) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>政治面貌</span>
|
||||
<span v-if="data.resident && data.resident.politicsStatus">{{ $dict.getLabel('politicsStatus', data.resident.politicsStatus) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>兵役状况</span>
|
||||
<span v-if="data.resident && data.resident.militaryStatus">{{ $dict.getLabel('militaryStatus', data.resident.militaryStatus) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>宗教信仰</span>
|
||||
<span v-if="data.resident && data.resident.faithType">{{ $dict.getLabel('faithType', data.resident.faithType) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>职业</span>
|
||||
<span v-if="data.resident && data.resident.job">{{ $dict.getLabel('job', data.resident.job) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lines"></div>
|
||||
|
||||
<div class="bottom">
|
||||
<div class="hint">联络信息</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="item">
|
||||
<span>联系方式</span>
|
||||
<span class="phones" v-if="data.resident && data.resident.phone" @click="callPhone(data.resident.phone)">{{ data.resident.phone }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>现住址</span>
|
||||
<span v-if="data.resident && data.resident.currentAreaName">{{ data.resident.currentAreaName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>现住详细地址</span>
|
||||
<span v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>户籍地址</span>
|
||||
<span v-if="data.resident && data.resident.householdAreaName">{{ data.resident.householdAreaName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span>户籍详细地址</span>
|
||||
<span v-if="data.resident && data.resident.householdAddress">{{ data.resident.householdAddress }}</span>
|
||||
@@ -108,43 +90,42 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DetailPeople',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
data: [],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad(o) {
|
||||
this.id = o.id
|
||||
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
|
||||
// })
|
||||
}
|
||||
export default {
|
||||
name: 'DetailPeople',
|
||||
|
||||
appName: '家庭成员信息',
|
||||
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
data: [],
|
||||
pageShow: false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(o) {
|
||||
this.id = o.id
|
||||
this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
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>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user