前言页样式调整

This commit is contained in:
Euni4U 2025-03-19 09:53:03 +08:00
parent a035ee216f
commit ceb1376b67
2 changed files with 48 additions and 11 deletions

View File

@ -618,6 +618,34 @@
font-size: 10px;
}
}
/* 前言页面样式 */
.preface-wrapper {
padding: 20px;
}
.preface-content {
max-width: 600px;
margin: 0 auto;
}
.preface-greeting {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}
.preface-paragraphs {
margin-bottom: 20px;
}
.preface-footer {
text-align: right;
}
.hospital-name {
font-weight: bold;
}
</style>
</head>
@ -680,12 +708,12 @@
</div>
</div>
<div class="repott_concent">
<div class="content">
<h1 style="text-align: center;">前言</h1>
<p class="greeting">尊敬的<span class="underline">________</span>先生/女士:</p>
<div class="preface-wrapper">
<div class="preface-content">
<h1 style="text-align: center; margin-bottom: 60px;">前言</h1>
<p class="preface-greeting">尊敬的<span class="underline"></span>先生/女士:</p>
<div class="paragraph-group">
<div class="preface-paragraphs">
<p>您好!欢迎参加国家基本公共卫生服务老年人健康体检项目。</p>
<p>健康体检是在自我感觉健康的情况下,通过医学手段对身体各脏器的状态进行的检测。定期的健康体检可以帮助您及早发现健康状态下的危机,为您的健康保驾护航。</p>
@ -697,11 +725,10 @@
<p>由于体检项目和检测手段所限,一次体检不能全部检出身体中的潜在隐患,一旦发现身体出现不适,请及时到医院进行就诊。</p>
</div>
<div class="footer">
<p class="hospital-name" style="text-align: right;">乌兰察布第四医院</p>
<div class="preface-footer">
<p class="hospital-name">乌兰察布第四医院</p>
</div>
</div>
</div>
<div class="report-footer">
<p class="report-footer-text">定期体检,尊享健康</p>

View File

@ -137,12 +137,22 @@ const handleIframeLoad = async () => {
console.log('未找到头像元素')
}
}
//
const prefaceGreeting = doc.querySelector('.greeting .underline')
// -
const prefaceGreeting = doc.querySelector('.preface-greeting .underline')
if (prefaceGreeting) {
prefaceGreeting.textContent = reportData.pName || '________'
console.log('已更新前言姓名为:', reportData.pName)
} else {
console.log('未找到前言姓名元素') //
console.log('未找到前言姓名元素,尝试使用备用选择器')
//
const altPrefaceGreeting = doc.querySelector('.preface-content .underline')
if (altPrefaceGreeting) {
altPrefaceGreeting.textContent = reportData.pName || '________'
console.log('使用备用选择器更新前言姓名为:', reportData.pName)
} else {
console.error('无法找到前言姓名元素')
}
}
//