|
@@ -86,9 +86,11 @@
|
|
|
|
|
|
<script>
|
|
|
import { onMounted, reactive, ref, watchEffect } from 'vue'
|
|
|
+import { assessmentItems } from '../../../data/index'
|
|
|
import { getDate } from '../../../utils/date'
|
|
|
import { getPatientInfo, submitCovidAssessment } from '../../../api/assessments'
|
|
|
import { validateCovid19Answer } from '../../../utils/validate'
|
|
|
+import { savePrescription } from '../../../api/order-covid-exam'
|
|
|
import { Dialog } from 'vant'
|
|
|
import allArea from '../../../utils/area'
|
|
|
import { useRouter } from 'vue-router'
|
|
@@ -132,19 +134,9 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ const from = ref('')
|
|
|
const router = useRouter()
|
|
|
- onMounted(() => {
|
|
|
- const patientId = router.currentRoute.value.params.patientId
|
|
|
- if (patientId !== ':patientId') {
|
|
|
- answer.patientId = patientId
|
|
|
- getPatientInfo(patientId).then((res) => {
|
|
|
- answer.name = res.name
|
|
|
- answer.phone = res.phone
|
|
|
- answer.idcard = res.idcard
|
|
|
- answer.date = getDate()
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
const mFocus = ref(null)
|
|
|
watchEffect(() => {
|
|
|
if (answer.temperature == 2) {
|
|
@@ -165,70 +157,6 @@ export default {
|
|
|
answer.symptoms = []
|
|
|
}
|
|
|
})
|
|
|
- const assessmentItems = [
|
|
|
- {
|
|
|
- key: 1,
|
|
|
- label: '1. 您14天内是否有到过以下地方吗?',
|
|
|
- options: [
|
|
|
- { key: 11, label: '中高风险地区' },
|
|
|
- { key: 12, label: '境外其他国家' },
|
|
|
- { key: 13, label: '新冠肺炎确诊病例社区' },
|
|
|
- { key: 14, label: '都没有' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- key: 2,
|
|
|
- label: '2. 您14天内是否接触过以下地区来的人员吗?',
|
|
|
- options: [
|
|
|
- { key: 21, label: '中高风险地区' },
|
|
|
- { key: 22, label: '境外其他国家' },
|
|
|
- { key: 23, label: '新冠肺炎确诊病例社区' },
|
|
|
- { key: 24, label: '都没有' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- key: 3,
|
|
|
- label: '3. 您14天内是否接触过新型冠状病毒感染者(核酸检测阳性者)吗?',
|
|
|
- options: [
|
|
|
- { key: 31, label: '有' },
|
|
|
- { key: 32, label: '没有' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- key: 4,
|
|
|
- label: '4. 14天内您有无家庭或办公室等小范围出现内2例及以上发热和呼吸道症状的病例?',
|
|
|
- options: [
|
|
|
- { key: 41, label: '有' },
|
|
|
- { key: 42, label: '没有' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- key: 5,
|
|
|
- label: '5. 您14天内是否有发热或咳嗽或感冒等不适?',
|
|
|
- options: [
|
|
|
- {
|
|
|
- key: 51,
|
|
|
- label: '有',
|
|
|
- children: [
|
|
|
- { key: 511, label: '发热' },
|
|
|
- { key: 512, label: '咳嗽' },
|
|
|
- { key: 513, label: '乏力' },
|
|
|
- { key: 514, label: '腹泻/呕吐' },
|
|
|
- ],
|
|
|
- },
|
|
|
- { key: 52, label: '没有' },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- key: 6,
|
|
|
- label: '6. 您的健康码颜色是什么?',
|
|
|
- options: [
|
|
|
- { key: 61, label: '绿色', color: 'green' },
|
|
|
- { key: 62, label: '黄色', color: 'orange' },
|
|
|
- { key: 63, label: '红色', color: 'red' },
|
|
|
- ],
|
|
|
- },
|
|
|
- ]
|
|
|
const submit = () => {
|
|
|
const message = validateCovid19Answer(answer)
|
|
|
if (message === '') {
|
|
@@ -237,7 +165,15 @@ export default {
|
|
|
title: '提示',
|
|
|
message: '提交成功!',
|
|
|
}).then(() => {
|
|
|
- if (answer.patientId) {
|
|
|
+ if (answer.patientId && from.value !== '') {
|
|
|
+ if (from.value === 'register') {
|
|
|
+ router.push('/payAppointmentFee')
|
|
|
+ } else {
|
|
|
+ savePrescription(answer.patientId).then(() => {
|
|
|
+ router.push(`/unPaidList/${answer.patientId}`)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
router.go(-1)
|
|
|
}
|
|
|
})
|
|
@@ -249,6 +185,21 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ const patientId = router.currentRoute.value.params.patientId
|
|
|
+ from.value = router.currentRoute.value.params.from
|
|
|
+ if (patientId && patientId !== ':patientId') {
|
|
|
+ answer.patientId = patientId
|
|
|
+ getPatientInfo(patientId).then((res) => {
|
|
|
+ answer.name = res.name
|
|
|
+ answer.phone = res.phone
|
|
|
+ answer.idcard = res.idcard
|
|
|
+ answer.date = getDate()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
return {
|
|
|
mFocus,
|
|
|
areaList,
|