汇总页面样式
This commit is contained in:
parent
ceb1376b67
commit
f112df95c7
@ -745,10 +745,42 @@
|
||||
<span>填充值</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph-group">
|
||||
<p id="summary-year" style="white-space: pre-wrap;">
|
||||
<span class="year-value"">
|
||||
</p>
|
||||
<div class="report-content">
|
||||
<h2 style="text-align: center; margin-bottom: 30px;">检查结果汇总</h2>
|
||||
<table class="exam-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="20%" style="font-weight: bold;">【一般检查】</td>
|
||||
<td id="general-exam-summary">--</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold;">【超声】</td>
|
||||
<td id="ultrasound-summary">
|
||||
<div>检查所见:<span>--</span></div>
|
||||
<div>检查结果:<span>--</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold;">【心电图】</td>
|
||||
<td id="ecg-summary">
|
||||
<div>检查所见:<span>--</span></div>
|
||||
<div>检查结果:<span>--</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold;">【血常规】</td>
|
||||
<td id="blood-summary">--</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold;">【尿常规】</td>
|
||||
<td id="urine-summary">--</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold;">【生化】</td>
|
||||
<td id="biochem-summary">--</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="report-footer">
|
||||
<p class="report-footer-text">定期体检,尊享健康</p>
|
||||
|
@ -113,6 +113,7 @@ const handleIframeLoad = async () => {
|
||||
// 联系电话
|
||||
const phoneContent = doc.querySelector('.person_detail:nth-child(5) .person_content')
|
||||
if (phoneContent) phoneContent.textContent = reportData.phone || '--'
|
||||
console.log('已更新联系电话:', reportData.phone)
|
||||
|
||||
// 体检日期
|
||||
const examDateContent = doc.querySelector('.person_detail:nth-child(6) .person_content')
|
||||
@ -296,6 +297,61 @@ const handleIframeLoad = async () => {
|
||||
summaryElement.textContent = reportData.summaryResult || '--'
|
||||
}
|
||||
|
||||
// 更新汇总页面的表格数据
|
||||
|
||||
|
||||
// 更新汇总表格中的一般检查小结
|
||||
const generalExamSummary = doc.getElementById('general-exam-summary')
|
||||
if (generalExamSummary) {
|
||||
// 获取一般检查数据中的第一个项目
|
||||
const firstGeneralItem = reportData.data.find(item =>
|
||||
item.itemName === '身高' || item.itemName === '体温' || item.itemName === '体重'
|
||||
)
|
||||
generalExamSummary.textContent = firstGeneralItem?.analyse || '--'
|
||||
}
|
||||
|
||||
// 更新汇总表格中的超声检查小结
|
||||
const ultrasoundSummary = doc.getElementById('ultrasound-summary')
|
||||
if (ultrasoundSummary && ultrasoundData) {
|
||||
const findings = ultrasoundData.analyse?.split('\n')[0]?.replace('检查所见:', '') || '--'
|
||||
const conclusion = ultrasoundData.analyse?.split('\n')[1]?.replace('检查结果:', '') || '--'
|
||||
|
||||
ultrasoundSummary.innerHTML = `
|
||||
<div>检查所见:<span>${findings}</span></div>
|
||||
<div>检查结果:<span>${conclusion}</span></div>
|
||||
`
|
||||
}
|
||||
|
||||
// 更新汇总表格中的心电图检查小结
|
||||
const ecgSummary = doc.getElementById('ecg-summary')
|
||||
if (ecgSummary && ecgData) {
|
||||
const findings = ecgData.analyse?.split('\n')[0]?.replace('检查所见:', '') || '--'
|
||||
const conclusion = ecgData.analyse?.split('\n')[1]?.replace('检查结果:', '') || '--'
|
||||
|
||||
ecgSummary.innerHTML = `
|
||||
<div>检查所见:<span>${findings}</span></div>
|
||||
<div>检查结果:<span>${conclusion}</span></div>
|
||||
`
|
||||
}
|
||||
|
||||
// 更新汇总表格中的血常规检查小结
|
||||
const bloodSummary = doc.getElementById('blood-summary')
|
||||
if (bloodSummary) {
|
||||
bloodSummary.textContent = bloodData?.analyse || '--'
|
||||
}
|
||||
|
||||
// 更新汇总表格中的尿常规检查小结
|
||||
const urineSummary = doc.getElementById('urine-summary')
|
||||
if (urineSummary) {
|
||||
urineSummary.textContent = urineData?.analyse || '--'
|
||||
}
|
||||
|
||||
// 更新汇总表格中的生化检查小结
|
||||
const biochemSummary = doc.getElementById('biochem-summary')
|
||||
if (biochemSummary) {
|
||||
biochemSummary.textContent = biochemData?.analyse || '--'
|
||||
}
|
||||
|
||||
// 更新图片和 PDF 链接
|
||||
reportData.data.forEach((item) => {
|
||||
if (item.data) {
|
||||
|
Loading…
Reference in New Issue
Block a user