From 7e936d62ef056e18f55600f48ad375d5826a3b4d Mon Sep 17 00:00:00 2001 From: lichuanyang <1176537920@qq.com> Date: Wed, 8 Jan 2025 16:21:27 +0800 Subject: [PATCH] =?UTF-8?q?ecg=E5=9B=BE=E7=89=87pdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/tblist/ecganalysisparas/index.ts | 4 ++++ src/views/ECG/ECGForm.vue | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/api/tblist/ecganalysisparas/index.ts b/src/api/tblist/ecganalysisparas/index.ts index bb779f02..c325ddf4 100644 --- a/src/api/tblist/ecganalysisparas/index.ts +++ b/src/api/tblist/ecganalysisparas/index.ts @@ -101,6 +101,10 @@ export const EcganalysisparasApi = { SaveEcgPdf: async (data: EcganalysisparasVO) => { return await request.put({ url: `/tblist/ecganalysisparas/SaveEcgPdf`, data }) }, + // 调用打印服务生成pdf(图片数据) + SaveEcgPdf_image: async (data: any) => { + return await request.post({ url: `/tblist/ecganalysisparas/SaveEcgPdf_image`, data }) + }, getDoctorBydoctorID: async (doctorID: any) => { return await request.get({ url: `/doctor/getBydoctorID?doctorID=` + doctorID }) }, diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue index 62c985c3..bec0e6d9 100644 --- a/src/views/ECG/ECGForm.vue +++ b/src/views/ECG/ECGForm.vue @@ -911,6 +911,17 @@ const save = async () => { ) ) { await EcganalysisparasApi.SaveEcgPdf(saveFormVO.value) + } else { + await EcganalysisparasApi.SaveEcgPdf_image({ + type: '2', + filepath: queryParams.value.ecgJsonDataFilePath, + regid: id.value, + examid: rowinfo.value.examId, + orgid: orgid.value, + diagContent: queryParams.value.doctorDiagResult, + doctorId: Profilevo.value.doctorID, + doctorName: Profilevo.value.doctorname + }) } //查询主表数据 await getPatientexamlist(keyid.value) @@ -987,6 +998,8 @@ function print() { isdiagshow.value = false if (applyFormVO.value && applyFormVO.value.reportstatus != '已审核') { message.alertError('请审核后再进行打印') + } else if (!applyFormVO.value.pdfurl) { + message.alertError('未获取到相关数据') } else { //isprintimage.value = true isdiagshow.value = true @@ -994,7 +1007,7 @@ function print() { setTimeout(async () => { if (applyFormVO.value.pdfurl) { imagebase64_new.value = applyFormVO.value.pdfurl.trim() - } else { + } else if (false) { let doctorEcgDiagInfo: any = null if (queryParams.value && queryParams.value.doctorId) { doctorEcgDiagInfo = await EcganalysisparasApi.getDoctorBydoctorID( @@ -1036,6 +1049,7 @@ function print() { doctorName: queryParams.value.doctorName, image: doctorEcgDiagInfo ? doctorEcgDiagInfo.esignatureUrl : '', filepath: queryParams.value.ecgJsonDataFilePath, + orgid: orgid.value, orgname: rowinfo.value.orgName }) if (mapRes && mapRes.code == '200') {