diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue index 94413d08..71d48b69 100644 --- a/src/views/ECG/ECGForm.vue +++ b/src/views/ECG/ECGForm.vue @@ -517,7 +517,7 @@
- +
+ + +
@@ -954,7 +967,15 @@ function print() { setTimeout(async () => { if (applyFormVO.value.pdfurl) { const fileUrl = applyFormVO.value.pdfurl.trim() - imagebase64_new.value = fileUrl + // 检查是否为PDF文件 + const isPdf = fileUrl.toLowerCase().endsWith('.pdf') + if (isPdf) { + // 如果是PDF,使用iframe显示 + imagebase64_new.value = fileUrl + } else { + // 如果是图片,使用el-image显示 + imagebase64_new.value = fileUrl + } } }, 100) })