签名样式
This commit is contained in:
parent
892fb745d8
commit
03c8a05b21
@ -1121,6 +1121,10 @@
|
||||
<!-- 第一页汇总内容 -->
|
||||
</p>
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;justify-content: flex-end; margin-right: 30px;">
|
||||
<p id="summary-doctor-name">主检医生:</p>
|
||||
<img id="summary-doctor-image" src="" style="width: 50px;height: 50px;">
|
||||
</div>
|
||||
<div class="summary-tip">
|
||||
<p id="summary-tip-1">温馨提示:本次体检未发现异常的部分,不代表完全没有潜在性疾病,如有疾病或身体不适,要立即就医。</p>
|
||||
</div>
|
||||
@ -1151,6 +1155,10 @@
|
||||
<!-- 第二页汇总内容 -->
|
||||
</p>
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;justify-content: flex-end; margin-right: 30px;">
|
||||
<p id="summary-doctor-name2">主检医生:</p>
|
||||
<img id="summary-doctor-image2" src="" style="width: 50px;height: 50px;">
|
||||
</div>
|
||||
<div class="summary-tip">
|
||||
<p>温馨提示:本次体检未发现异常的部分,不代表完全没有潜在性疾病,如有疾病或身体不适,要立即就医。</p>
|
||||
</div>
|
||||
@ -1694,6 +1702,9 @@
|
||||
document.getElementById('summary-page-2').style.display = 'none';
|
||||
document.getElementById('summary-content-1').textContent = '--';
|
||||
document.getElementById('summary-tip-1').style.display = '';
|
||||
// 显示第一页的总检医生签名
|
||||
document.getElementById('summary-doctor-name').style.display = '';
|
||||
document.getElementById('summary-doctor-image').style.display = '';
|
||||
// 更新页码
|
||||
updatePageNumbers();
|
||||
return;
|
||||
@ -1716,6 +1727,9 @@
|
||||
document.getElementById('summary-content-1').textContent = summaryText;
|
||||
document.getElementById('summary-page-2').style.display = 'none';
|
||||
document.getElementById('summary-tip-1').style.display = '';
|
||||
// 显示第一页的总检医生签名
|
||||
document.getElementById('summary-doctor-name').style.display = '';
|
||||
document.getElementById('summary-doctor-image').style.display = '';
|
||||
|
||||
// 更新页码
|
||||
updatePageNumbers();
|
||||
@ -1748,6 +1762,9 @@
|
||||
document.getElementById('summary-content-2').textContent = secondPageText;
|
||||
document.getElementById('summary-page-2').style.display = 'block';
|
||||
document.getElementById('summary-tip-1').style.display = 'none';
|
||||
// 隐藏第一页的总检医生签名
|
||||
document.getElementById('summary-doctor-name').style.display = 'none';
|
||||
document.getElementById('summary-doctor-image').style.display = 'none';
|
||||
|
||||
// 更新页码
|
||||
updatePageNumbers();
|
||||
|
@ -128,7 +128,16 @@ const handleIframeLoad = async () => {
|
||||
if (avatarImg) {
|
||||
avatarImg.src = 'data:image/jpeg;base64,' + reportData.headPicUrl
|
||||
}
|
||||
|
||||
// 更新主检医生签名
|
||||
const summaryDoctorImage = doc.getElementById('summary-doctor-image')
|
||||
const summaryDoctorImage2 = doc.getElementById('summary-doctor-image2')
|
||||
if (summaryDoctorImage) {
|
||||
summaryDoctorImage.src = reportData.sign
|
||||
}
|
||||
if (summaryDoctorImage2) {
|
||||
summaryDoctorImage2.src = reportData.sign
|
||||
}
|
||||
|
||||
// 更新前言中的姓名 - 修复选择器
|
||||
const prefaceGreeting = doc.querySelector('.preface-greeting .underline')
|
||||
if (prefaceGreeting) {
|
||||
@ -281,7 +290,6 @@ const handleIframeLoad = async () => {
|
||||
}
|
||||
|
||||
if (biochemSummaryContent) {
|
||||
console.log(biochemData.analyse)
|
||||
biochemSummaryContent.textContent = biochemData.analyse || ''
|
||||
} else {
|
||||
console.error('找不到生化小结元素')
|
||||
@ -437,37 +445,6 @@ const handleIframeLoad = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 修改等待渲染完成的函数,添加更多检查和日志
|
||||
const waitForAllPDFsRendered = () => {
|
||||
return new Promise((resolve) => {
|
||||
const checkRendering = () => {
|
||||
const containers = document.querySelectorAll('.pdf-container')
|
||||
let allDone = true
|
||||
containers.forEach((container, index) => {
|
||||
const imageContainer = container.querySelector('.pdf-image-container')
|
||||
const img = imageContainer?.querySelector('img')
|
||||
// 更严格的检查条件
|
||||
if (
|
||||
!imageContainer ||
|
||||
!img ||
|
||||
!img.complete ||
|
||||
imageContainer.style.display !== 'block' ||
|
||||
!img.src
|
||||
) {
|
||||
allDone = false
|
||||
}
|
||||
})
|
||||
|
||||
if (allDone) {
|
||||
resolve(true)
|
||||
} else {
|
||||
setTimeout(checkRendering, 1000) // 增加检查间隔到1秒
|
||||
}
|
||||
}
|
||||
|
||||
checkRendering()
|
||||
})
|
||||
}
|
||||
|
||||
// 修改打印处理函数
|
||||
const handlePrint = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user