健康上报

This commit is contained in:
shijingjing
2022-10-10 10:57:21 +08:00
parent 9038f17227
commit 4984f4bbce
3 changed files with 58 additions and 54 deletions

View File

@@ -48,7 +48,7 @@
<h2>14天内是否接触新冠确诊或疑似患者</h2>
</div>
<div class="form-item__right">
<AiRadio style="width: 100%;" v-model="form.touchInFourteen" dict="epidemicTouchInFourteen"></AiRadio>
<AiRadio style="width: 100%;" v-model="form.contactPatients" dict="epidemicTouchInFourteen"></AiRadio>
</div>
</div>
</div>
@@ -59,7 +59,7 @@
<h2>当前健康状况可多选</h2>
</div>
<div class="form-item__right">
<AiCheckbox style="width: 100%;" v-model="form.health" dict="epidemicRecentHealth"></AiCheckbox>
<AiCheckbox style="width: 100%;" v-model="form.healthList" dict="EP_healthType"></AiCheckbox>
</div>
</div>
</div>
@@ -76,7 +76,7 @@
<div class="form-item__right">
<div class="ai-area" @click="isShowDate = true">
<div class="ai-area__wrapper">
<span class="label" v-if="form.checkTime">{{ form.checkTime }}</span>
<span class="label" v-if="form.nucleicAcidDate">{{ form.nucleicAcidDate }}</span>
<i v-else>请选择</i>
<u-icon name="arrow-right" color="#ddd"/>
</div>
@@ -91,7 +91,7 @@
<h2>核酸检测结果</h2>
</div>
<div class="form-item__right">
<AiRadio style="width: 100%;" v-model="form.checkResult" dict="epidemicRecentTestResult"></AiRadio>
<AiRadio style="width: 100%;" v-model="form.nucleicAcidResult" dict="EP_nucleicAcidResult"></AiRadio>
</div>
</div>
</div>
@@ -102,7 +102,7 @@
<h2>健康码类型</h2>
</div>
<div class="form-item__right">
<AiRadio style="width: 100%;" v-model="form.healthCode" dict="epidemicHealthCode"></AiRadio>
<AiRadio style="width: 100%;" v-model="form.jkmType" dict="EP_jkmType"></AiRadio>
</div>
</div>
</div>
@@ -113,7 +113,7 @@
<h2>已接种疫苗次数</h2>
</div>
<div class="form-item__right">
<AiRadio style="width: 100%;" v-model="form.vaccine" dict="epidemicVaccineTime"></AiRadio>
<AiRadio style="width: 100%;" v-model="form.vaccinationCount" dict="EP_vaccinationCount"></AiRadio>
</div>
</div>
</div>
@@ -124,7 +124,7 @@
<h2>本人健康码截图<span style="color: #999; font-size:14px;font-weight:normal;">(最多9张)</span></h2>
</div>
<div class="form-item__right" style="padding-left: 5px">
<AiUploader v-model="form.checkPhoto" :limit="9" multiple></AiUploader>
<AiUploader valueIsUrl v-model="form.jkmUrlArr" :limit="1"></AiUploader>
</div>
</div>
</div>
@@ -135,7 +135,7 @@
<h2>本人核酸检测结果截图<span style="color: #999; font-size:14px;font-weight:normal;">(最多9张)</span></h2>
</div>
<div class="form-item__right" style="padding-left: 5px">
<AiUploader v-model="form.checkPhoto" :limit="9" multiple></AiUploader>
<AiUploader valueIsUrl v-model="form.nucleicAcidUrlArr" :limit="1"></AiUploader>
</div>
</div>
</div>
@@ -162,16 +162,21 @@ export default {
day: true
},
form: {
reportUserId: '',
name: '',
idNumber: '',
checkPhoto: [],
checkResult: '',
health: '',
healthCode: '',
temperature: '',
vaccine: '',
checkTime: '',
memberId: ''
contactPatients: '',
health: '',
healthList: [],
nucleicAcidDate: '',
nucleicAcidResult: '',
jkmType: '',
vaccinationCount: '',
jkmUrl: '',
jkmUrlArr: [],
nucleicAcidUrl: '',
nucleicAcidUrlArr: [],
}
}
},
@@ -181,72 +186,71 @@ export default {
...mapState(['user'])
},
// onShow() {
// this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','epidemicVaccineTime']).then(()=> {})
// },
onLoad(query) {
this.form.memberId = query.id
this.getInfo(query.id)
this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','EP_vaccinationCount']).then(()=> {
this.form.reportUserId = query.id
this.form.name = query.name
this.form.idNumber = query.idNumber
})
},
methods: {
getInfo(id) {
this.$instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.form.name = res.data.name
this.form.idNumber = res.data.idNumber
this.form.checkTime = res.data.checkTime ? res.data.checkTime.split(' ')[0] : ''
this.form.checkResult = res.data.checkResult || ''
this.form.healthCode = res.data.healthCode || ''
this.form.vaccine = res.data.vaccine || ''
}
this.$hideLoading()
}).catch(() => {
this.$hideLoading()
})
},
onDateChange(e) {
this.form.checkTime = `${e.year}-${e.month}-${e.day}`
this.form.nucleicAcidDate = `${e.year}-${e.month}-${e.day}`
},
submit() {
if (!this.form.temperature) {
return this.$toast('请输入当前体温')
}
if (!this.form.touchInFourteen) {
if (!this.form.contactPatients) {
return this.$toast('请选择14天内是否接触新冠确诊或疑似患者')
}
if (!this.form.health.length) {
if (!this.form.healthList.length) {
return this.$toast('请选择当前健康状况')
} else {
this.form.health = this.form.healthList.toString()
}
if (!this.form.checkTime) {
if(!this.form.nucleicAcidDate) {
return this.$toast('请选择核酸检测日期')
}
if (!this.form.checkResult) {
if (!this.form.nucleicAcidResult) {
return this.$toast('请选择核酸检测结果')
}
if (!this.form.healthCode) {
if (!this.form.jkmType) {
return this.$toast('请选择健康码类型')
}
if (!this.form.vaccine) {
if (!this.form.vaccinationCount) {
return this.$toast('请选择已接种疫苗次数')
}
if (!this.form.checkPhoto.length) {
if (!this.form.jkmUrlArr.length) {
return this.$toast('请上传健康码截图')
}
if (!this.form.nucleicAcidUrlArr.length) {
return this.$toast('请上核酸检测结果截图')
}
this.$loading()
this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/addReportInfo`, {
...this.form,
openid: this.user.openid,
health: this.form.health.join(','),
checkPhoto: JSON.stringify(this.form.checkPhoto),
checkTime: this.form.checkTime + ' 00:00:00'
// openid: this.user.openid,
jkmUrl: this.form.jkmUrlArr.toString(),
nucleicAcidUrl: this.form.nucleicAcidUrlArr.toString(),
nucleicAcidDate: this.form.nucleicAcidDate + ' 00:00:00'
}).then(res => {
if (res.code == 0) {
uni.$emit('update')

View File

@@ -24,7 +24,7 @@
<span></span>
</div>
<div class="item-bottom__right" hover-class="text-hover" v-if="!item.todayReport"
@click.stop="$linkTo('./AddReport?id=' + item.id)">
@click.stop="$linkTo(`./AddReport?id=${item.id}&name=${item.name}&idNumber=${item.idNumber}`)">
<span style="color: #FF883C">今日未上报</span>
<u-icon name="arrow-right" color="#ddd"/>
</div>

View File

@@ -61,7 +61,7 @@
data () {
return {
info: {},
pageShow: false
pageShow: true,
}
},
@@ -72,15 +72,15 @@
methods: {
getInfo (id) {
this.$instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/list?reportUserId=${id}`).then(res => {
if (res.code == 0) {
this.info = res.data
if (res.data.eventStatus > 1) {
this.result = res.data.processList[0]
}
this.$nextTick(() => {
this.pageShow = true
})
// this.$nextTick(() => {
// this.pageShow = true
// })
}
this.$hideLoading()