|
@@ -1,19 +1,19 @@
|
|
|
<template>
|
|
|
<window-size>
|
|
|
- <van-field v-model="socialNo" label="身份证号" placeholder="请输入要查询的身份证号">
|
|
|
+ <van-field v-model="socialNo" label="身份证号" placeholder="请输入要查询的身份证号" clearable>
|
|
|
<template #button>
|
|
|
<van-button size="small" type="primary" @click="startQuery">查询</van-button>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
<div style="height: 5px"></div>
|
|
|
- <div v-for="(item, index) in list" :key="index">
|
|
|
+ <div v-for="(item, index) in covidExamIndexes" :key="index">
|
|
|
<van-cell
|
|
|
:title="item.aply_CTNT"
|
|
|
:label="item.ordr_CREATE_DATE"
|
|
|
:value="filterType(item.patient_TYPE, item.ptnt_ID)"
|
|
|
is-link
|
|
|
center
|
|
|
- :to="'/checkExamDetail/' + item.ordr_ID"
|
|
|
+ :to="'/checkExamDetail/' + item.ordr_ID + '/' + item.ptnt_ID + '/' + item.patient_TYPE"
|
|
|
></van-cell>
|
|
|
</div>
|
|
|
</window-size>
|
|
@@ -21,17 +21,21 @@
|
|
|
|
|
|
<script>
|
|
|
import { onMounted, ref } from 'vue'
|
|
|
-import { checkIndexBySocialNo } from '../../../api/check-exam'
|
|
|
+import { checkCovidExamIndexBySocialNo } from '../../../api/check-exam'
|
|
|
import { Toast } from 'vant'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { getPatientInfo } from '../../../api/assessments'
|
|
|
+import { computed } from '@vue/reactivity'
|
|
|
+import store from '../../../store'
|
|
|
|
|
|
export default {
|
|
|
setup() {
|
|
|
const router = useRouter()
|
|
|
const patientId = router.currentRoute.value.params.patientId
|
|
|
const socialNo = ref(null)
|
|
|
- const list = ref([])
|
|
|
+ const covidExamIndexes = computed(() => {
|
|
|
+ return store.state.covidExamIndexes
|
|
|
+ })
|
|
|
const startQuery = () => {
|
|
|
if (!socialNo.value) {
|
|
|
Toast({
|
|
@@ -39,19 +43,24 @@ export default {
|
|
|
position: 'top',
|
|
|
})
|
|
|
} else {
|
|
|
- checkIndexBySocialNo(socialNo.value).then((res) => {
|
|
|
- list.value = res
|
|
|
+ checkCovidExamIndexBySocialNo(socialNo.value).then((res) => {
|
|
|
+ store.commit('SET_COVIDEXAMIDCARD', socialNo.value)
|
|
|
+ store.commit('SET_COVIDEXAMINDEXES', res)
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
- getPatientInfo(patientId).then((res) => {
|
|
|
- socialNo.value = res.idcard
|
|
|
- })
|
|
|
+ if (covidExamIndexes.value.length === 0) {
|
|
|
+ getPatientInfo(patientId).then((res) => {
|
|
|
+ socialNo.value = res.idcard
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ socialNo.value = store.state.covidExamIdCard
|
|
|
+ }
|
|
|
})
|
|
|
return {
|
|
|
socialNo,
|
|
|
- list,
|
|
|
+ covidExamIndexes,
|
|
|
startQuery,
|
|
|
filterType,
|
|
|
}
|
|
@@ -68,4 +77,4 @@ function filterType(val, no) {
|
|
|
}
|
|
|
return ''
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|