Files
dvcp_v2_wxcp_app/src/apps/AppEpidemicSituation/UserDetail.vue

213 lines
5.9 KiB
Vue
Raw Normal View History

2022-01-10 15:05:53 +08:00
<template>
2022-01-10 15:14:41 +08:00
<div class="UserDetail">
2022-01-10 15:28:18 +08:00
<div class="info">
<div class="title">基本信息</div>
<div class="item-flex">
<div class="label">姓名</div>
2022-01-11 19:18:22 +08:00
<div class="value">{{ data.data }}</div>
2022-01-10 15:28:18 +08:00
</div>
<div class="item-flex">
<div class="label">身份证号</div>
2022-01-11 19:18:22 +08:00
<div class="value">{{ data.idNumber }}</div>
2022-01-10 15:28:18 +08:00
</div>
<div class="item-flex">
<div class="label">联系方式</div>
<div class="value" style="color: #4181ff">
2022-01-11 19:18:22 +08:00
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(data.phone)" class="phone-icon" />
{{ data.phone }}
2022-01-10 15:28:18 +08:00
</div>
</div>
<div class="item-flex">
2022-01-11 19:18:22 +08:00
<div class="label">本地地区</div>
<div class="value">{{ data.areaName }}</div>
</div>
<div class="item-flex">
<div class="label">本地地址</div>
<div class="value">{{ data.address }}</div>
2022-01-10 15:28:18 +08:00
</div>
</div>
2022-01-10 15:14:41 +08:00
2022-01-10 15:28:18 +08:00
<div class="line-bg"></div>
<div class="info">
<div class="title">健康状况</div>
<div class="item-flex">
<div class="label">当前体温</div>
2022-01-11 19:18:22 +08:00
<div class="value temperature" :style="{ color: userList.temperature * 1 > 38 ? '#FF4466' : '#42D784' }">{{ userList.temperature }}</div>
2022-01-10 15:28:18 +08:00
</div>
<div class="item-flex">
<div class="label" style="width: 360px">14天内是否接触新冠确诊或疑似患者</div>
2022-01-11 19:18:22 +08:00
<div class="value" :style="userList.touchInFourteen == 1 ? 'color:#f46;' : 'color:#42D784;'">{{ $dict.getLabel('epidemicTouchInFourteen', userList.touchInFourteen) }}</div>
2022-01-10 15:28:18 +08:00
</div>
<div class="item-flex">
<div class="label">当前健康状况</div>
2022-01-11 19:18:22 +08:00
<div class="value" v-for="(item, index) in userList.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''">{{ $dict.getLabel('epidemicRecentHealth', item) }}</div>
2022-01-10 15:14:41 +08:00
</div>
</div>
2022-01-10 15:28:18 +08:00
<div class="line-bg"></div>
<div class="info">
<div class="title">核酸检测信息</div>
<div class="item-flex">
<div class="label">核酸检测日期</div>
2022-01-11 19:18:22 +08:00
<div class="value">{{ userList.checkTime }}</div>
2022-01-10 15:28:18 +08:00
</div>
2022-01-12 13:59:35 +08:00
2022-01-10 15:28:18 +08:00
<div class="item-flex">
<div class="label">核酸检测结果</div>
2022-01-11 19:18:22 +08:00
<div class="value" :style="userList.checkResult == 1 ? 'color:#f46;' : 'color:#42D784;'">{{ $dict.getLabel('epidemicRecentTestResult', userList.checkResult) }}</div>
2022-01-10 15:28:18 +08:00
</div>
2022-01-12 13:59:35 +08:00
<div class="item-flex">
<div class="label">健康码</div>
<div class="value" :style="{ color: userList.healthCode == '3' ? '#FF4466 ' : '' }">{{ $dict.getLabel('epidemicHealthCode', userList.healthCode) }}</div>
</div>
<div class="item-flex">
<div class="label">已接种试剂</div>
<div class="value">{{ userList.vaccine }}</div>
</div>
2022-01-10 15:28:18 +08:00
<div class="item-flex">
<div style="color: #999">本人健康码截图或核酸检测报告</div>
</div>
<div class="img-list">
2022-01-11 19:18:22 +08:00
<img :src="item.url" alt="" v-for="(item, index) in userList.checkPhoto" :key="index" @click="previewImage(userList.checkPhoto, item.url)" />
2022-01-10 15:28:18 +08:00
</div>
</div>
2022-01-10 15:14:41 +08:00
</div>
2022-01-10 15:05:53 +08:00
</template>
<script>
2022-01-10 15:28:18 +08:00
import { mapState } from 'vuex'
2022-01-10 15:05:53 +08:00
export default {
name: 'UserDetail',
components: {},
props: {},
data() {
2022-01-11 15:56:08 +08:00
return {
id: '',
2022-01-11 19:18:22 +08:00
userList: {},
data: [],
2022-01-11 15:56:08 +08:00
}
},
2022-01-12 14:04:35 +08:00
computed: {
...mapState(['user']),
},
2022-01-11 19:18:22 +08:00
onLoad(o) {
console.log(o)
2022-01-12 13:59:35 +08:00
this.$dict.load('epidemicMemberType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth', 'epidemicHealthCode').then(() => {
2022-01-11 19:18:22 +08:00
this.id = o.id
this.userList = o
this.userList.checkPhoto = JSON.parse(o.checkPhoto)
this.userList.health = o.health.split(',')
this.getUser()
})
},
2022-01-11 15:56:08 +08:00
onShow() {
document.title = '健康监测'
},
methods: {
2022-01-11 19:18:22 +08:00
getUser() {
2022-01-11 15:56:08 +08:00
this.$loading()
this.$http
2022-01-11 19:18:22 +08:00
.post(`/app/appepidemicreportmember/queryDetailById?id=${this.userList.memberId}`)
2022-01-11 15:56:08 +08:00
.then((res) => {
if (res?.code == 0) {
2022-01-11 19:18:22 +08:00
this.data = res.data
2022-01-11 15:56:08 +08:00
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
2022-01-11 19:18:22 +08:00
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
2022-01-10 15:05:53 +08:00
},
}
</script>
<style scoped lang="scss">
.UserDetail {
2022-01-10 17:08:12 +08:00
background: #f3f6f9;
2022-01-10 15:28:18 +08:00
.info {
background-color: #fff;
padding: 0 32px;
.title {
line-height: 116px;
background: #fff;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
2022-01-10 15:14:41 +08:00
font-weight: 600;
2022-01-10 15:28:18 +08:00
color: #333;
2022-01-10 15:14:41 +08:00
}
2022-01-10 15:28:18 +08:00
.item-flex {
padding: 34px 0;
border-bottom: 1px solid #ddd;
display: flex;
justify-content: space-between;
line-height: 44px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
.label {
width: 206px;
color: #999;
}
.value {
width: calc(100% - 206px);
word-break: break-all;
color: #333;
text-align: right;
.phone-icon {
width: 40px;
height: 40px;
vertical-align: middle;
margin-right: 8px;
}
}
}
.img-list {
2022-01-10 17:08:12 +08:00
padding-bottom: 48px;
2022-01-10 15:28:18 +08:00
img {
width: 320px;
height: 320px;
}
2022-01-10 15:14:41 +08:00
}
2022-01-10 15:28:18 +08:00
.item-flex:nth-last-of-type(1) {
border-bottom: 0;
}
}
.line-bg {
width: 100%;
height: 24px;
background-color: #f3f6f9;
}
.footer {
width: 100%;
height: 112px;
line-height: 112px;
background: #1365dd;
box-shadow: inset 0px 1px 0px 0px #eeeeee;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
text-align: center;
2022-01-10 15:14:41 +08:00
}
2022-01-10 15:05:53 +08:00
}
</style>