Files
dvcp_v2_wxcp_app/src/project/saas/AppResidentDocument/DetailCard.vue

425 lines
12 KiB
Vue
Raw Normal View History

2022-02-07 09:54:39 +08:00
<template>
2022-08-08 09:51:48 +08:00
<div class="DetailCard" v-if="pageShow">
2022-08-09 10:59:46 +08:00
<div class="top">
2022-08-09 15:33:57 +08:00
<image v-if="resident.photo" :src="resident.photo" />
<image v-else src="./components/img/4.png" />
2022-08-09 10:59:46 +08:00
<div class="top-right">
<div class="top-right__top">
<div class="left">
2022-08-09 15:33:57 +08:00
<h2>{{ resident.name }}</h2>
2022-08-16 13:47:45 +08:00
<i v-if="resident.fileStatus === '1'">已注销</i>
2022-08-09 10:59:46 +08:00
</div>
2022-08-16 13:47:45 +08:00
<span v-if="resident.householdName === '1'">户主</span>
2022-08-09 10:59:46 +08:00
</div>
2022-08-16 13:47:45 +08:00
<div class="top-right__bottom" v-if="resident.residentLabelList">
<span v-for="(item, index) in resident.residentLabelList" :key="index">{{ item.labelName }}</span>
2022-08-09 10:59:46 +08:00
</div>
2022-02-07 09:54:39 +08:00
</div>
</div>
2022-08-09 10:59:46 +08:00
<div class="body">
<div class="tab">
<span @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']">基本信息</span>
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">家庭成员信息</span>
</div>
<div class="info" v-show="currIndex === 0">
<div class="info-group">
<h2>个人基本信息</h2>
<div class="info-wrapper">
<div class="item">
<span>籍贯</span>
<i>{{ data.resident && data.resident.birthplaceAreaName }}</i>
</div>
<div class="item">
<span>身份证号</span>
<i>{{ data.resident && data.resident.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</i>
</div>
<div class="item">
<span>民族</span>
<i v-if="data.resident && data.resident.nation"> {{ $dict.getLabel('nation', data.resident.nation) }}</i>
</div>
<div class="item">
<span>文化程度</span>
<i v-if="data.resident && data.resident.education">{{ $dict.getLabel('education', data.resident.education) }}</i>
</div>
<div class="item">
<span>婚姻状况</span>
<i v-if="data.resident && data.resident.maritalStatus">{{ $dict.getLabel('maritalStatus', data.resident.maritalStatus) }}</i>
</div>
<div class="item">
<span>政治面貌</span>
<i v-if="data.resident && data.resident.politicsStatus">{{ $dict.getLabel('politicsStatus', data.resident.politicsStatus) }}</i>
</div>
<div class="item">
<span>兵役状况</span>
<i v-if="data.resident && data.resident.militaryStatus">{{ $dict.getLabel('militaryStatus', data.resident.militaryStatus) }}</i>
</div>
<div class="item">
<span>宗教信仰</span>
<i v-if="data.resident && data.resident.faithType">{{ $dict.getLabel('faithType', data.resident.faithType) }}</i>
</div>
<div class="item">
<span>职业</span>
<i v-if="data.resident && data.resident.job">{{ $dict.getLabel('job', data.resident.job) }}</i>
</div>
</div>
</div>
<div class="info-group">
<h2>联络信息</h2>
<div class="info-wrapper">
<div class="item">
<span>联系方式</span>
<i class="phones" v-if="data.resident && data.resident.phone" @click="callPhone(data.resident.phone)">{{ data.resident.phone }}</i>
</div>
<div class="item">
<span>现住址</span>
<i v-if="data.resident && data.resident.currentAreaName">{{ data.resident.currentAreaName }}</i>
</div>
<div class="item">
<span>现住详细地址</span>
<i v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</i>
</div>
<div class="item">
<span>户籍地址</span>
<i v-if="data.resident && data.resident.householdAreaName">{{ data.resident.householdAreaName }}</i>
</div>
<div class="item">
<span>户籍详细地址</span>
<i v-if="data.resident && data.resident.householdAddress">{{ data.resident.householdAddress }}</i>
</div>
2022-02-07 09:54:39 +08:00
</div>
2022-08-09 10:59:46 +08:00
</div>
</div>
<div class="bottom" v-show="currIndex === 1">
<div class="hints">家庭成员({{ data.family && data.family.length }})</div>
2022-02-07 09:54:39 +08:00
2022-08-09 10:59:46 +08:00
<div v-if="data.family && data.family.length > 0">
<div class="card" v-for="(item, i) in data.family" :key="i" @click="toDetailPeople(item)">
<div class="photos">
<img :src="item.photo" alt="" v-if="item.photo" />
<img src="./components/img/44.png" alt="" v-else />
</div>
2022-02-07 09:54:39 +08:00
2022-08-09 10:59:46 +08:00
<div class="right">
<div class="rightTop">
<div class="rightTop-lefts">
<span class="names">{{ item.name }}</span>
<span class="fileStatuss" v-if="item.fileStatus == 1">已注销</span>
<span class="householdNames" v-if="item.householdName == 1">户主</span>
<span class="householdNames" v-else>
{{ $dict.getLabel('householdRelation', item.householdRelation) }}
</span>
</div>
<div class="rightTop-rights">
<u-section :show-line="false" sub-title="详情"></u-section>
</div>
2022-02-07 09:54:39 +08:00
</div>
2022-08-09 10:59:46 +08:00
<div class="rightBottom">
<span>身份证号</span>
<span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span>
</div>
2022-02-07 09:54:39 +08:00
</div>
</div>
</div>
2022-08-09 10:59:46 +08:00
<AiEmpty v-else></AiEmpty>
</div>
2022-02-07 09:54:39 +08:00
</div>
</div>
</template>
<script>
2022-08-08 09:51:48 +08:00
export default {
name: 'DetailCard',
2022-08-08 15:37:13 +08:00
appName: '居民信息',
2022-08-08 09:51:48 +08:00
data() {
return {
id: '',
data: [],
resident: {},
2022-08-09 10:59:46 +08:00
currIndex: 0,
2022-08-08 15:37:13 +08:00
pageShow: false
2022-08-08 09:51:48 +08:00
}
2022-02-07 09:54:39 +08:00
},
2022-08-08 15:37:13 +08:00
onLoad (o) {
2022-08-08 09:51:48 +08:00
this.id = o.id
this.$dict.load('householdRelation', 'fileStatus').then(() => {
this.getDetail()
})
2022-02-07 09:54:39 +08:00
},
2022-08-08 09:51:48 +08:00
methods: {
2022-08-08 15:37:13 +08:00
getDetail () {
2022-08-08 09:51:48 +08:00
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
}
})
},
2022-08-08 15:37:13 +08:00
toDetailPeople (item) {
uni.navigateTo({
url: `./DetailPeople?id=${item.id}`
})
2022-08-08 09:51:48 +08:00
}
}
}
2022-02-07 09:54:39 +08:00
</script>
<style scoped lang="scss">
.DetailCard {
2022-08-09 10:59:46 +08:00
* {
box-sizing: border-box;
}
2022-08-08 15:37:13 +08:00
.top {
2022-08-09 10:59:46 +08:00
display: flex;
align-items: center;
padding: 48px 32px 32px;
background: #fff;
& > image {
width: 112px;
height: 112px;
margin-right: 24px;
border-radius: 50%;
}
.top-right {
flex: 1;
.top-right__bottom {
display: flex;
align-items: center;
flex-wrap: wrap;
color: #999999;
font-size: 28px;
span {
line-height: 1.4;
margin-right: 16px;
}
}
.top-right__top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
& > span {
color: #5AAD6A;
font-size: 32px;
}
.left {
display: flex;
align-items: center;
h2 {
margin-right: 16px;
color: #333;
font-size: 36px;
font-weight: 700;
}
i {
width: 88px;
height: 40px;
line-height: 40px;
text-align: center;
background: #FFECEF;
border-radius: 8px;
color: #FF4466;
font-size: 24px;
font-style: normal;
}
}
}
}
2022-08-08 15:37:13 +08:00
}
2022-08-09 10:59:46 +08:00
.body {
.tab {
display: flex;
align-items: center;
height: 96px;
padding: 0 32px;
border-bottom: 1px solid #D4D4D4;
background: #fff;
span {
position: relative;
flex: 1;
height: 100%;
line-height: 96px;
color: #000;
font-size: 32px;
text-align: center;
&.active {
color: #1365DD;
&:after {
position: absolute;
bottom: 0;
left: 50%;
z-index: 1;
width: 192px;
height: 6px;
background: #1365DD;
content: ' ';
transform: translateX(-50%);
}
}
}
2022-02-07 09:54:39 +08:00
}
2022-08-09 10:59:46 +08:00
.info {
.info-group {
2022-08-18 13:46:53 +08:00
margin-bottom: 10px;
padding: 0 32px 20px;
2022-08-09 10:59:46 +08:00
background: #FFFFFF;
&:first-child {
margin-bottom: 4px;
}
& > h2 {
height: 108px;
line-height: 108px;
font-weight: 700;
font-size: 32px;
color: #333333;
}
.item {
display: flex;
line-height: 1.3;
padding: 14px 0;
font-size: 32px;
.phones {
color: #3d94fb;
}
span {
width: 190px;
flex-shrink: 1;
color: #999;
}
i {
flex: 1;
margin-left: 16px;
text-align: right;
color: #333;
font-style: normal;
}
}
}
2022-02-07 09:54:39 +08:00
}
}
.bottom {
background: #fff;
2022-08-09 10:59:46 +08:00
padding: 0 60px 32px;
2022-02-07 09:54:39 +08:00
.hints {
2022-08-09 10:59:46 +08:00
height: 108px;
line-height: 108px;
margin-bottom: 32px;
font-weight: 700;
font-size: 32px;
color: #333333;
2022-02-07 09:54:39 +08:00
}
.card {
display: flex;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
border-radius: 16px;
padding: 48px 32px;
margin-bottom: 32px;
.photos {
img {
width: 96px;
height: 96px;
border-radius: 50%;
}
}
.right {
display: flex;
flex-direction: column;
margin-left: 40px;
width: 100%;
.rightTop {
display: flex;
justify-content: space-between;
.rightTop-lefts {
.names {
font-size: 32px;
font-weight: 600;
}
.householdNames {
margin-left: 30px;
font-size: 26px;
font-weight: 500;
color: #5aad6a;
}
.fileStatuss {
display: inline-block;
margin-left: 30px;
color: #ff4466;
background: #ffecef;
border-radius: 8px;
width: 88px;
height: 40px;
line-height: 40px;
text-align: center;
}
}
.rightTop-rights {
::v-deep .u-section {
.u-section__right-info {
color: #3975c6 !important;
.u-section__right-info__icon-arrow {
.u-icon {
.u-icon__icon {
color: #3975c6 !important;
}
}
}
}
}
}
}
.rightBottom {
margin-top: 20px;
}
}
}
.card:nth-child(2n-1) {
// background: royalblue;
background: url(http://respub.sinoecare.net/20211222/装饰-20211222162743.png) no-repeat;
background-size: 100% 100%;
}
.card:nth-child(2n) {
// background: pink;
background: url(http://respub.sinoecare.net/20211222/装饰2-20211222162934.png) no-repeat;
background-size: 100% 100%;
}
}
}
</style>