This commit is contained in:
liuye
2022-01-12 09:59:40 +08:00
4 changed files with 230 additions and 151 deletions

View File

@@ -1,34 +1,47 @@
<template> <template>
<div class="ErrorDetail"> <div class="ErrorDetail">
<div class="header"> <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">
<p>身份证号</p> {{ userList.name }}<span>{{ userList.phone }}</span
<p class="mar-b8" style="color: #333">4223241900****0014</p> ><img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(userList.phone)" class="phone-icon" />
<p>异常情况</p>
<p style="color: #ff4466">体温38有咳嗽 , 未去高风险区域</p>
</div> </div>
<p>身份证号</p>
<p class="mar-b8" style="color: #333">{{ userList.idNumber && userList.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1******$2') }}</p>
<p>异常情况</p>
<div v-if="datas.length">
<p style="color: #ff4466" v-for="(item, index) in datas" :key="index" v-if="item.health != 0">
<span v-for="(items, index) in item.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''">
{{ $dict.getLabel('epidemicRecentHealth', items) }}
</span>
</p>
</div>
<p style="color: #333" v-else>暂无异常情况</p>
</div>
<div class="info"> <div class="info">
<div class="title">异常情况记录</div> <div class="title">异常情况记录</div>
<div class="error-list"> <div class="error-list">
<div class="item"> <div v-if="data.length">
<p>于2022年1月7日早上10:00自测体温38家人也有咳嗽情况初步诊断为上呼吸道感染</p> <div class="itemes" v-for="(item, i) in data" :key="i">
<div>2021-12-06 13:23<span>网格员: 李依云</span></div> <p>{{ item.content }}</p>
</div> <div>
<div class="item"> <span>{{ item.createTime }}</span>
<p>于2022年1月7日早上10:00自测体温38家人也有咳嗽情况初步诊断为上呼吸道感染</p> <span class="names">网格员: {{ item.createUserName }}</span>
<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>
</div> </div>
</div> </div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
<div class="bg-line"></div> <div class="bg-line"></div>
<div class="footer"> <div class="footer">
<div class="add" @click="show = true">新增记录</div> <div class="add" @click="show = true">新增记录</div>
<div class="confirm">解除异常</div> <div class="confirm" @click="cancel">解除异常</div>
</div> </div>
<u-popup v-model="show" mode="bottom"> <u-popup v-model="show" mode="bottom">
<div class="textarea"> <div class="textarea">
<u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="异常情况记录" :clearable="false" /> <u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="异常情况记录" :clearable="false" />
@@ -36,7 +49,7 @@
</div> </div>
<div class="btn"> <div class="btn">
<span>清空内容</span> <span>清空内容</span>
<span class="confirm">保存</span> <span class="confirm" @click="confirm">保存</span>
</div> </div>
</u-popup> </u-popup>
</div> </div>
@@ -52,16 +65,119 @@ export default {
return { return {
show: false, show: false,
value: '', value: '',
userList: [],
data: [],
datas: [],
} }
}, },
computed: { computed: {
...mapState(['user']), ...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()
this.getErrThing()
}
})
},
onShow() { onShow() {
document.title = '异常情况处理' 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()
})
},
// 异常情况
getErrThing() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/list?memberId=${this.id}&status=0`)
.then((res) => {
if (res?.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.$hideLoading()
} else {
this.$hideLoading()
}
})
.catch(() => {
this.$hideLoading()
})
},
// 异常情况记录
getRecord() {
this.$loading()
this.$http
.post(`/app/appepidemicunusuallog/list?recordId=${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()
})
},
// 新增记录
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/appepidemicunusuallog/addOrUpdate', params).then((res) => {
if (res.code == 0) {
this.$u.toast('新增成功!')
this.show = false
this.value = ''
this.getUser()
this.getRecord()
}
})
},
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)
}
})
})
},
},
} }
</script> </script>
@@ -116,7 +232,7 @@ export default {
line-height: 116px; line-height: 116px;
} }
.error-list { .error-list {
.item { .itemes {
width: 100%; width: 100%;
background: #f4f7fe; background: #f4f7fe;
border-radius: 8px; border-radius: 8px;
@@ -136,7 +252,7 @@ export default {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
color: #666; color: #666;
line-height: 34px; line-height: 34px;
span { span:last-child {
display: inline-block; display: inline-block;
margin-left: 32px; margin-left: 32px;
} }

View File

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

View File

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

View File

@@ -1,35 +1,30 @@
<template> <template>
<div class="UserDetail"> <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="info">
<div class="title">基本信息</div> <div class="title">基本信息</div>
<div class="item-flex"> <div class="item-flex">
<div class="label">姓名</div> <div class="label">姓名</div>
<div class="value">陈晨</div> <div class="value">{{ data.data }}</div>
</div> </div>
<div class="item-flex"> <div class="item-flex">
<div class="label">身份证号</div> <div class="label">身份证号</div>
<div class="value">422132199412038273</div> <div class="value">{{ data.idNumber }}</div>
</div> </div>
<div class="item-flex"> <div class="item-flex">
<div class="label">联系方式</div> <div class="label">联系方式</div>
<div class="value" style="color: #4181ff"> <div class="value" style="color: #4181ff">
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone('112')" class="phone-icon" /> <img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(data.phone)" class="phone-icon" />
152738193323 {{ data.phone }}
</div> </div>
</div> </div>
<div class="item-flex"> <div class="item-flex">
<div class="label">人员类别</div> <div class="label">本地地区</div>
<div class="value" style="color: #42d784">跨省返乡人员</div> <div class="value">{{ data.areaName }}</div>
</div>
<div class="item-flex">
<div class="label">本地地址</div>
<div class="value">{{ data.address }}</div>
</div> </div>
</div> </div>
@@ -38,15 +33,15 @@
<div class="title">健康状况</div> <div class="title">健康状况</div>
<div class="item-flex"> <div class="item-flex">
<div class="label">当前体温</div> <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>
<div class="item-flex"> <div class="item-flex">
<div class="label" style="width: 360px">14天内是否接触新冠确诊或疑似患者</div> <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>
<div class="item-flex"> <div class="item-flex">
<div class="label">当前健康状况</div> <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>
</div> </div>
@@ -55,17 +50,17 @@
<div class="title">核酸检测信息</div> <div class="title">核酸检测信息</div>
<div class="item-flex"> <div class="item-flex">
<div class="label">核酸检测日期</div> <div class="label">核酸检测日期</div>
<div class="value">2021-10-19</div> <div class="value">{{ userList.checkTime }}</div>
</div> </div>
<div class="item-flex"> <div class="item-flex">
<div class="label">核酸检测结果</div> <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>
<div class="item-flex"> <div class="item-flex">
<div style="color: #999">本人健康码截图或核酸检测报告</div> <div style="color: #999">本人健康码截图或核酸检测报告</div>
</div> </div>
<div class="img-list"> <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> </div>
</div> </div>
@@ -81,20 +76,32 @@ export default {
data() { data() {
return { return {
id: '', 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() { onShow() {
document.title = '健康监测' document.title = '健康监测'
}, },
methods: { methods: {
getDetail() { getUser() {
this.$loading() this.$loading()
this.$http this.$http
.post(`/app/appepidemichealthreport/queryDetailById?memberId=${this.id}`) .post(`/app/appepidemicreportmember/queryDetailById?id=${this.userList.memberId}`)
.then((res) => { .then((res) => {
if (res?.code == 0) { if (res?.code == 0) {
console.log(res.data) this.data = res.data
this.$hideLoading() this.$hideLoading()
} else { } else {
this.$hideLoading() this.$hideLoading()
@@ -104,6 +111,17 @@ export default {
this.$hideLoading() this.$hideLoading()
}) })
}, },
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
}, },
} }
</script> </script>
@@ -111,45 +129,6 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.UserDetail { .UserDetail {
background: #f3f6f9; 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 { .info {
background-color: #fff; background-color: #fff;
padding: 0 32px; padding: 0 32px;
@@ -185,9 +164,6 @@ export default {
margin-right: 8px; margin-right: 8px;
} }
} }
.temperature {
color: #ff4466;
}
} }
.img-list { .img-list {
padding-bottom: 48px; padding-bottom: 48px;