健康上报

This commit is contained in:
花有清香月有阴
2022-01-11 19:18:22 +08:00
parent 8286eb2052
commit 1cee4e9289
4 changed files with 209 additions and 144 deletions

View File

@@ -1,34 +1,40 @@
<template>
<div class="ErrorDetail">
<div class="header">
<div class="name">李维民<span>15220171897</span><img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone('112')" class="phone-icon" /></div>
<div class="name">
{{ userList.name }}<span>{{ userList.phone }}</span
><img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(userList.phone)" class="phone-icon" />
</div>
<p>身份证号</p>
<p class="mar-b8" style="color: #333">4223241900****0014</p>
<p class="mar-b8" style="color: #333">{{ userList.idNumber && userList.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1******$2') }}</p>
<p>异常情况</p>
<p style="color: #ff4466">体温38有咳嗽 , 未去高风险区域</p>
<div v-if="data.length">
<p style="color: #ff4466" v-for="(item, index) in data" :key="index" v-if="item.status == '0'">{{ $dict.getLabel('epidemicRecentHealth', item) }}</p>
</div>
<p style="color: #333">暂无异常情况</p>
</div>
<div class="info">
<div class="title">异常情况记录</div>
<div class="error-list">
<div class="item">
<p>于2022年1月7日早上10:00自测体温38家人也有咳嗽情况初步诊断为上呼吸道感染</p>
<div>2021-12-06 13:23<span>网格员: 李依云</span></div>
</div>
<div class="item">
<p>于2022年1月7日早上10:00自测体温38家人也有咳嗽情况初步诊断为上呼吸道感染</p>
<div>2021-12-06 13:23<span>网格员: 李依云</span></div>
</div>
<div class="item">
<p>于2022年1月7日早上10:00自测体温38家人也有咳嗽情况初步诊断为上呼吸道感染</p>
<div>2021-12-06 13:23<span>网格员: 李依云</span></div>
<div v-if="data.length">
<div class="item" v-for="(item, i) in data" :key="i" v-if="item.status == '0' && data.length">
<p>{{ item.content }}</p>
<div>{{ item.checkTime }}<span>网格员: 李依云</span></div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
</div>
<div class="bg-line"></div>
<div class="footer">
<div class="add" @click="show = true">新增记录</div>
<div class="confirm">解除异常</div>
</div>
<u-popup v-model="show" mode="bottom">
<div class="textarea">
<u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="异常情况记录" :clearable="false" />
@@ -52,16 +58,113 @@ export default {
return {
show: false,
value: '',
userList: [],
data: [],
}
},
computed: {
...mapState(['user']),
},
onLoad() {},
onLoad(o) {
console.log(o)
this.$dict.load('epidemicMemberType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth').then(() => {
if (o) {
this.id = o.id
this.getUser()
this.getRecord()
}
})
},
onShow() {
document.title = '异常情况处理'
},
methods: {},
methods: {
getUser() {
this.$loading()
this.$http
.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`)
.then((res) => {
if (res?.code == 0) {
this.userList = res.data
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
getRecord() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/list?memberId=${this.id}`)
.then((res) => {
if (res?.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
cancel() {
this.$confirm(`是否解除该条异常信息?`).then(() => {
this.$http.post('/app/appepidemicreportmember/release', { id: this.id }).then((res) => {
if (res?.code == 0) {
this.$u.toast('解除成功!')
uni.$emit('updateDetail')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
})
},
confirm() {
if (!this.value) {
return this.$u.toast('请输入异常情况')
}
var params = {
content: this.value,
createUserId: this.user.id,
createUserName: this.user.name,
recordId: this.id,
}
this.$http.post('/app/appepidemicbackhomerecord/release', params).then((res) => {
if (res.code == 0) {
this.$u.toast('新增成功!')
this.show = false
this.value = ''
this.getUser()
this.getRecord()
}
})
},
// getRecord() {
// this.$loading()
// this.$http
// .post(`/app/appepidemicunusuallog/list`)
// .then((res) => {
// if (res?.code == 0) {
// this.$hideLoading()
// } else {
// this.$hideLoading()
// }
// })
// .catch(() => {
// this.$hideLoading()
// })
// },
},
}
</script>

View File

@@ -42,7 +42,7 @@
<div class="line3"></div>
<template v-if="data.length">
<div class="templates" v-for="(item, i) in 10" :key="i" @click="goDetail()">
<div class="templates" v-for="(item, i) in data" :key="i" @click="goDetail(item)">
<img :src="item.avatar" alt="" v-if="item.avatar" />
<img src="./components/img/user-img.png" alt="" v-else />
@@ -50,20 +50,19 @@
<div class="rightContLeft">
<div class="nameLeft">
<div class="nameTop">
<div class="names">李轶</div>
<div class="types">异常</div>
<div class="nucleate">核酸到期</div>
<div class="names">{{ item.name }}</div>
<div class="types" v-if="item == '0'">异常</div>
</div>
<div class="nameBottom">
<span>上报第</span>
<span class="num">3</span>
<span class="num">{{ item.diffNum }}</span>
<span></span>
</div>
</div>
<!-- <div class="typeRight1">今日上报</div> -->
<div class="typeRight2">今日上报</div>
<div class="typeRight2" v-if="item.today == '0'">今日上报</div>
<div class="typeRight1" v-else>今日上报</div>
</div>
<u-icon name="arrow-right" color="#ccc"></u-icon>
@@ -125,7 +124,8 @@ export default {
})
this.$http
.post('/app/appepidemicreportmember/list', null, {
params: { size: 20, current: this.current, areaId: this.areaId, status: this.currentTabs == 1 ? '0' : '' },
params: { size: this.size, current: this.current, status: this.currentTabs == 1 ? '0' : '' },
// areaId: this.areaId, status: this.currentTabs == 1 ? '0' : ''
})
.then((res) => {
if (res?.data) {
@@ -159,9 +159,9 @@ export default {
})
},
goDetail() {
goDetail(item) {
uni.navigateTo({
url: `./HealthDetail`,
url: `./HealthDetail?id=${item.id}`,
})
},
@@ -304,14 +304,6 @@ export default {
font-size: 24px;
color: #cd413a;
}
.nucleate {
margin-left: 8px;
padding: 4px 16px 8px 16px;
background: #fef5e8;
border-radius: 20px;
font-size: 24px;
color: #f5a319;
}
}
.nameBottom {
margin-top: 12px;

View File

@@ -1,28 +1,27 @@
<template>
<div class="HealthDetail">
<div class="top" @click="toUserDetail">
<div class="top">
<div class="templates">
<!-- <img :src="" alt="" v-if='item.avatar'/> -->
<img :src="userList.avatar" alt="" v-if="userList.avatar" />
<img src="./components/img/user-img.png" alt="" />
<div class="rightCont">
<div class="rightContLeft">
<div class="nameLeft">
<div class="nameTop">
<div class="names">李轶</div>
<div class="types">异常</div>
<div class="nucleate">核酸到期</div>
<div class="names">{{ userList.name }}</div>
<div class="types" v-if="userList.status == '0'">异常</div>
</div>
<div class="nameBottom">
<span>上报第</span>
<span class="num">3</span>
<span class="num">{{ userList.diffNum }}</span>
<span></span>
</div>
</div>
</div>
<div class="rightContRight">
<div class="rightContRight" @click.stop="callPhone(userList.phone)">
<img src="./components/img/phone2@.png" alt="" />
<span class="call">拨打电话</span>
</div>
@@ -33,25 +32,24 @@
<div class="middle">
<div class="record">异常情况记录</div>
<template>
<!-- v-if="data.length" -->
<div class="templatess" v-for="(item, i) in 12" :key="i">
<template v-if="data.length">
<div class="templatess" v-for="(item, i) in data" :key="i" @click="toUserDetail(item)">
<div class="left">
<div class="recordType recordType1">正常</div>
<!-- <div class="recordType recordType2">异常</div> -->
<div class="tag">核酸到期</div>
<div class="recordType recordType1" v-if="item.status == 1">正常</div>
<div class="recordType recordType2" v-if="item.status == 0">异常</div>
</div>
<div class="right">
<div class="times">2022-01-10</div>
<div class="times">{{ item.checkTime }}</div>
<u-icon name="arrow-right" color="#CCCCCC"></u-icon>
</div>
</div>
</template>
<!-- <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty> -->
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<!-- v-if="userList.status == '0'" -->
<div class="fixedBtn" @click="toErr">异常情况处理</div>
</div>
</template>
@@ -67,6 +65,8 @@ export default {
return {
data: [],
id: '',
name: '',
userList: [],
}
},
computed: {
@@ -74,24 +74,30 @@ export default {
},
watch: {},
onLoad(o) {
console.log(o)
if (o.id) {
this.name = o.name
this.id = o.id
this.getDetail()
this.phone = o.phone
this.getUser()
}
this.getRecord()
uni.$on('updateDetail', () => {
this.getRecord()
})
},
onShow() {
document.title = '健康监测'
},
methods: {
getDetail() {
getUser() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/list`)
.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`)
.then((res) => {
if (res?.code == 0) {
console.log(res.data)
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.userList = res.data
this.$hideLoading()
} else {
this.$hideLoading()
@@ -105,10 +111,10 @@ export default {
getRecord() {
this.$loading()
this.$http
.post(`/app/appepidemicunusuallog/list`)
.post(`/app/appepidemichealthreport/list?memberId=${this.id}`)
.then((res) => {
if (res?.code == 0) {
console.log(res.data)
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.$hideLoading()
} else {
this.$hideLoading()
@@ -119,15 +125,19 @@ export default {
})
},
toUserDetail() {
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
toUserDetail(item) {
uni.navigateTo({
url: `./UserDetail`,
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}`,
})
},
toErr() {
uni.navigateTo({
url: `./ErrorDetail`,
url: `./ErrorDetail?id=${this.id}`,
})
},
},
@@ -136,6 +146,7 @@ export default {
<style scoped lang="scss">
.HealthDetail {
height: 100%;
padding-bottom: 120px;
background: #f3f6f9;
.top {
@@ -177,14 +188,6 @@ export default {
font-size: 24px;
color: #cd413a;
}
.nucleate {
margin-left: 8px;
padding: 4px 16px 8px 16px;
background: #fef5e8;
border-radius: 20px;
font-size: 24px;
color: #f5a319;
}
}
.nameBottom {
margin-top: 12px;
@@ -240,15 +243,6 @@ export default {
.recordType2 {
color: #cd413a;
}
.tag {
margin-left: 16px;
background: #fef5e8;
border-radius: 20px;
font-size: 24px;
color: #f5a319;
padding: 4px 16px 2px 16px;
}
}
}
.emptyWrap {

View File

@@ -1,35 +1,30 @@
<template>
<div class="UserDetail">
<div class="user-list">
<div class="item">
<h2 class="name">林益丰</h2>
<p class="color-999">420107********3274</p>
<p><img src="./components/img/blue-icon.png" alt="" />湖北省武汉市洪山区</p>
<p><img src="./components/img/org-icon.png" alt="" />重庆市荣昌区</p>
<p><img src="./components/img/time-icon.png" alt="" />2021-12-06 13:23</p>
</div>
</div>
<div class="info">
<div class="title">基本信息</div>
<div class="item-flex">
<div class="label">姓名</div>
<div class="value">陈晨</div>
<div class="value">{{ data.data }}</div>
</div>
<div class="item-flex">
<div class="label">身份证号</div>
<div class="value">422132199412038273</div>
<div class="value">{{ data.idNumber }}</div>
</div>
<div class="item-flex">
<div class="label">联系方式</div>
<div class="value" style="color: #4181ff">
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone('112')" class="phone-icon" />
152738193323
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(data.phone)" class="phone-icon" />
{{ data.phone }}
</div>
</div>
<div class="item-flex">
<div class="label">人员类别</div>
<div class="value" style="color: #42d784">跨省返乡人员</div>
<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>
</div>
</div>
@@ -38,15 +33,15 @@
<div class="title">健康状况</div>
<div class="item-flex">
<div class="label">当前体温</div>
<div class="value temperature">36</div>
<div class="value temperature" :style="{ color: userList.temperature * 1 > 38 ? '#FF4466' : '#42D784' }">{{ userList.temperature }}</div>
</div>
<div class="item-flex">
<div class="label" style="width: 360px">14天内是否接触新冠确诊或疑似患者</div>
<div class="value" style="color: #42d784"></div>
<div class="value" :style="userList.touchInFourteen == 1 ? 'color:#f46;' : 'color:#42D784;'">{{ $dict.getLabel('epidemicTouchInFourteen', userList.touchInFourteen) }}</div>
</div>
<div class="item-flex">
<div class="label">当前健康状况</div>
<div class="value" style="color: #ff4466">感冒症状;乏力咳嗽发烧肌肉痛头痛</div>
<div class="value" v-for="(item, index) in userList.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''">{{ $dict.getLabel('epidemicRecentHealth', item) }}</div>
</div>
</div>
@@ -55,17 +50,17 @@
<div class="title">核酸检测信息</div>
<div class="item-flex">
<div class="label">核酸检测日期</div>
<div class="value">2021-10-19</div>
<div class="value">{{ userList.checkTime }}</div>
</div>
<div class="item-flex">
<div class="label">核酸检测结果</div>
<div class="value" style="color: #42d784">阴性</div>
<div class="value" :style="userList.checkResult == 1 ? 'color:#f46;' : 'color:#42D784;'">{{ $dict.getLabel('epidemicRecentTestResult', userList.checkResult) }}</div>
</div>
<div class="item-flex">
<div style="color: #999">本人健康码截图或核酸检测报告</div>
</div>
<div class="img-list">
<img src="./components/img/time-icon.png" alt="" />
<img :src="item.url" alt="" v-for="(item, index) in userList.checkPhoto" :key="index" @click="previewImage(userList.checkPhoto, item.url)" />
</div>
</div>
</div>
@@ -81,20 +76,32 @@ export default {
data() {
return {
id: '',
userList: {},
data: [],
}
},
onLoad() {},
onLoad(o) {
console.log(o)
this.$dict.load('epidemicMemberType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth').then(() => {
this.id = o.id
this.userList = o
this.userList.checkPhoto = JSON.parse(o.checkPhoto)
this.userList.health = o.health.split(',')
this.getUser()
})
},
onShow() {
document.title = '健康监测'
},
methods: {
getDetail() {
getUser() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/queryDetailById?memberId=${this.id}`)
.post(`/app/appepidemicreportmember/queryDetailById?id=${this.userList.memberId}`)
.then((res) => {
if (res?.code == 0) {
console.log(res.data)
this.data = res.data
this.$hideLoading()
} else {
this.$hideLoading()
@@ -104,6 +111,17 @@ export default {
this.$hideLoading()
})
},
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
},
}
</script>
@@ -111,45 +129,6 @@ export default {
<style scoped lang="scss">
.UserDetail {
background: #f3f6f9;
.user-list {
margin-bottom: 24px;
.item {
padding: 32px;
background-color: #fff;
.name {
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 8px;
.status {
float: right;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #ff4466;
line-height: 40px;
}
}
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 40px;
margin-bottom: 8px;
img {
width: 32px;
height: 32px;
margin-right: 18px;
vertical-align: middle;
}
}
.color-999 {
margin-bottom: 24px;
color: #999;
}
}
}
.info {
background-color: #fff;
padding: 0 32px;
@@ -185,9 +164,6 @@ export default {
margin-right: 8px;
}
}
.temperature {
color: #ff4466;
}
}
.img-list {
padding-bottom: 48px;