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

271 lines
6.6 KiB
Vue
Raw Normal View History

2022-01-10 14:16:05 +08:00
<template>
2022-01-10 15:05:53 +08:00
<div class="HealthDetail">
2022-01-11 19:18:22 +08:00
<div class="top">
2022-01-10 15:05:53 +08:00
<div class="templates">
2022-01-11 19:18:22 +08:00
<img :src="userList.avatar" alt="" v-if="userList.avatar" />
2022-01-12 17:39:47 +08:00
<img src="./components/img/user-img.png" alt="" v-else />
2022-01-10 15:05:53 +08:00
<div class="rightCont">
<div class="rightContLeft">
<div class="nameLeft">
<div class="nameTop">
2022-01-11 19:18:22 +08:00
<div class="names">{{ userList.name }}</div>
<div class="types" v-if="userList.status == '0'">异常</div>
2022-01-10 15:05:53 +08:00
</div>
<div class="nameBottom">
<span>上报第</span>
2022-01-12 14:39:46 +08:00
<span class="num">{{ diffNum }}</span>
2022-01-10 15:05:53 +08:00
<span></span>
</div>
</div>
</div>
2022-01-11 19:18:22 +08:00
<div class="rightContRight" @click.stop="callPhone(userList.phone)">
2022-01-10 15:05:53 +08:00
<img src="./components/img/phone2@.png" alt="" />
<span class="call">拨打电话</span>
</div>
</div>
</div>
</div>
<div class="middle">
<div class="record">异常情况记录</div>
2022-01-11 19:18:22 +08:00
<template v-if="data.length">
<div class="templatess" v-for="(item, i) in data" :key="i" @click="toUserDetail(item)">
2022-01-10 15:05:53 +08:00
<div class="left">
2022-01-11 19:18:22 +08:00
<div class="recordType recordType1" v-if="item.status == 1">正常</div>
<div class="recordType recordType2" v-if="item.status == 0">异常</div>
2022-01-10 15:05:53 +08:00
</div>
<div class="right">
2022-01-13 11:51:11 +08:00
<div class="times">{{ item.createTime }}</div>
2022-01-10 15:05:53 +08:00
<u-icon name="arrow-right" color="#CCCCCC"></u-icon>
</div>
</div>
</template>
2022-01-11 19:18:22 +08:00
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
2022-01-10 15:05:53 +08:00
</div>
2022-01-27 16:45:30 +08:00
<div class="fixedBtn" @click="toErr" v-if="userList.status == '0'">异常情况处理</div>
<!-- && today == '1' -->
2022-01-10 15:05:53 +08:00
</div>
2022-01-10 14:16:05 +08:00
</template>
<script>
2022-01-10 15:28:18 +08:00
import { mapState } from 'vuex'
2022-01-10 14:16:05 +08:00
export default {
name: 'HealthDetail',
components: {},
props: {},
data() {
2022-01-10 15:05:53 +08:00
return {
data: [],
2022-01-11 15:56:08 +08:00
id: '',
2022-01-11 19:18:22 +08:00
name: '',
userList: [],
2022-01-12 14:39:46 +08:00
diffNum: '',
2022-01-13 11:31:03 +08:00
today: '',
2022-01-13 14:52:28 +08:00
size: 10,
current: 1,
2022-01-10 15:05:53 +08:00
}
2022-01-10 14:16:05 +08:00
},
2022-01-10 15:28:18 +08:00
computed: {
...mapState(['user']),
},
2022-01-10 14:16:05 +08:00
watch: {},
2022-01-11 15:56:08 +08:00
onLoad(o) {
2022-01-11 19:18:22 +08:00
console.log(o)
2022-01-11 15:56:08 +08:00
if (o.id) {
2022-01-11 19:18:22 +08:00
this.name = o.name
2022-01-11 15:56:08 +08:00
this.id = o.id
2022-01-11 19:18:22 +08:00
this.phone = o.phone
2022-01-12 14:39:46 +08:00
this.diffNum = o.diffNum
2022-01-13 11:31:03 +08:00
this.today = o.today
2022-01-11 19:18:22 +08:00
this.getUser()
2022-01-11 15:56:08 +08:00
}
this.getRecord()
2022-01-11 19:18:22 +08:00
2022-01-17 18:31:00 +08:00
uni.$on('updateDetails', () => {
2022-01-12 14:27:58 +08:00
this.getUser()
2022-01-11 19:18:22 +08:00
this.getRecord()
})
2022-01-11 15:56:08 +08:00
},
onShow() {
2022-01-12 17:39:47 +08:00
document.title = '健康上报'
2022-01-11 15:56:08 +08:00
},
2022-01-10 15:05:53 +08:00
methods: {
2022-01-11 19:18:22 +08:00
getUser() {
2022-01-12 18:29:17 +08:00
this.$http.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.userList = res.data
}
})
2022-01-11 15:56:08 +08:00
},
getRecord() {
2022-01-13 14:52:28 +08:00
this.$http
.post(`/app/appepidemichealthreport/list`, null, {
params: {
memberId: this.id,
size: this.size,
current: this.current,
},
})
.then((res) => {
if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
}
})
2022-01-11 15:56:08 +08:00
},
2022-01-11 19:18:22 +08:00
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
toUserDetail(item) {
2022-01-10 15:05:53 +08:00
uni.navigateTo({
2022-01-13 14:12:38 +08:00
url: `./UserDetail?id=${item.id}&temperature=${item.temperature}&touchInFourteen=${item.touchInFourteen}&health=${item.health}&checkTime=${item.checkTime}&checkResult=${item.checkResult}&checkPhoto=${item.checkPhoto}&status=${item.status}&memberId=${this.id}&vaccine=${item.vaccine}&healthCode=${item.healthCode}&releaseName=${this.userList.releaseName ? this.userList.releaseName : ''}&releaseTime=${this.userList.releaseTime ? this.userList.releaseTime : ''}&statuses=${this.userList.status}`,
2022-01-10 15:05:53 +08:00
})
},
toErr() {
uni.navigateTo({
2022-01-11 19:18:22 +08:00
url: `./ErrorDetail?id=${this.id}`,
2022-01-10 15:05:53 +08:00
})
},
},
2022-01-13 14:52:28 +08:00
onReachBottom() {
this.current++
this.getRecord()
},
2022-01-10 14:16:05 +08:00
}
</script>
<style scoped lang="scss">
2022-01-14 14:27:40 +08:00
uni-page-body {
height: 100%;
}
2022-01-10 14:16:05 +08:00
.HealthDetail {
2022-01-11 19:18:22 +08:00
height: 100%;
2022-01-14 14:27:40 +08:00
background: #f5f5f5 !important;
2022-01-10 15:05:53 +08:00
.top {
.templates {
display: flex;
align-items: center;
padding: 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
background: #fff;
img {
width: 128px;
height: 128px;
// border-radius: 50%;
// border: 1px solid #cccccc;
}
.rightCont {
display: flex;
justify-content: space-between;
margin-left: 32px;
width: 100%;
.rightContLeft {
// display: flex;
// justify-content: space-between;
// align-items: center;
// width: 100%;
.nameLeft {
.nameTop {
display: flex;
.names {
font-size: 32px;
font-weight: 500;
color: #333333;
}
.types {
margin-left: 16px;
padding: 4px 16px 8px 16px;
background: #faeceb;
border-radius: 20px;
font-size: 24px;
color: #cd413a;
}
}
.nameBottom {
margin-top: 12px;
font-size: 28px;
color: #999999;
.num {
color: #135ab8;
}
}
}
}
.rightContRight {
display: flex;
flex-direction: column;
align-items: center;
width: 25%;
img {
width: 64px;
height: 64px;
}
.call {
font-size: 24px;
color: #3d94fb;
}
}
}
}
}
.middle {
margin-top: 16px;
background: #fff;
.record {
padding: 26px 0 26px 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
}
.templatess {
display: flex;
justify-content: space-between;
padding: 28px 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
.left,
.right {
display: flex;
.recordType {
font-size: 28px;
font-weight: 500;
}
.recordType1 {
color: #5aad6a;
}
.recordType2 {
color: #cd413a;
}
}
}
.emptyWrap {
background: #f5f5f5;
margin-top: 0 !important;
}
}
.fixedBtn {
position: fixed;
bottom: 0;
width: 100%;
padding: 34px 0;
text-align: center;
background: #1365dd;
box-sizing: border-box;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
2022-01-10 14:16:05 +08:00
}
</style>