From 8376736e7eb8aa77bb9e9fa1a276db601cf1b497 Mon Sep 17 00:00:00 2001
From: yy2205 <2238220225@qq.com>
Date: Thu, 22 May 2025 08:59:42 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=89=8D=E7=AB=AF=E4=B8=8D?=
=?UTF-8?q?=E5=90=8C=E5=8D=AB=E7=94=9F=E9=99=A2=E6=9C=BA=E6=9E=84=E7=9A=84?=
=?UTF-8?q?=E5=A4=84=E7=90=86=E5=9B=BE=E7=89=87=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/processImage/index.ts | 10 +--
src/views/ECG/ECGForm.vue | 143 ++--------------------------------
2 files changed, 11 insertions(+), 142 deletions(-)
diff --git a/src/api/processImage/index.ts b/src/api/processImage/index.ts
index 0c744d65..f1dea5d1 100644
--- a/src/api/processImage/index.ts
+++ b/src/api/processImage/index.ts
@@ -17,7 +17,7 @@ export const processImageApi = {
height:400,
width:900,
step:"诊断结果:",
- options:{watermarkFontSize:40}
+ options:{watermarkFontSize:40,enablePdf:true}
},
"药王洞卫生院":{
startX:1200,
@@ -25,7 +25,7 @@ export const processImageApi = {
height:350,
width:950,
step:" 诊断结果:",
- options:{watermarkFontSize:40}
+ options:{watermarkFontSize:40,enablePdf:true}
},
"史德卫生院":{
startX:990,
@@ -33,7 +33,7 @@ export const processImageApi = {
height:400,
width:800,
step:" ",
- options:{watermarkFontSize:40}
+ options:{watermarkFontSize:40,enablePdf:true}
},
"礼泉县城关卫生院":{
startX:2700,
@@ -41,7 +41,7 @@ export const processImageApi = {
height:600,
width:2400,
step:"诊断结果:",
- options:{watermarkFontSize:40}
+ options:{watermarkFontSize:40,enablePdf:true}
},
"北屯中心卫生院":{
startX:1800,
@@ -49,7 +49,7 @@ export const processImageApi = {
height:400,
width:900,
step:"诊断结果:",
- options:{watermarkFontSize:40}
+ options:{watermarkFontSize:40,enablePdf:true}
}
},
processImg: async (params: any) => {
diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue
index 29828ff8..1ea1ec44 100644
--- a/src/views/ECG/ECGForm.vue
+++ b/src/views/ECG/ECGForm.vue
@@ -499,46 +499,8 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
- @close="printclose"
- >
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
-
-
-
-
-
+
@@ -670,6 +585,8 @@ import ECGSB from '@/views/ECG/ECGSB.vue'
import { ElLoading } from 'element-plus'
import { log } from 'console'
import { processImageApi } from '@/api/processImage'
+import jsPDF from 'jspdf'
+import VuePdfEmbed from 'vue-pdf-embed'
const { toClipboard } = useClipboard()
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
@@ -715,6 +632,7 @@ const keyid = ref() //当前数据行的主键ID
const savedisabled = ref(false) //保存按钮是否可用
const isPictureVisible = ref(false) //是否显示图片
const loading = ref(false) // 点击审核后的加载
+
// 树配置项
const treeDefaultProps = {
children: 'children',
@@ -1026,67 +944,18 @@ function printclose() {
}
//打印
function print() {
- //isprintimage.value = false
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
nextTick(() => {
setTimeout(async () => {
if (applyFormVO.value.pdfurl) {
- imagebase64_new.value = applyFormVO.value.pdfurl.trim()
- } else if (false) {
- let doctorEcgDiagInfo: any = null
- if (queryParams.value && queryParams.value.doctorId) {
- doctorEcgDiagInfo = await EcganalysisparasApi.getDoctorBydoctorID(
- queryParams.value.doctorId.trim()
- )
- }
- let mapRes = await EcganalysisparasApi.getEcgPdfImage({
- type: 2,
- regid: id.value,
- examid: queryParams.value.examId,
- name: rowinfo.value.pname,
- gender: rowinfo.value.gender,
- age: age.value,
- ward: '',
- hr: queryParams.value.hr,
- pr: queryParams.value.pr,
- qrs: queryParams.value.qrsAxle,
- qtqtc: queryParams.value.qt + '/' + queryParams.value.qtc,
- rv5sv1: queryParams.value.rv5 + '/' + queryParams.value.sv1,
- rv5sv1plus: (
- Number(queryParams.value.rv5 ? queryParams.value.rv5 : '') +
- Number(queryParams.value.sv1 ? queryParams.value.sv1 : '')
- ).toString(),
- pt:
- queryParams.value.paxle +
- '/' +
- queryParams.value.taxle +
- '/' +
- queryParams.value.qrsAxle,
- ptimelimit: queryParams.value.ptimeLimit,
- diagnosisHint: '',
- department: rowinfo.value.billDoctorDepartment,
- doctorDiagTime: formatDate(
- queryParams.value.doctorDiagTime as any,
- 'YYYY-MM-DD HH:mm:ss'
- ),
- diagContent: queryParams.value.doctorDiagResult,
- DepartName: queryParams.value.departName,
- doctorName: queryParams.value.doctorName,
- image: doctorEcgDiagInfo ? doctorEcgDiagInfo.esignatureUrl : '',
- filepath: queryParams.value.ecgJsonDataFilePath,
- orgid: orgid.value,
- orgname: rowinfo.value.orgName
- })
- if (mapRes && mapRes.code == '200') {
- imagebase64_new.value = mapRes.dataImage
- }
+ const fileUrl = applyFormVO.value.pdfurl.trim()
+ imagebase64_new.value = fileUrl
}
}, 100)
})