This commit is contained in:
Euni4U 2025-03-15 14:43:57 +08:00
commit ac31b6753d
2 changed files with 56 additions and 29 deletions

View File

@ -77,24 +77,27 @@ export const PatientApi = {
},
//获取检验报告
getReportTj: async (medicalSn: string,type:string) => {
getReportTj: async (medicalSn: string, type: string) => {
return await request.get({ url: `/inspect/patient/getReportTj?medicalSn=` + medicalSn + `&type=` + type })
},
//获取超声报告
getUSTj: async (medicalSn: string) => {
return await request.get({ url: `/inspect/patient/getUSTj?medicalSn=` + medicalSn})
return await request.get({ url: `/inspect/patient/getUSTj?medicalSn=` + medicalSn })
},
//获取心电报告
GetApiEcgInfo: async (medicalSn: string) => {
return await request.get({ url: `/inspect/patient/getecgTj?medicalSn=` + medicalSn})
return await request.get({ url: `/inspect/patient/getecgTj?medicalSn=` + medicalSn })
},
//获取一般检查项目结果
GetApiYbjcInfo: async (medicalSn: string,cardId:string) => {
return await request.put({ url: `/inspect/patient/GetApiYbjcInfo?medicalSn=` + medicalSn + `&cardId=` + cardId})
GetApiYbjcInfo: async (medicalSn: string, cardId: string) => {
return await request.put({ url: `/inspect/patient/GetApiYbjcInfo?medicalSn=` + medicalSn + `&cardId=` + cardId })
},
//新增患者信息和体检项目
insertPatinetInfo: async (data: PatientVO) => {
return await request.post({ url: `/inspect/patient/insertPatinetInfo`, data })
},
createPatientInspectDataReport: async (medicalSn: any) => {
return await request.get({ url: `/inspect/patient/createPatientInspectDataReport?medicalSn=` + medicalSn, timeout: 110 * 1000 })
}
}

View File

@ -1,5 +1,5 @@
<template>
<ContentWrap style="height: 70px; display: flex; align-items: center;">
<ContentWrap style="height: 70px; display: flex; align-items: center">
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
@ -33,10 +33,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD HH:mm:ss"
:default-time="[
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 1, 1, 23, 59, 59)
]"
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]"
clearable
class="!w-320px"
/>
@ -56,7 +53,7 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:header-cell-style="{ background: 'rgb(235, 241, 250)', height: '56px',color:'#333333' }"
:header-cell-style="{ background: 'rgb(235, 241, 250)', height: '56px', color: '#333333' }"
:row-style="{ height: '56px' }"
>
<el-table-column label="体检编号" align="center" prop="medicalSn" />
@ -71,13 +68,7 @@
/>
<el-table-column label="操作" align="center" fixed="right" width="120px">
<template #default="scope">
<el-button
link
type="primary"
@click="handlePrint(scope.row)"
>
打印报告
</el-button>
<el-button link type="primary" @click="handlePrint(scope.row)"> 打印报告 </el-button>
</template>
</el-table-column>
</el-table>
@ -90,19 +81,45 @@
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<DepartmentForm ref="formRef" @success="getList" />
<!-- 打印报告 -->
<Dialog
v-model="printDialogVisible"
width="84%"
top="16px"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="
() => {
printDialogLoading = false
printFileSrc = ''
}
"
>
<template #title>
<div>
<span>打印报告</span>
</div>
</template>
<div v-loading="printDialogLoading" style="height: 84vh; margin: -6px -14px -24px -14px">
<iframe
v-if="printDialogVisible && printFileSrc && printFileSrc.trim()"
:src="printFileSrc.trim() + '#view=Fit&navpanes=1'"
frameborder="0"
style="width: 100%; height: 100%; border: none"
>
</iframe>
</div>
</Dialog>
</template>
<script setup lang="ts">
import { PatientApi, type PatientVO } from '@/api/inspect/inspectpatient'
defineOptions({ name: 'Department' })
defineOptions({ name: 'ReportPrint' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const allList = ref<PatientVO[]>([]) //
const list = ref<PatientVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
@ -139,8 +156,6 @@ const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 添加/修改操作 */
const formRef = ref()
/** 初始化 **/
onMounted(() => {
@ -148,14 +163,23 @@ onMounted(() => {
})
/** 打印报告按钮操作 */
const handlePrint = async (row: PatientVO) => {
const printDialogVisible = ref(false)
const printDialogLoading = ref(false)
const printFileSrc = ref('')
const handlePrint = async (row) => {
try {
const blob = await PatientApi.exportPatient({ medicalSn: row.medicalSn })
const url = window.URL.createObjectURL(blob)
window.open(url)
window.URL.revokeObjectURL(url)
printDialogVisible.value = true
printDialogLoading.value = true
const result = await PatientApi.createPatientInspectDataReport(row.medicalSn)
if (result && result.code == '200') {
printFileSrc.value = result.msg
} else {
throw '错误发生'
}
} catch (error) {
message.error('打印报告失败')
} finally {
if (printDialogLoading.value) printDialogLoading.value = false
}
}