|
@@ -7,17 +7,15 @@
|
|
|
<van-button size="small" type="primary" icon="search" @click="handleClickSearch">查询</van-button>
|
|
<van-button size="small" type="primary" icon="search" @click="handleClickSearch">查询</van-button>
|
|
|
</template>
|
|
</template>
|
|
|
</van-field>
|
|
</van-field>
|
|
|
-
|
|
|
|
|
<van-list :style="listBoxStyle" id="listWrapper" v-model:loading="listLoading" :finished="listFinished" finished-text="没有更多了" @load="onLoadingList">
|
|
<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>
|
|
center clickable @click="handleClickIndex(item)"></van-cell>
|
|
|
</van-list>
|
|
</van-list>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
</window-size>
|
|
</window-size>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import {getIdCard, getPhysicalCheckIndex} from '../../../api/physical-exam'
|
|
|
|
|
|
|
+import {getPhysicalCheckIndex} from '../../../api/physical-exam.js'
|
|
|
import {RouteParamValue, useRouter} from "vue-router";
|
|
import {RouteParamValue, useRouter} from "vue-router";
|
|
|
import {onMounted, ref, Ref} from "vue";
|
|
import {onMounted, ref, Ref} from "vue";
|
|
|
import {useStore} from "vuex";
|
|
import {useStore} from "vuex";
|
|
@@ -64,7 +62,7 @@ const handleClickSearch = (): void => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const fetchIndexData = (): void => {
|
|
const fetchIndexData = (): void => {
|
|
|
- getPhysicalCheckIndex(idCard.value, nextPage.value).then(index => {
|
|
|
|
|
|
|
+ getPhysicalCheckIndex(idCard.value, patientId, nextPage.value).then(index => {
|
|
|
listLoading.value = false
|
|
listLoading.value = false
|
|
|
listFinished.value = index.pageInfo.nextPage === 0;
|
|
listFinished.value = index.pageInfo.nextPage === 0;
|
|
|
examIndexes.value = examIndexes.value.concat(index.rows)
|
|
examIndexes.value = examIndexes.value.concat(index.rows)
|
|
@@ -84,24 +82,22 @@ const handleClickIndex = (tjIndex:object): void => {
|
|
|
url: 'http://staticweb.hnthyy.cn/wxserver/physicalCheck/exportPDF',
|
|
url: 'http://staticweb.hnthyy.cn/wxserver/physicalCheck/exportPDF',
|
|
|
data: tjIndex,
|
|
data: tjIndex,
|
|
|
responseType: 'blob',
|
|
responseType: 'blob',
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data.type === 'application/x-download') {
|
|
|
|
|
+ let blob = new Blob([res.data], { type: 'application/pdf' })
|
|
|
|
|
+ const link = document.createElement('a')
|
|
|
|
|
+ link.href = URL.createObjectURL(blob)
|
|
|
|
|
+ link.style.display = 'none'
|
|
|
|
|
+ link.download = fileName //下载的文件名
|
|
|
|
|
+ document.body.appendChild(link)
|
|
|
|
|
+ link.click()
|
|
|
|
|
+ document.body.removeChild(link)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Toast.fail('没有查询到可导出的体检报告。')
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch((error) => {
|
|
|
|
|
+ console.error(error)
|
|
|
})
|
|
})
|
|
|
- .then((res) => {
|
|
|
|
|
- if (res.data.type === 'application/x-download') {
|
|
|
|
|
- let blob = new Blob([res.data], { type: 'application/pdf' })
|
|
|
|
|
- const link = document.createElement('a')
|
|
|
|
|
- link.href = URL.createObjectURL(blob)
|
|
|
|
|
- link.style.display = 'none'
|
|
|
|
|
- link.download = fileName //下载的文件名
|
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
|
- link.click()
|
|
|
|
|
- document.body.removeChild(link)
|
|
|
|
|
- } else {
|
|
|
|
|
- Toast.fail('没有查询到可导出的体检报告。')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((error) => {
|
|
|
|
|
- console.error(error)
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const isWxBrowser = ref(false)
|
|
const isWxBrowser = ref(false)
|
|
@@ -113,10 +109,7 @@ const judgeWeChatBrowser = () => {
|
|
|
|
|
|
|
|
onMounted((): void => {
|
|
onMounted((): void => {
|
|
|
isWxBrowser.value = judgeWeChatBrowser()
|
|
isWxBrowser.value = judgeWeChatBrowser()
|
|
|
- getIdCard(patientId).then(res => {
|
|
|
|
|
- idCard.value = res
|
|
|
|
|
- })
|
|
|
|
|
- nextPage.value = store.state.physicalExamNextPage
|
|
|
|
|
|
|
+ nextPage.value = store.state.physicalExamNextPage;
|
|
|
examIndexes.value = store.state.physicalExamIndexes
|
|
examIndexes.value = store.state.physicalExamIndexes
|
|
|
listFinished.value = store.state.physicalExamListFinished
|
|
listFinished.value = store.state.physicalExamListFinished
|
|
|
const currentTjid = store.state.currentTjid
|
|
const currentTjid = store.state.currentTjid
|