健康上报

This commit is contained in:
shijingjing
2022-10-10 15:28:59 +08:00
parent 4984f4bbce
commit 18525d7f45
6 changed files with 46 additions and 58 deletions

View File

@@ -186,10 +186,6 @@ export default {
...mapState(['user']) ...mapState(['user'])
}, },
// onShow() {
// this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','epidemicVaccineTime']).then(()=> {})
// },
onLoad(query) { onLoad(query) {
this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','EP_vaccinationCount']).then(()=> { this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','EP_vaccinationCount']).then(()=> {
this.form.reportUserId = query.id this.form.reportUserId = query.id
@@ -247,9 +243,8 @@ export default {
this.$loading() this.$loading()
this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/addReportInfo`, { this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/addReportInfo`, {
...this.form, ...this.form,
// openid: this.user.openid, jkmUrl: this.form.jkmUrlArr[0].url,
jkmUrl: this.form.jkmUrlArr.toString(), nucleicAcidUrl: this.form.nucleicAcidUrlArr[0].url,
nucleicAcidUrl: this.form.nucleicAcidUrlArr.toString(),
nucleicAcidDate: this.form.nucleicAcidDate + ' 00:00:00' nucleicAcidDate: this.form.nucleicAcidDate + ' 00:00:00'
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {

View File

@@ -138,9 +138,8 @@ export default {
this.$toast('提交成功') this.$toast('提交成功')
uni.$emit('update') uni.$emit('update')
setTimeout(() => { setTimeout(() => {
// ?id=${res.data.id}
uni.redirectTo({ uni.redirectTo({
url: `./Result` url: `./Result?id=${res.data.id}&name=${res.data.name}&idNumber=${res.data.idNumber}`
}) })
}, 400) }, 400)
} }

View File

@@ -13,14 +13,14 @@
<div class="item-top"> <div class="item-top">
<div class="item-top__left"> <div class="item-top__left">
<h2>{{ item.name }}</h2> <h2>{{ item.name }}</h2>
<p @click.stop="$linkTo('./UserInfo?id=' + item.id)" hover-class="text-hover">查看个人信息></p> <!-- <p @click.stop="$linkTo('./UserInfo?id=' + item.id)" hover-class="text-hover">查看个人信息></p> -->
</div> </div>
<span v-if="item.status === '0'">健康数据异常</span> <span v-if="item.status === '1'">健康数据异常</span>
</div> </div>
<div class="item-bottom"> <div class="item-bottom">
<div class="item-bottom__left"> <div class="item-bottom__left">
<span>健康上报第</span> <span>健康上报第</span>
<i>{{ item.searchCount || 0 }}</i> <i>{{ item.reportCount || 0 }}</i>
<span></span> <span></span>
</div> </div>
<div class="item-bottom__right" hover-class="text-hover" v-if="!item.todayReport" <div class="item-bottom__right" hover-class="text-hover" v-if="!item.todayReport"

View File

@@ -15,7 +15,7 @@
<label>14天内是否接触新冠确诊或疑似患者</label> <label>14天内是否接触新冠确诊或疑似患者</label>
</div> </div>
<div class="right"> <div class="right">
<span :style="{color: info.touchInFourteen === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicTouchInFourteen', info.touchInFourteen) }}</span> <span :style="{color: info.contactPatients === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicTouchInFourteen', info.contactPatients) }}</span>
</div> </div>
</div> </div>
<div class="detail-info__item"> <div class="detail-info__item">
@@ -23,7 +23,7 @@
<label>当前健康状况</label> <label>当前健康状况</label>
</div> </div>
<div class="right"> <div class="right">
<span :style="{color: !info.isHealth ? '#42D784' : '#FF4466'}">{{ info.healthName }}</span> <span :style="{color: info.health == 0 ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('EP_healthType', info.health) }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -34,7 +34,7 @@
<label>核酸检测日期</label> <label>核酸检测日期</label>
</div> </div>
<div class="right"> <div class="right">
<span>{{ info.checkTime.split(' ')[0] }}</span> <span>{{ info.nucleicAcidDate && info.nucleicAcidDate.substr(0, info.nucleicAcidDate.length - 8 ) }}</span>
</div> </div>
</div> </div>
<div class="detail-info__item"> <div class="detail-info__item">
@@ -42,7 +42,7 @@
<label>核酸检测结果</label> <label>核酸检测结果</label>
</div> </div>
<div class="right"> <div class="right">
<span :style="{color: info.checkResult === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicRecentTestResult', info.checkResult) }}</span> <span :style="{color: info.nucleicAcidResult === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('EP_nucleicAcidResult', info.nucleicAcidResult) }}</span>
</div> </div>
</div> </div>
<div class="detail-info__item"> <div class="detail-info__item">
@@ -50,7 +50,7 @@
<label>健康码状态</label> <label>健康码状态</label>
</div> </div>
<div class="right"> <div class="right">
<span :style="{color: info.healthCode === '0' || info.healthCode === '1' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicHealthCode', info.healthCode) }}</span> <span :style="{color: info.jkmType == 0 || info.jkmType == 1? '#42D784' : '#FF4466'}">{{ $dict.getLabel('EP_jkmType', info.jkmType) }}</span>
</div> </div>
</div> </div>
<div class="detail-info__item"> <div class="detail-info__item">
@@ -58,15 +58,23 @@
<label>已接种疫苗次数</label> <label>已接种疫苗次数</label>
</div> </div>
<div class="right"> <div class="right">
<span>{{ $dict.getLabel('epidemicVaccineTime', info.vaccine) }}</span> <span>{{ $dict.getLabel('EP_vaccinationCount', info.vaccinationCount) }}</span>
</div> </div>
</div> </div>
<div class="detail-info__item detail-info__item--img"> <div class="detail-info__item detail-info__item--img" v-if="info.jkmUrl">
<div class="left"> <div class="left">
<label>本人健康码截图</label> <label>本人健康码截图</label>
</div> </div>
<div class="right"> <div class="right">
<image :src="item.url" @click="preview(item.url)" v-for="(item, index) in info.checkPhoto" :key="index" /> <img :src="info.jkmUrl" @click="preview(info.jkmUrl)" />
</div>
</div>
<div class="detail-info__item detail-info__item--img" v-if="info.nucleicAcidUrl">
<div class="left">
<label>本人核酸检测结果截图</label>
</div>
<div class="right">
<img :src="info.nucleicAcidUrl" @click="preview(info.nucleicAcidUrl)" />
</div> </div>
</div> </div>
</div> </div>
@@ -79,13 +87,15 @@
data () { data () {
return { return {
info: {}, info: {},
pageShow: false pageShow: false,
jkmUrlArr: [],
nucleicAcidUrlArr: [],
} }
}, },
onLoad (query) { onLoad (query) {
this.$loading() this.$loading()
this.$dict.load(['epidemicTouchInFourteen', 'epidemicRecentHealth', 'epidemicRecentTestResult', 'epidemicHealthCode', 'epidemicVaccineTime']).then(() => { this.$dict.load(['epidemicTouchInFourteen', 'EP_healthType', 'EP_nucleicAcidResult', 'EP_jkmType', 'EP_vaccinationCount']).then(() => {
this.getInfo(query.id) this.getInfo(query.id)
}) })
}, },
@@ -93,32 +103,22 @@
methods: { methods: {
preview (url) { preview (url) {
uni.previewImage({ uni.previewImage({
urls: this.info.checkPhoto.map(v => v.url), urls: [url],
current: url current: url
}) })
}, },
getInfo (id) { getInfo (id) {
this.$instance.post(`/app/appepidemichealthreport/queryDetailById?id=${id}`).then(res => { this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.info = res.data this.info = res.data
this.info.checkPhoto = JSON.parse(res.data.checkPhoto) this.jkmUrlArr.push({url: res.data.jkmUrl})
let healthName = '' this.nucleicAcidUrlArr = [res.data.nucleicAcidUrl]
this.info.isHealth = false
res.data.health.split(',').forEach(v => {
if (v > 0) {
this.info.isHealth = true
}
healthName = healthName + this.$dict.getLabel('epidemicRecentHealth', v)
})
this.info.healthName = healthName
this.$nextTick(() => {
this.pageShow = true this.pageShow = true
})
}
this.$hideLoading() this.$hideLoading()
} else {
this.$loading()
}
}) })
}, },

View File

@@ -4,7 +4,7 @@
hover-class="bg-hover"> hover-class="bg-hover">
<div class="left">{{ item.createTime.split(' ')[0] }}的健康上报</div> <div class="left">{{ item.createTime.split(' ')[0] }}的健康上报</div>
<div class="right"> <div class="right">
<i v-if="item.status === '0'">健康数据异常</i> <i v-if="item.status == 1">健康数据异常</i>
<u-icon name="arrow-right" color="#ddd"/> <u-icon name="arrow-right" color="#ddd"/>
</div> </div>
</div> </div>
@@ -33,29 +33,18 @@ export default {
methods: { methods: {
getList(query) { getList(query) {
if (this.isMore) return if (this.isMore) return
this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/list?reportUserId=${query.id}`, null, {
this.$instance.post(`/app/appepidemichealthreport/list?memberId=${query.id}`, null, {
params: { params: {
current: this.current, current: this.current,
size: 15 size: 10
} }
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.total = res.data.total this.total = res.data.total
if (this.current > 1) { this.list = this.current == 1? res.data.records:[...this.list, ...res.data.records]
this.list = [...this.list, ...res.data.records]
} else {
this.list = res.data.records
}
uni.hideLoading() uni.hideLoading()
this.pageShow = true this.pageShow = true
if (res.data.records.length < 15) {
this.isMore = true this.isMore = true
return false
}
this.current = this.current + 1
} else { } else {
uni.hideLoading() uni.hideLoading()
} }
@@ -66,6 +55,7 @@ export default {
}, },
onReachBottom() { onReachBottom() {
this.current ++
this.getList() this.getList()
} }
} }

View File

@@ -11,12 +11,16 @@
export default { export default {
data () { data () {
return { return {
id: '' id: '',
name: '',
idNumber: '',
} }
}, },
onLoad (query) { onLoad (query) {
this.id = query.id this.id = query.id
this.name = query.name
this.idNumber = query.idNumber
}, },
methods: { methods: {
@@ -28,7 +32,7 @@
toReport () { toReport () {
uni.redirectTo({ uni.redirectTo({
url: `./AddReport?id=${this.id}` url: `./AddReport?id=${this.id}&name=${this.name}&idNumber=${this.idNumber}`
}) })
} }
} }