Files
dvcp_v2_webapp/project/sass/apps/AppSpecialDrug/components/Detail.vue
yanran200730 b007cd13df 走访慰问
2022-02-10 10:13:49 +08:00

198 lines
5.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<ai-detail class="AppSpecial" isHasSidebar>
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
</ai-title>
</template>
<template slot="content">
<AiSidebar :tabTitle="tabTitle" v-model="currIndex"></AiSidebar>
<ai-card title="基本信息" v-show="currIndex === 0">
<template #content>
<ai-wrapper>
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
<ai-info-item label="性别" :value="idNumberInfo.gender"></ai-info-item>
<ai-info-item label="出生日期" :value="idNumberInfo.birthday"></ai-info-item>
<ai-info-item label="联系电话" :value="info.phone"></ai-info-item>
<ai-info-item label="所属区域" :value="info.areaName"></ai-info-item>
<ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item>
<ai-info-item label="所属网格" :value="info.girdName"></ai-info-item>
<ai-info-item label="初次发现日期" :value="info.firstTime"></ai-info-item>
<ai-info-item label="吸毒状态" :value="dict.getLabel('appSpecialDrug', info.status)"></ai-info-item>
<ai-info-item label="戒毒情况" :value="dict.getLabel('appSpecialDebug', info.debug)"></ai-info-item>
<ai-info-item label="管控情况" :value="dict.getLabel('appSpecialControl', info.control)"></ai-info-item>
<ai-info-item label="管控人姓名" :value="info.controlName"></ai-info-item>
<ai-info-item label="管控人联系方式" isLine :value="info.controlPhone"></ai-info-item>
<ai-info-item label="有无犯罪史" :value="dict.getLabel('isReflection', info.crime)"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<div class="visit-list" v-show="currIndex === 1">
<div class="visit-item" v-for="(item, index) in list" :key="index">
<div class="visit-item__top">
<div class="left">
<div class="avatar">{{ item.name.substr(item.name.length - 2) }}</div>
<h2>{{ item.name }}</h2>
</div>
<span>{{ item.visitTime }}</span>
</div>
<b>{{ item.title }}</b>
<p>{{ item.description }}</p>
<div class="visit-imgs">
<ai-uploader v-model="item.images" :instance="instance" :limit="9" disabled/>
</div>
<div class="visit-status">
<span>现实状态</span>
<i>{{ dict.getLabel('visitCondolenceReality', item.reality) }}</i>
</div>
</div>
<ai-empty v-if="!list.length"></ai-empty>
</div>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
currIndex: 0,
tabTitle: ['人员信息', '走访记录'],
info: {},
list: [],
idNumberInfo: {}
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive','isReflection','yesOrNo').then(() => {
this.getInfo(this.params.id)
})
this.dict.load('visitCondolenceReality').then(() => {
this.getList()
})
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appspecialdrug/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.idNumberInfo = this.idCardNoUtil.getIdCardInfo(res.data.idNumber)
}
})
},
getList () {
this.instance.post(`/app/appvisitvondolence/list`, null, {
params: {
applicationId: 3,
size: 1000
}
}).then(res => {
if (res.code == 0) {
this.list = res.data.records
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'List',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
.AppSpecial {
.visit-list {
.visit-item {
padding: 10px 0;
border-bottom: 1px solid #eee;
&:first-child {
padding-top: 0;
}
&:last-child {
border-bottom: none;
}
.visit-status {
display: flex;
align-items: center;
font-size: 14px;
span {
color: #333;
}
i {
color: #999;
font-style: normal;
}
}
& > p {
line-height: 1.4;
margin-bottom: 4px;
text-align: justify;
color: #666;
font-size: 16px;
}
.visit-item__top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
span {
font-size: 14px;
color: #999;
}
.left {
display: flex;
align-items: center;
img, .avatar {
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
margin-right: 10px;
border-radius: 50%;
font-size: 14px;
color: #fff;
background: #26f;
}
h2 {
font-size: 16px;
font-weight: 500;
}
}
}
}
}
}
</style>