Files
dvcp_v2_webapp/project/pingchang/apps/AppBayonetRegistration/components/Detail.vue
yanran200730 e20a06fa4f bug
2022-12-01 10:18:44 +08:00

318 lines
15 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 #right>
<el-button type="primary" @click="(form = {...info}, isShow = true)">编辑</el-button>
</template>
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></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.phone"></ai-info-item>
<ai-info-item label="登记卡口" isLine :value="info.gatewayName"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="行程信息">
<template #right>
<el-button type="primary" @click="(form = {...info}, isShow = true)">编辑</el-button>
</template>
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="出发时间" :value="info.startTime"></ai-info-item>
<ai-info-item label="出发地" >
<span :style="{color: info.denger == 1 ? '#FF4466' : '#333'}">{{info.startAreaName}} </span>
</ai-info-item>
<ai-info-item label="出发地详址" isLine :value="info.startAddress"></ai-info-item>
<ai-info-item label="出行方式" :value="info.travelTypeNames"></ai-info-item>
<ai-info-item label="车次/航班" isLine :value="info.trainNo"></ai-info-item>
<ai-info-item label="行程描述" isLine :value="info.description"></ai-info-item>
<ai-info-item label="抵平时间" :value="info.arriveTime"></ai-info-item>
<ai-info-item label="目的地" :value="info.arriveAreaName"></ai-info-item>
<ai-info-item label="目的地详址" isLine :value="info.arriveAddress"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="健康状况">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="是否有风险旅居史" v-if="info.fromHighRiskArea === '1'">
<span style="color: red">{{ info.highRiskAreaName }}</span>
</ai-info-item>
<ai-info-item label="是否有风险旅居史" v-else value="否"></ai-info-item>
<ai-info-item label="7天内是否接触新冠确诊或疑似患者">
<span :style="{color: info.contactPatients === '1' ? 'red' : ''}">{{ dict.getLabel('yesOrNo', info.contactPatients) }}</span>
</ai-info-item>
<ai-info-item label="当前健康状况" v-if="info.abnormalHealth === '1'">
<span style="color: red">{{ dict.getLabel('EP_abnormalType', info.abnormalType) }}</span>
</ai-info-item>
<ai-info-item label="当前健康状况" v-else value="否"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="同行情况">
<template #content>
<ai-table
:isShowPagination="false"
tableSize="small"
border
:tableData="info.companionList"
:col-configs="colConfigs"
@getList="() => {}">
</ai-table>
</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-wrapper
label-width="120px">
<ai-info-item label="姓名" :value="info.name"></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.phone"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="卡口处置意见">
<template #content>
<ai-wrapper
style="margin-bottom: 20px;"
v-for="item in info.riskDisposalList"
:key="item.id"
label-width="120px">
<ai-info-item label="处置人员" :value="item.createUserName"></ai-info-item>
<ai-info-item label="联系电话" :value="item.createUserPhone"></ai-info-item>
<ai-info-item label="处置意见" :value="dict.getLabel('EP_handleType', item.handleType)"></ai-info-item>
<ai-info-item v-if="item.handleType === '2'" label="集中隔离地" :value="dict.getLabel('EP_quarantineAddress', item.quarantineAddress)"></ai-info-item>
<ai-info-item label="居家状态" v-if="item.handleType === '3' && item.homeStatus" :value="dict.getLabel('EP_homeStatus', item.homeStatus)"></ai-info-item>
<ai-info-item
v-if="['2', '3'].includes(item.handleType) && item.homeStatus"
label="隔离时间"
:value="item.quarantineBeginTime ? item.quarantineBeginTime + '至' + item.quarantineEndTime : ''">
</ai-info-item>
<ai-info-item label="隔离策略" v-if="['2', '3'].includes(item.handleType) && item.homeStatus" :value="dict.getLabel('EP_quarantineStrategy', item.quarantineStrategy)"></ai-info-item>
<ai-info-item label="管控方式" isLine v-if="['3'].includes(item.handleType) && item.homeStatus" :value="dict.getLabel('EP_controlMethod', item.controlMethod)"></ai-info-item>
<ai-info-item v-if="['2', '3', '6'].includes(item.handleType) && item.handoverPersonName" label="移交对象" :value="dict.getLabel('EP_handoverObject', item.handoverObject)"></ai-info-item>
<ai-info-item v-if="['2', '3', '6'].includes(item.handleType) && item.handoverPersonName" label="移交方式" :value="dict.getLabel('EP_handoverMethod', item.handoverMethod)"></ai-info-item>
<ai-info-item v-if="['2', '3', '6'].includes(item.handleType) && item.handoverPersonName" label="交接人员姓名" :value="item.handoverPersonName"></ai-info-item>
<ai-info-item v-if="['2', '3', '6'].includes(item.handleType) && item.handoverPersonName" label="手机号" :value="item.handoverPersonPhone"></ai-info-item>
<ai-info-item isLine label="备注" :value="item.remarks"></ai-info-item>
<ai-info-item label="交接图片" isLine v-if="['3', '2', '6'].includes(item.handleType) && item.handoverPersonName">
<ai-uploader
:instance="instance"
:value="item.fileList"
disabled
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
<ai-empty style="margin-bottom: 60px;" v-if="info.riskDisposalList && !info.riskDisposalList.length"></ai-empty>
</template>
</ai-card>
<ai-card title="社区处置意见">
<template #content>
<ai-wrapper
style="margin-bottom: 20px;"
v-if="communityInfo.communityHandleType"
label-width="120px">
<ai-info-item label="处置人员" :value="communityInfo.createUserName"></ai-info-item>
<ai-info-item label="联系电话" :value="communityInfo.createUserPhone"></ai-info-item>
<ai-info-item label="处置意见" :value="dict.getLabel('EP_handleType', communityInfo.handleType)"></ai-info-item>
<ai-info-item label="居家状态" :value="dict.getLabel('EP_homeStatus', communityInfo.homeStatus)"></ai-info-item>
<ai-info-item label="隔离时间" :value="communityInfo.quarantineBeginTime ? communityInfo.quarantineBeginTime + '至' + communityInfo.quarantineEndTime : ''"></ai-info-item>
<ai-info-item label="隔离策略" :value="dict.getLabel('EP_quarantineStrategy', communityInfo.quarantineStrategy)"></ai-info-item>
<ai-info-item label="管控方式" :value="dict.getLabel('EP_controlMethod', communityInfo.controlMethod)"></ai-info-item>
<ai-info-item label="图片" isLine>
<ai-uploader
:instance="instance"
:value="communityInfo.fileList"
disabled
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
<ai-empty style="margin-bottom: 60px;" v-if="!communityInfo.communityHandleType"></ai-empty>
</template>
</ai-card>
</div>
<ai-dialog
:visible.sync="isShow"
width="890px"
title="编辑"
@onConfirm="onConfirm">
<el-form class="ai-form" ref="form" :model="form" label-width="110px" label-position="right">
<el-form-item label="身份证" prop="idNumber" style="width: 100%">
<el-input size="small" placeholder="请输入身份证" v-model="form.idNumber"></el-input>
</el-form-item>
<el-form-item label="出发时间" prop="startTime" style="width: 100%">
<el-date-picker
v-model="form.startTime"
type="datetime"
size="small"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择出发时间">
</el-date-picker>
</el-form-item>
<el-form-item label="出发地" prop="startAreaId" style="width: 100%" :rules="[{required: true, message: '请选择出发地', trigger: 'change'}]">
<ai-area-select clearable always-show :instance="instance" v-model="form.startAreaId"></ai-area-select>
</el-form-item>
<el-form-item label="出发地详址" prop="startAddress" style="width: 100%">
<el-input size="small" placeholder="请输入出发地详址" v-model="form.startAddress"></el-input>
</el-form-item>
<el-form-item label="出行方式" prop="travelType" style="width: 100%">
<ai-select
v-model="form.travelType"
clearable
placeholder="请选择出行方式"
:selectList="dict.getDict('EP_travelType')">
</ai-select>
</el-form-item>
<el-form-item label="车次/航班" prop="trainNo" style="width: 100%">
<el-input size="small" placeholder="请输入车次/航班" v-model="form.trainNo"></el-input>
</el-form-item>
<el-form-item label="行程描述" prop="description" style="width: 100%">
<el-input size="small" placeholder="请输入行程描述" v-model="form.description"></el-input>
</el-form-item>
<el-form-item label="抵平时间" prop="arriveTime" style="width: 100%">
<el-date-picker
v-model="form.arriveTime"
type="datetime"
size="small"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择抵平时间">
</el-date-picker>
</el-form-item>
<el-form-item label="目的地" prop="arriveAreaId" style="width: 100%" :rules="[{required: true, message: '请选择目的地', trigger: 'change'}]">
<ai-area-select clearable always-show :instance="instance" v-model="form.arriveAreaId"></ai-area-select>
</el-form-item>
<el-form-item label="目的地详址" prop="arriveAddress" style="width: 100%">
<el-input size="small" placeholder="请输入目的地详址" v-model="form.arriveAddress"></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</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: [],
form: {
idNumber: ''
},
communityInfo: {},
colConfigs: [
{prop: 'name', label: '姓名', align: 'center' },
{prop: 'phone', label: '手机号', align: 'center'}
],
tabList: ['基本信息', '风险处置'],
dictList: []
}
},
created () {
this.isLoading = true
if (this.params && this.params.id) {
this.id = this.params.id
this.$dict.load(['EP_handleType', 'EP_travelType', 'yesOrNo', 'EP_handoverObject', 'EP_quarantineAddress', 'EP_homeStatus', 'EP_quarantineStrategy', 'EP_controlMethod', 'EP_handoverMethod', 'EP_abnormalType']).then(() => {
this.getInfo(this.params.id)
})
}
this.getDictList()
},
methods: {
getDictList () {
this.instance.post(`/app/appepidemicpreventiongateway/list?size=10000&current=1`).then(res => {
if (res.code == 0) {
this.dictList = res.data.records.map(v => {
return {
dictName: v.name,
dictValue: v.id
}
})
}
})
},
onConfirm () {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appepidemicpreventionregisterinfo/updateForAdmin`, {
...this.info,
...this.form,
id: this.params.id
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getInfo(this.params.id)
this.$message.success('编辑成功')
}
})
}
})
},
getInfo (id) {
this.instance.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
this.communityInfo = res.data.riskDisposalList.filter(v => !!v.communityHandleType).length ? res.data.riskDisposalList.filter(v => !!v.communityHandleType)[0] : {}
this.info.riskDisposalList = res.data.riskDisposalList.filter(v => !v.communityHandleType)
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>