健康上报

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>