第7页
@@ -802,7 +836,12 @@
-
心电图检查报告
+
@@ -815,7 +854,7 @@
第8页
diff --git a/src/views/summary/reprot-print/components/ReportPreview.vue b/src/views/summary/reprot-print/components/ReportPreview.vue
index 58c21cb..4347251 100644
--- a/src/views/summary/reprot-print/components/ReportPreview.vue
+++ b/src/views/summary/reprot-print/components/ReportPreview.vue
@@ -212,6 +212,16 @@ const handleIframeLoad = async () => {
}
}
+
+
+ // 获取所有报告标题中的第二个span(填充值所在位置)
+ const reportTitles = doc.querySelectorAll('.report-title > div > span:nth-child(2)');
+ // 更新每个填充值
+ reportTitles.forEach(span => {
+ span.textContent = `体检编号:${reportData.medicalSn || '--'}`+`姓名:${reportData.pName || '--'}`;
+ });
+
+
// 心电图
const ecgData = reportData.data.find(item => item.type === 'ecg');
if (ecgData) {
@@ -251,9 +261,8 @@ const handleIframeLoad = async () => {
if (reportTitle) {
const reportSection = Array.from(doc.querySelectorAll('.report-item')).find(section => {
const titleElement = section.querySelector('.report-title');
- return titleElement && titleElement.textContent.trim() === reportTitle;
+ return titleElement && titleElement.textContent?.trim().includes(reportTitle);
});
-
if (reportSection) {
// 为PDF URL添加参数
const pdfUrl = item.data + '#toolbar=0&navpanes=0&view=Fit';
@@ -282,6 +291,7 @@ const handleIframeLoad = async () => {
}
}
+
const handlePrint = () => {
const iframe = document.querySelector('iframe')
if (iframe && iframe.contentWindow) {