From df943f5d48ebd1bbb60b480b2a76d234ec44a7ef Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Wed, 19 Mar 2025 15:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/templates/report-template.html | 7 ++++--- .../summary/reprot-print/components/ReportPreview.vue | 8 +++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/public/templates/report-template.html b/public/templates/report-template.html index 0e7f81d..43f7e50 100644 --- a/public/templates/report-template.html +++ b/public/templates/report-template.html @@ -772,7 +772,8 @@ 年龄--
- 单位-- + 身份证号--
联系电话
@@ -829,7 +830,7 @@
- 检查结果汇总 + 填充值
diff --git a/src/views/summary/reprot-print/components/ReportPreview.vue b/src/views/summary/reprot-print/components/ReportPreview.vue index d2ba1d5..dcdc475 100644 --- a/src/views/summary/reprot-print/components/ReportPreview.vue +++ b/src/views/summary/reprot-print/components/ReportPreview.vue @@ -109,17 +109,16 @@ const handleIframeLoad = async () => { // 单位 const companyContent = doc.querySelector('.person_detail:nth-child(4) .person_content') - if (companyContent) companyContent.textContent = reportData.company || '--' + if (companyContent) companyContent.textContent = reportData.cardId || '--' // 联系电话 const phoneContent = doc.querySelector('.person_detail:nth-child(5) .person_content') - if (phoneContent) phoneContent.textContent = reportData.phone || '--' - console.log('已更新联系电话:', reportData.phone) + if (phoneContent) phoneContent.textContent = reportData.phoneNum|| '--' // 体检日期 const examDateContent = doc.querySelector('.person_detail:nth-child(6) .person_content') if (examDateContent) { - const date = reportData.examDate ? new Date(reportData.examDate) : null + const date = reportData.medicalDateTime ? new Date(reportData.medicalDateTime) : null const formattedDate = date ? `${date.getFullYear()}年${String(date.getMonth() + 1).padStart(2, '0')}月${String(date.getDate()).padStart(2, '0')}日` : '--' @@ -317,7 +316,6 @@ const handleIframeLoad = async () => { if (reportTitle) { const reportSection = Array.from(doc.querySelectorAll('.report-item')).find((section) => { const titleElement = section.querySelector('.report-title') - console.log('titleElement', titleElement) return titleElement && titleElement.textContent?.trim().includes(reportTitle) }) if (reportSection) {