|
@@ -1,6 +1,10 @@
|
|
|
<template>
|
|
|
<window-size :show-back-nav="false">
|
|
|
- <div v-if="isWxBrowser" id="weixin-tip"><p><img style="width:82%" :src="leaveWx" alt="微信打开"/><span id="close" title="关闭" class="close">×</span></p></div>
|
|
|
+ <div v-if="isWxBrowser" id="weixin-tip">
|
|
|
+ <p>
|
|
|
+ <img style="width:82%" :src="leaveWx" alt="微信打开"/><span id="close" title="关闭" class="close">×</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
<div v-else>
|
|
|
<van-field v-model="idCard" center label="身份证" placeholder="请输入身份证">
|
|
|
<template #button>
|
|
@@ -8,14 +12,14 @@
|
|
|
</template>
|
|
|
</van-field>
|
|
|
<van-list :style="listBoxStyle" id="listWrapper" v-model:loading="listLoading" :finished="listFinished" finished-text="没有更多了" @load="onLoadingList">
|
|
|
- <van-cell v-for="item in examIndexes" :key="item.条码号" :title="item.工作单位" :value="item.checkTime"
|
|
|
+ <van-cell v-for="item in examIndexes" :key="item['条码号']" :title="item['工作单位']" :value="item['checkTime']"
|
|
|
center clickable @click="handleClickIndex(item)"></van-cell>
|
|
|
</van-list>
|
|
|
</div>
|
|
|
</window-size>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import {getPhysicalCheckIndex} from '../../../api/physical-exam.js'
|
|
|
+import {getIdCard, getPhysicalCheckIndex} from '../../../api/physical-exam.js'
|
|
|
import {RouteParamValue, useRouter} from "vue-router";
|
|
|
import {onMounted, ref, Ref} from "vue";
|
|
|
import {useStore} from "vuex";
|
|
@@ -62,12 +66,12 @@ const handleClickSearch = (): void => {
|
|
|
}
|
|
|
|
|
|
const fetchIndexData = (): void => {
|
|
|
- getPhysicalCheckIndex(idCard.value, patientId, nextPage.value).then(index => {
|
|
|
+ getPhysicalCheckIndex({idCard: idCard.value, patNo: patientId, pageNo: nextPage.value}).then(index => {
|
|
|
listLoading.value = false
|
|
|
- listFinished.value = index.pageInfo.nextPage === 0;
|
|
|
- examIndexes.value = examIndexes.value.concat(index.rows)
|
|
|
- if (index.pageInfo.nextPage > 0) {
|
|
|
- nextPage.value = index.pageInfo.nextPage
|
|
|
+ listFinished.value = index['pageInfo'].nextPage === 0;
|
|
|
+ examIndexes.value = examIndexes.value.concat(index['rows'])
|
|
|
+ if (index['pageInfo'].nextPage > 0) {
|
|
|
+ nextPage.value = index['pageInfo'].nextPage
|
|
|
store.commit('SET_PHYSICALEXAMNEXTPAGE', nextPage.value)
|
|
|
}
|
|
|
store.commit('SET_PHYSICALEXAMLISTFINISHED', listFinished.value)
|
|
@@ -109,6 +113,11 @@ const judgeWeChatBrowser = () => {
|
|
|
|
|
|
onMounted((): void => {
|
|
|
isWxBrowser.value = judgeWeChatBrowser()
|
|
|
+ if (isWxBrowser.value && !idCard.value) {
|
|
|
+ getIdCard({patNo: patientId, openId: localStorage.getItem('openId')}).then(res => {
|
|
|
+ idCard.value = res.toString()
|
|
|
+ })
|
|
|
+ }
|
|
|
nextPage.value = store.state.physicalExamNextPage;
|
|
|
examIndexes.value = store.state.physicalExamIndexes
|
|
|
listFinished.value = store.state.physicalExamListFinished
|