Files
dvcp_v2_webapp/project/pingchang/apps/AppHealthReport/components/Detail.vue
yanran200730 30078c1755 2
2022-10-12 15:47:21 +08:00

168 lines
5.7 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 isHasSidebar v-loading="isLoading">
<template slot="title">
<ai-title title="健康上报详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar>
<div v-show="currIndex === 0">
<ai-card title="基本信息" v-show="currIndex === 0">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="手机号" :value="info.phone"></ai-info-item>
<ai-info-item label="上报时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></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-wrapper>
</template>
</ai-card>
</div>
<div v-show="currIndex === 1">
<ai-card title="每日上报">
<template #right>
<el-button type="primary" v-if="info.status === '0'" @click="release">解除异常</el-button>
</template>
<template #content>
<ai-table
:isShowPagination="false"
tableSize="small"
border
:tableData="info.reportInfos"
:col-configs="colConfigs1"
@getList="() => {}">
<el-table-column slot="nucleicAcidUrl" label="核酸截图" align="center">
<template slot-scope="{ row }">
<ai-uploader
:instance="instance"
:value="[{url: row.nucleicAcidUrl}]"
disabled
:limit="9">
</ai-uploader>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
</div>
<div v-show="currIndex === 2">
<ai-card title="风险处置">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
<ai-info-item label="手机号" :value="info.phone"></ai-info-item>
<ai-info-item label="上报时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="身份证号" :value="info.idNumber"></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-wrapper>
</template>
</ai-card>
<ai-card title="风险情况记录">
<template #content>
<ai-table
:isShowPagination="false"
tableSize="small"
border
:tableData="info.handleLogs"
:col-configs="colConfigs2"
@getList="() => {}">
</ai-table>
</template>
</ai-card>
</div>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
info: {},
isShow: false,
currIndex: 0,
isLoading: false,
tableData: [],
colConfigs1: [
{prop: 'createTime', label: '上报日期', align: 'center' },
{prop: 'phone', label: '上报位置', align: 'center'},
{ prop: 'status',
label: '健康状态',
align: 'center',
render: (h, params) => {
return h(
'span', {
style: {
color: params.row.status === '1' ? 'red' : ''
}
}, params.row.status === '0' ? '正常' : '异常'
)
}
},
{slot: 'nucleicAcidUrl', label: '核酸截图', align: 'center'}
],
colConfigs2: [
{prop: 'content', label: '风险记录', align: 'center' },
{prop: 'createTime', label: '创建时间', align: 'center'},
{prop: 'createUserName', label: '记录人', align: 'center' }
],
tabList: ['基本信息', '每日上报', '风险处置']
}
},
created () {
this.isLoading = true
if (this.params && this.params.id) {
this.id = this.params.id
this.$dict.load(['EP_riskLevel', 'EP_handleType', 'EP_registerPersonType', 'EP_highRiskIndustries', 'EP_travelType', 'yesOrNo', 'EP_handoverObject',
'EP_handleType', 'EP_quarantineAddress', 'EP_homeStatus', 'EP_quarantineStrategy', 'EP_controlMethod', 'EP_handoverMethod', 'EP_abnormalType']).then(() => {
this.getInfo(this.params.id)
})
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appepidemicpreventionhealthreportinfo/userDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.info.checkPhoto = res.data.checkPhoto ? JSON.parse(res.data.checkPhoto) : []
this.info.travelTypeNames = res.data.travelType.split(',').map(v => {
return this.dict.getLabel('EP_travelType', v)
}).join('')
}
this.isLoading = false
}).catch(() => {
this.isLoading = false
})
},
cancel () {
this.$emit('change', {
type: 'List',
isRefresh: true
})
}
}
}
</script>
<style scoped lang="scss">
</style>