2025-03-17 10:18:30 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
<title>体检检查报告</title>
|
|
|
|
|
<!-- 添加PDF.js库 -->
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.4.120/pdf.min.js"></script>
|
|
|
|
|
<style>
|
2025-03-20 17:39:41 +08:00
|
|
|
|
/* 体质辨识结果详情容器样式 */
|
|
|
|
|
.constitution-detail-container {
|
|
|
|
|
margin: 10px auto;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
border: 1px solid #fffcfc;
|
|
|
|
|
width: 90%;
|
|
|
|
|
height: calc(100% - 300px);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
white-space: pre-line;
|
|
|
|
|
line-height: 3;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 11:08:26 +08:00
|
|
|
|
/* 体质辨识结果表格样式 */
|
|
|
|
|
.constitution-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-collapse: collapse;
|
2025-03-19 14:52:42 +08:00
|
|
|
|
margin: 10px auto 30px;
|
|
|
|
|
/* 上边距10px,左右auto居中,下边距30px留出空间 */
|
2025-03-18 11:08:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.constitution-table td {
|
|
|
|
|
border: 1px solid #000;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 头像容器样式 */
|
|
|
|
|
.avatar-container {
|
|
|
|
|
width: 120px;
|
|
|
|
|
height: 160px;
|
2025-03-19 14:52:42 +08:00
|
|
|
|
margin: 50px auto;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
border: 1px solid #000;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.avatar-image {
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
max-height: 100%;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 调整下方内容的间距 */
|
|
|
|
|
.person_detail:first-child {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-17 16:43:28 +08:00
|
|
|
|
.report-container {
|
2025-03-17 10:18:30 +08:00
|
|
|
|
max-width: 1200px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.report-item {
|
|
|
|
|
margin-bottom: 40px;
|
2025-03-20 11:23:46 +08:00
|
|
|
|
border: 1px solid #000;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
border-radius: 8px;
|
|
|
|
|
overflow: hidden;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
2025-03-17 16:08:40 +08:00
|
|
|
|
width: 800px;
|
|
|
|
|
height: 1123px;
|
|
|
|
|
margin: 0 auto 40px;
|
|
|
|
|
position: relative;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.report-title {
|
2025-03-20 11:23:46 +08:00
|
|
|
|
background-color: white;
|
|
|
|
|
color: black;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
padding: 15px;
|
2025-03-19 14:52:42 +08:00
|
|
|
|
font-size: 18px;
|
|
|
|
|
/* 这里控制字体大小 */
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
/* 这里控制字体粗细 */
|
2025-03-20 11:23:46 +08:00
|
|
|
|
border-bottom: 1px solid #000;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.report-content {
|
2025-03-21 17:38:35 +08:00
|
|
|
|
padding: 10px;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
background-color: white;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.report-content img {
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
height: auto;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.report-content iframe {
|
|
|
|
|
width: 100%;
|
2025-03-21 13:10:45 +08:00
|
|
|
|
height: 600px;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
border: none;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.report-summary {
|
|
|
|
|
padding: 15px;
|
2025-03-19 15:25:24 +08:00
|
|
|
|
background-color: transparent;
|
2025-03-19 15:27:32 +08:00
|
|
|
|
border-top: 1px solid #000 !important;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 新增表格样式 */
|
|
|
|
|
.exam-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
margin: 20px 0;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
|
|
|
|
.exam-table th,
|
|
|
|
|
.exam-table td {
|
2025-03-19 15:27:32 +08:00
|
|
|
|
border: 1px solid #000 !important;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
padding: 12px;
|
|
|
|
|
text-align: left;
|
2025-03-19 14:52:42 +08:00
|
|
|
|
font-size: 16px;
|
|
|
|
|
/* 可以在这里设置字体大小 */
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.exam-table th {
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.exam-table tr:nth-child(even) {
|
|
|
|
|
background-color: #fafafa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #333;
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
/* 默认隐藏打印占位符和打印专用内容 */
|
|
|
|
|
.print-placeholder {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.print-only {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.pdf-loading {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.pdf-error {
|
|
|
|
|
color: red;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
border: 1px solid #ffcccc;
|
|
|
|
|
background-color: #fff8f8;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.pdf-page-info {
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #666;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 加载动画 */
|
|
|
|
|
.loading-spinner {
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
border: 3px solid #f3f3f3;
|
|
|
|
|
border-top: 3px solid #3498db;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
margin: 0 auto 10px;
|
|
|
|
|
animation: spin 1s linear infinite;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
@keyframes spin {
|
2025-03-17 16:43:28 +08:00
|
|
|
|
0% {
|
|
|
|
|
transform: rotate(0deg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
100% {
|
|
|
|
|
transform: rotate(360deg);
|
|
|
|
|
}
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
.pdf-image-container img {
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
height: auto;
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
|
|
|
|
/* 打印专用样式 - 完全重写 */
|
|
|
|
|
@media print {
|
|
|
|
|
body {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-container {
|
|
|
|
|
padding: 0;
|
|
|
|
|
max-width: none;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 11:08:26 +08:00
|
|
|
|
/* 体质辨识结果表格样式 */
|
|
|
|
|
.constitution-table {
|
|
|
|
|
width: 100%;
|
2025-03-20 17:47:24 +08:00
|
|
|
|
font-size: 16px !important;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.constitution-table td {
|
2025-03-20 17:47:24 +08:00
|
|
|
|
padding: 8px;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
border: 1px solid #000 !important;
|
|
|
|
|
-webkit-print-color-adjust: exact !important;
|
|
|
|
|
print-color-adjust: exact !important;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-17 16:43:28 +08:00
|
|
|
|
/* 一般检查特殊处理 */
|
|
|
|
|
.general-exam {
|
|
|
|
|
page-break-inside: avoid !important;
|
|
|
|
|
break-inside: avoid !important;
|
|
|
|
|
page-break-after: always !important;
|
|
|
|
|
break-after: page !important;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
height: 1123px !important;
|
|
|
|
|
/* 设置固定高度,与其他报告一致 */
|
2025-03-17 17:16:02 +08:00
|
|
|
|
width: 800px !important;
|
|
|
|
|
margin: 0 auto !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
padding: 0 !important;
|
|
|
|
|
border: none !important;
|
|
|
|
|
border-radius: 0 !important;
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
display: block !important;
|
|
|
|
|
overflow: visible !important;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
position: relative !important;
|
|
|
|
|
/* 确保可以放置绝对定位的页脚 */
|
2025-03-17 17:16:02 +08:00
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
/* 确保一般检查的页脚正确显示 */
|
|
|
|
|
.general-exam .report-footer {
|
|
|
|
|
position: absolute !important;
|
|
|
|
|
bottom: 30px !important;
|
|
|
|
|
left: 10px !important;
|
|
|
|
|
right: 10px !important;
|
|
|
|
|
border-top: 1px solid #000 !important;
|
|
|
|
|
padding-top: 5px !important;
|
|
|
|
|
display: block !important;
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
.general-exam .report-footer-text {
|
|
|
|
|
font-size: 10px !important;
|
|
|
|
|
margin: 0 !important;
|
|
|
|
|
font-style: italic !important;
|
|
|
|
|
text-align: right !important;
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
/* 确保一般检查的页码正确显示 */
|
|
|
|
|
.general-exam .page-number {
|
|
|
|
|
position: absolute !important;
|
|
|
|
|
bottom: 10px !important;
|
|
|
|
|
left: 0 !important;
|
|
|
|
|
right: 0 !important;
|
|
|
|
|
text-align: center !important;
|
|
|
|
|
font-size: 10px !important;
|
|
|
|
|
display: block !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 一般检查的内容区域 */
|
|
|
|
|
.general-exam .report-content {
|
|
|
|
|
padding: 5px !important;
|
|
|
|
|
margin: 0 !important;
|
|
|
|
|
display: block !important;
|
|
|
|
|
overflow: visible !important;
|
|
|
|
|
height: auto !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 一般检查的表格 */
|
|
|
|
|
.general-exam .exam-table {
|
2025-03-31 11:34:30 +08:00
|
|
|
|
margin: 20px 0 90px 90px !important; /* 左右边距增加到40px */
|
|
|
|
|
width: calc(100% - 140px) !important; /* 调整表格宽度 */
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.general-exam .exam-table th,
|
|
|
|
|
.general-exam .exam-table td {
|
2025-03-19 15:25:24 +08:00
|
|
|
|
padding: 8px !important;
|
|
|
|
|
font-size: 18px !important;
|
2025-03-20 11:23:46 +08:00
|
|
|
|
line-height: 1.5;
|
2025-03-19 15:25:24 +08:00
|
|
|
|
height: 40px; /* 降低单元格高度 */
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 一般检查的小结 */
|
|
|
|
|
.general-exam .report-summary {
|
2025-03-31 13:28:19 +08:00
|
|
|
|
padding: 5px 40px !important;
|
|
|
|
|
position: static !important; /* 改为静态定位 */
|
2025-03-31 11:34:30 +08:00
|
|
|
|
margin-left: 50px !important;
|
|
|
|
|
margin-right: 20px !important;
|
2025-03-31 13:28:19 +08:00
|
|
|
|
margin-top: 30px !important; /* 设置与表格的距离 */
|
2025-03-20 17:39:41 +08:00
|
|
|
|
min-height: auto;
|
2025-03-31 13:28:19 +08:00
|
|
|
|
margin-bottom: 80px !important; /* 确保底部有足够空间不遮挡页脚 */
|
2025-03-19 15:25:24 +08:00
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
background-color: transparent !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.general-exam .report-summary h4 {
|
2025-03-19 15:25:24 +08:00
|
|
|
|
margin-bottom: 10px !important;
|
|
|
|
|
font-size: 16px !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.general-exam .report-summary p {
|
|
|
|
|
margin: 2px 0 !important;
|
2025-03-19 15:25:24 +08:00
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
line-height: 1.6;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 其他报告项目的样式 */
|
|
|
|
|
.report-item:not(.general-exam) {
|
|
|
|
|
page-break-after: always;
|
|
|
|
|
break-after: page;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 最后一个报告不需要分页 */
|
|
|
|
|
.report-item:last-child {
|
|
|
|
|
page-break-after: auto;
|
|
|
|
|
break-after: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 标题样式 */
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-title {
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
font-size: 16px;
|
2025-03-20 11:23:46 +08:00
|
|
|
|
background-color: white !important;
|
|
|
|
|
color: black !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 内容区域 */
|
|
|
|
|
.report-item:not(.general-exam) .report-content {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 表格样式 */
|
|
|
|
|
.report-item:not(.general-exam) .exam-table {
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-item:not(.general-exam) .exam-table th,
|
|
|
|
|
.report-item:not(.general-exam) .exam-table td {
|
|
|
|
|
padding: 5px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 小结部分 */
|
|
|
|
|
.report-item:not(.general-exam) .report-summary {
|
|
|
|
|
padding: 8px;
|
2025-03-17 17:16:02 +08:00
|
|
|
|
margin-bottom: 80px !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
font-size: 11px;
|
2025-03-19 15:25:24 +08:00
|
|
|
|
background-color: transparent !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-item:not(.general-exam) .report-summary h4 {
|
|
|
|
|
margin: 3px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-item:not(.general-exam) .report-summary p {
|
|
|
|
|
margin: 3px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* PDF图片容器 */
|
|
|
|
|
.pdf-image-container {
|
|
|
|
|
max-height: 500px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pdf-image-container img {
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
max-height: 480px;
|
|
|
|
|
object-fit: contain;
|
2025-03-19 16:23:54 +08:00
|
|
|
|
margin: 20px auto;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pdf-page-info {
|
|
|
|
|
font-size: 9px;
|
|
|
|
|
margin-top: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 隐藏屏幕元素 */
|
|
|
|
|
.screen-only {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 显示打印元素 */
|
|
|
|
|
.print-only {
|
|
|
|
|
display: block !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 确保背景色和边框在打印时可见 */
|
|
|
|
|
.report-title,
|
|
|
|
|
.exam-table th,
|
|
|
|
|
.exam-table td,
|
|
|
|
|
.report-summary {
|
|
|
|
|
-webkit-print-color-adjust: exact !important;
|
|
|
|
|
color-adjust: exact !important;
|
|
|
|
|
print-color-adjust: exact !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 页面设置 */
|
|
|
|
|
@page {
|
|
|
|
|
margin: 0.5cm;
|
|
|
|
|
size: A4 portrait;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 超声检查报告的特殊样式 */
|
|
|
|
|
.ultrasound-exam .pdf-image-container {
|
|
|
|
|
max-height: 800px !important;
|
|
|
|
|
/* 增加高度 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ultrasound-exam .pdf-image-container img {
|
|
|
|
|
max-width: 100% !important;
|
2025-03-21 17:38:35 +08:00
|
|
|
|
max-height: 840px !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
/* 增加高度 */
|
|
|
|
|
object-fit: contain !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 调整超声检查报告的内容区域 */
|
|
|
|
|
.ultrasound-exam .report-content {
|
|
|
|
|
padding: 5px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 调整超声检查报告的小结部分 */
|
|
|
|
|
.ultrasound-exam .report-summary {
|
|
|
|
|
padding: 5px !important;
|
2025-03-17 17:16:02 +08:00
|
|
|
|
margin-bottom: 80px !important;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
font-size: 10px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ultrasound-exam .report-summary p {
|
|
|
|
|
margin: 3px 0 !important;
|
|
|
|
|
font-size: 10px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 所有报告项目的打印样式 */
|
|
|
|
|
.report-item {
|
|
|
|
|
page-break-after: always;
|
|
|
|
|
break-after: page;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
width: 800px;
|
|
|
|
|
height: 1123px;
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
2025-03-19 15:37:35 +08:00
|
|
|
|
|
|
|
|
|
/* 超声检查所见所得样式 */
|
|
|
|
|
.ultrasound-exam .report-summary p {
|
2025-03-20 17:39:41 +08:00
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
/* 与一般检查小结正文相同 */
|
2025-03-19 15:37:35 +08:00
|
|
|
|
line-height: 1.6 !important;
|
2025-03-19 16:02:22 +08:00
|
|
|
|
margin: 1px 0 !important;
|
|
|
|
|
margin-bottom: 60px !important;
|
2025-03-19 15:37:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ultrasound-exam .report-summary strong {
|
2025-03-20 17:39:41 +08:00
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
/* 与一般检查小结标题相同 */
|
2025-03-19 15:37:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 原超声样式调整 */
|
|
|
|
|
.ultrasound-exam .report-summary {
|
|
|
|
|
padding: 5px !important;
|
|
|
|
|
margin-bottom: 80px !important;
|
2025-03-20 17:39:41 +08:00
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
/* 统一设置基础字号 */
|
2025-03-19 15:37:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 统一所有检验科小结样式 */
|
|
|
|
|
.report-item:not(.general-exam):not(.ultrasound-exam) .report-summary h4 {
|
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
margin-bottom: 10px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-item:not(.general-exam):not(.ultrasound-exam) .report-summary p {
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
line-height: 1.6 !important;
|
2025-03-19 16:02:22 +08:00
|
|
|
|
margin: 1px 0 !important;
|
|
|
|
|
margin-bottom: 60px !important;
|
2025-03-19 15:37:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 心电图所见所得样式 */
|
|
|
|
|
.report-item:not(.general-exam):not(.ultrasound-exam) .report-summary strong {
|
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-item:not(.general-exam):not(.ultrasound-exam) .report-summary p {
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
line-height: 1.6 !important;
|
2025-03-19 16:02:22 +08:00
|
|
|
|
margin: 1px 0 !important;
|
|
|
|
|
margin-bottom: 60px !important;
|
2025-03-20 17:39:41 +08:00
|
|
|
|
|
2025-03-19 15:37:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 统一所有边框线长度 */
|
|
|
|
|
.report-summary {
|
|
|
|
|
border-top: 1px solid #000 !important;
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 20px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report-footer {
|
2025-03-31 11:34:30 +08:00
|
|
|
|
left: 40px !important; /* 与汇总页保持一致 */
|
2025-03-20 17:39:41 +08:00
|
|
|
|
right: 20px !important;
|
2025-03-19 15:37:35 +08:00
|
|
|
|
border-top: 1px solid #000 !important;
|
|
|
|
|
}
|
2025-03-19 16:31:18 +08:00
|
|
|
|
|
|
|
|
|
/* 前言标题打印样式 */
|
|
|
|
|
.preface-content h1 {
|
|
|
|
|
font-size: 24px !important;
|
|
|
|
|
margin-bottom: 40px !important;
|
|
|
|
|
text-align: center !important;
|
|
|
|
|
font-weight: bold !important;
|
|
|
|
|
}
|
2025-03-20 11:23:46 +08:00
|
|
|
|
|
|
|
|
|
.preface-paragraphs {
|
|
|
|
|
margin-bottom: 20px !important;
|
|
|
|
|
line-height: 1.8 !important; /* 打印时保持相同的行间距 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preface-paragraphs p {
|
|
|
|
|
margin-bottom: 15px !important; /* 打印时保持段落间距 */
|
|
|
|
|
}
|
2025-03-21 17:38:35 +08:00
|
|
|
|
|
2025-03-31 11:34:30 +08:00
|
|
|
|
/* 汇总页面左侧留出装订线空间 */
|
|
|
|
|
#summary-page-1 .summary-section,
|
|
|
|
|
#summary-page-2 .summary-section {
|
|
|
|
|
padding-left: 40px !important; /* 增加左边距 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#summary-page-1 .summary-title,
|
|
|
|
|
#summary-page-2 .summary-title {
|
|
|
|
|
text-align: center !important;
|
|
|
|
|
margin-left: 20px !important; /* 标题向右移动 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#summary-page-1 .summary-notice,
|
|
|
|
|
#summary-page-2 .summary-notice {
|
|
|
|
|
margin-left: 60px !important; /* 提示文本向右移动 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#summary-page-1 .summary-content,
|
|
|
|
|
#summary-page-2 .summary-content {
|
|
|
|
|
margin-left: 60px !important; /* 内容向右移动更多 */
|
|
|
|
|
margin-right: 40px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#summary-page-1 .summary-tip,
|
|
|
|
|
#summary-page-2 .summary-tip {
|
|
|
|
|
margin-left: 50px !important; /* 提示信息向右移动 */
|
|
|
|
|
margin-right: 40px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#summary-page-1 .report-footer,
|
|
|
|
|
#summary-page-2 .report-footer {
|
|
|
|
|
left: 40px !important; /* 页脚向右移动 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 超声检查报告所见所得部分调整 */
|
|
|
|
|
.ultrasound-exam .report-summary {
|
|
|
|
|
padding: 5px 0 5px 80px !important; /* 增加左内边距到80px */
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ultrasound-exam .report-title {
|
|
|
|
|
padding-left: 80px !important; /* 标题左侧留出空间 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 超声检查标题居中部分调整 */
|
|
|
|
|
.ultrasound-exam .USPrinttitleDiv,
|
|
|
|
|
.ultrasound-exam div[style*="text-align: center"] {
|
|
|
|
|
padding-left: 80px !important;
|
|
|
|
|
box-sizing: border-box !important;
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 调整尿常规、生化和血常规报告小结左侧距离设置 */
|
2025-03-31 13:04:51 +08:00
|
|
|
|
/* 尿常规小结部分 */
|
|
|
|
|
#urine-summary-div {
|
2025-03-31 11:34:30 +08:00
|
|
|
|
padding: 5px 0 5px 80px !important; /* 增加左内边距到80px,与超声保持一致 */
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 0 !important;
|
2025-03-31 13:04:51 +08:00
|
|
|
|
height: 300px !important; /* 添加固定高度 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 尿常规续页内容 */
|
|
|
|
|
#urine-page-2 .summary-content {
|
|
|
|
|
padding-left: 80px !important;
|
|
|
|
|
margin-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 生化小结部分 */
|
|
|
|
|
#biochemistry-summary-div {
|
|
|
|
|
padding: 5px 0 5px 80px !important; /* 增加左内边距到80px,与超声保持一致 */
|
2025-03-31 11:34:30 +08:00
|
|
|
|
margin-left: 20px !important;
|
2025-03-31 13:04:51 +08:00
|
|
|
|
margin-right: 0 !important;
|
|
|
|
|
height: 300px !important; /* 添加固定高度 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 生化续页内容 */
|
|
|
|
|
#biochemistry-page-2 .summary-content {
|
|
|
|
|
padding-left: 80px !important;
|
|
|
|
|
margin-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 血常规小结部分 */
|
|
|
|
|
#blood-summary-div {
|
|
|
|
|
padding: 5px 0 5px 80px !important; /* 增加左内边距到80px,与超声保持一致 */
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 0 !important;
|
|
|
|
|
height: 300px !important; /* 添加固定高度 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 血常规续页内容 */
|
|
|
|
|
#blood-page-2 .summary-content {
|
|
|
|
|
padding-left: 80px !important;
|
|
|
|
|
margin-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
/* 心电图小结部分 */
|
|
|
|
|
#ecg-summary {
|
|
|
|
|
padding: 5px 0 5px 80px !important; /* 增加左内边距到80px,与超声保持一致 */
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
/* 中医体质辨识表格部分 - 参考一般检查表格样式 */
|
|
|
|
|
.constitution-table {
|
|
|
|
|
margin: 20px 0 30px 120px !important; /* 左侧边距增加到90px */
|
|
|
|
|
width: calc(100% - 240px) !important; /* 调整表格宽度 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.constitution-table td {
|
|
|
|
|
padding: 8px !important;
|
|
|
|
|
font-size: 18px !important;
|
|
|
|
|
line-height: 1.5 !important;
|
|
|
|
|
height: 30px !important; /* 设置单元格高度 */
|
|
|
|
|
border: 1px solid #000 !important;
|
|
|
|
|
}
|
|
|
|
|
/* 中医体质辨识内容部分 - 参考其他报告的内容区域 */
|
|
|
|
|
.constitution-detail-container {
|
|
|
|
|
padding: 5px 0 5px 90px !important; /* 与一般检查表格左内边距一致 */
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 20px !important;
|
|
|
|
|
width: calc(100% - 140px) !important; /* 调整内容区域宽度 */
|
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
line-height: 3 !important;
|
|
|
|
|
border: none !important;
|
|
|
|
|
}
|
|
|
|
|
/* 心电图内容区域和图片样式 */
|
|
|
|
|
#ecg-exam-content {
|
|
|
|
|
max-height: 500px !important;
|
|
|
|
|
overflow: hidden !important;
|
|
|
|
|
width: calc(100% - 100px) !important; /* 增加容器宽度,从140px减少到100px */
|
|
|
|
|
text-align: center !important;
|
|
|
|
|
padding: 10px 0 10px 60px !important; /* 保持当前的左内边距 */
|
|
|
|
|
margin: 0 !important; /* 移除自动边距 */
|
|
|
|
|
margin-right: 5px !important; /* 右侧边距减小到5px */
|
|
|
|
|
display: flex !important;
|
|
|
|
|
justify-content: center !important;
|
|
|
|
|
align-items: center !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ecg-exam-content img {
|
|
|
|
|
max-width: 100% !important;
|
|
|
|
|
max-height: 480px !important;
|
|
|
|
|
object-fit: contain !important;
|
|
|
|
|
margin: 20px auto !important;
|
2025-03-31 11:34:30 +08:00
|
|
|
|
border: none !important;
|
2025-03-31 13:04:51 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 添加首页样式 */
|
|
|
|
|
.repott_concent {
|
|
|
|
|
width: 561px;
|
|
|
|
|
height: 397px;
|
|
|
|
|
margin: auto;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.repott_concent_area {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.repott_concent_title {
|
2025-03-19 14:52:42 +08:00
|
|
|
|
font-size: 30pt;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
letter-spacing: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.repott_concent_english {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
margin-top: 17px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.repott_concent_english_health {
|
|
|
|
|
font-size: 15pt;
|
|
|
|
|
width: 174px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.repott_concent_Examination {
|
|
|
|
|
font-size: 15pt;
|
|
|
|
|
width: 152px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.repott_concent_Report {
|
|
|
|
|
font-size: 15pt;
|
|
|
|
|
width: 204px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.person_detail {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
margin-bottom: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.person_title {
|
|
|
|
|
font-size: 15pt;
|
|
|
|
|
letter-spacing: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.person_content {
|
|
|
|
|
font-size: 15pt;
|
|
|
|
|
width: 235px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preface-content .footer {
|
|
|
|
|
margin-top: 40px;
|
|
|
|
|
width: 100%;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
text-align: right;
|
|
|
|
|
/* 整个footer右对齐 */
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preface-content .hospital-name {
|
2025-03-20 11:23:46 +08:00
|
|
|
|
margin-top: 60px;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preface-content .slogan {
|
|
|
|
|
font-style: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.underline {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
min-width: 100px;
|
|
|
|
|
border-bottom: 1px solid #000;
|
|
|
|
|
text-align: center;
|
2025-03-18 11:08:26 +08:00
|
|
|
|
margin: 0 5px;
|
|
|
|
|
/* 增加左右间距 */
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
2025-03-17 17:16:02 +08:00
|
|
|
|
|
|
|
|
|
/* 添加页码样式 */
|
|
|
|
|
.page-number {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 20px;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
/* 打印时的页码样式 */
|
|
|
|
|
@media print {
|
|
|
|
|
.page-number {
|
|
|
|
|
bottom: 10px;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 调整页脚样式,避免与页码重叠 */
|
|
|
|
|
.report-footer {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 40px;
|
|
|
|
|
left: 20px;
|
|
|
|
|
right: 20px;
|
|
|
|
|
border-top: 1px solid #000;
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
.report-footer-text {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
/* 打印时的页码样式 */
|
|
|
|
|
@media print {
|
|
|
|
|
.report-footer {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 30px;
|
|
|
|
|
left: 10px;
|
|
|
|
|
right: 10px;
|
|
|
|
|
border-top: 1px solid #000;
|
|
|
|
|
padding-top: 5px;
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
2025-03-17 17:16:02 +08:00
|
|
|
|
.report-footer-text {
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-18 11:08:26 +08:00
|
|
|
|
|
|
|
|
|
/* 首页页码在预览时隐藏 */
|
|
|
|
|
.first-page-number {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 打印时显示首页页码 */
|
|
|
|
|
@media print {
|
|
|
|
|
.first-page-number {
|
|
|
|
|
display: block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 10px;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-19 09:53:03 +08:00
|
|
|
|
|
|
|
|
|
/* 前言页面样式 */
|
|
|
|
|
.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 {
|
2025-03-20 11:23:46 +08:00
|
|
|
|
margin-bottom: 40px;
|
|
|
|
|
line-height: 2.5; /* 增加行间距 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preface-paragraphs p {
|
|
|
|
|
margin-bottom: 40px; /* 段落之间的间距 */
|
|
|
|
|
line-height: 2.5; /* 段落内的行间距 */
|
2025-03-19 09:53:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.preface-footer {
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.hospital-name {
|
2025-03-20 11:23:46 +08:00
|
|
|
|
margin-top: 60px;
|
2025-03-19 09:53:03 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
2025-03-19 14:48:37 +08:00
|
|
|
|
|
|
|
|
|
/* 新增汇总部分样式 */
|
|
|
|
|
.summary-section {
|
|
|
|
|
padding: 15px 30px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.summary-title {
|
|
|
|
|
text-align: center !important;
|
|
|
|
|
margin-bottom: 30px !important;
|
|
|
|
|
font-size: 24px !important;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.summary-notice {
|
|
|
|
|
margin: 20px 0 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.notice-text {
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
margin: 0 0 5px 0 !important;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.notice-line {
|
|
|
|
|
border-bottom: 1px solid #000;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.summary-content {
|
|
|
|
|
white-space: pre-wrap !important;
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
margin: 15px 40px !important;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
}
|
2025-03-31 17:27:25 +08:00
|
|
|
|
|
2025-03-19 14:48:37 +08:00
|
|
|
|
|
|
|
|
|
.summary-tip {
|
|
|
|
|
margin-top: 20px !important;
|
|
|
|
|
padding: 15px !important;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.summary-tip p {
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 打印样式调整 */
|
|
|
|
|
@media print {
|
|
|
|
|
.summary-title {
|
|
|
|
|
font-size: 20px !important;
|
|
|
|
|
margin-bottom: 20px !important;
|
|
|
|
|
}
|
2025-03-20 17:39:41 +08:00
|
|
|
|
|
2025-03-19 14:48:37 +08:00
|
|
|
|
.notice-text {
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
}
|
2025-03-20 17:39:41 +08:00
|
|
|
|
|
2025-03-19 14:48:37 +08:00
|
|
|
|
.summary-content {
|
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
margin: 10px 30px !important;
|
|
|
|
|
}
|
2025-03-20 17:39:41 +08:00
|
|
|
|
|
2025-03-19 14:48:37 +08:00
|
|
|
|
.summary-tip {
|
|
|
|
|
margin-top: 17px !important;
|
|
|
|
|
padding: 10px !important;
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
}
|
2025-03-20 17:39:41 +08:00
|
|
|
|
|
2025-03-19 14:48:37 +08:00
|
|
|
|
.summary-tip p {
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-31 11:34:30 +08:00
|
|
|
|
|
|
|
|
|
/* 只调整尿常规报告小结左侧距离设置 */
|
|
|
|
|
@media print {
|
|
|
|
|
/* 尿常规小结部分 */
|
|
|
|
|
#urine-summary-div {
|
|
|
|
|
padding: 5px 0 5px 80px !important; /* 增加左内边距到80px,与超声保持一致 */
|
|
|
|
|
margin-left: 20px !important;
|
|
|
|
|
margin-right: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 尿常规续页内容 */
|
|
|
|
|
#urine-page-2 .summary-content {
|
|
|
|
|
padding-left: 80px !important;
|
|
|
|
|
margin-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</style>
|
|
|
|
|
</head>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<body>
|
|
|
|
|
<div class="report-container">
|
2025-03-17 16:08:40 +08:00
|
|
|
|
<!-- 添加首页 -->
|
|
|
|
|
<div class="report-item" style="width: 800px;height: 1123px;margin:0 auto;position: relative;">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<span> 体检编号:--</span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-19 14:52:42 +08:00
|
|
|
|
<!-- 添加标题下方的文字,靠右对齐 -->
|
|
|
|
|
<div style="text-align: right; padding: 10px 20px; font-size: 16px; color: #333;">
|
|
|
|
|
本报告属个人隐私范畴</br>
|
|
|
|
|
未获本人同意,不得传播
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repott_concent" style="top: -350px;">
|
|
|
|
|
<div style="display: flex; align-items: flex-start; justify-content: center; margin-bottom: 20px;">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<img src="/inspect/首页标签.png" alt="logo"
|
2025-03-19 14:52:42 +08:00
|
|
|
|
style="width: 85px; height: 92px; ">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="repott_concent_area">
|
|
|
|
|
<div class="repott_concent_title">健康</div>
|
|
|
|
|
<div class="repott_concent_title">体检</div>
|
|
|
|
|
<div class="repott_concent_title">报告</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repott_concent_english">
|
|
|
|
|
<div class="repott_concent_english_health">Health</div>
|
|
|
|
|
<div class="repott_concent_Examination">Examination</div>
|
|
|
|
|
<div class="repott_concent_Report">Report</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-17 16:08:40 +08:00
|
|
|
|
</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<!-- 添加头像区域 -->
|
|
|
|
|
<div class="avatar-container">
|
|
|
|
|
<img src="" alt="头像" class="avatar-image" id="avatar-image">
|
|
|
|
|
</div>
|
2025-03-17 16:08:40 +08:00
|
|
|
|
<div style="margin-top: 100px;">
|
|
|
|
|
<div class="person_detail">
|
|
|
|
|
<span class="person_title">姓名</span><span class="person_content">--</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="person_detail">
|
|
|
|
|
<span class="person_title">性别</span><span class="person_content">--</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="person_detail">
|
|
|
|
|
<span class="person_title">年龄</span><span class="person_content">--</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="person_detail">
|
2025-03-19 15:18:04 +08:00
|
|
|
|
<span class="person_title" style="letter-spacing: 4px;">身份证号</span><span
|
|
|
|
|
class="person_content">--</span>
|
2025-03-17 16:08:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="person_detail">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<span class="person_title" style="letter-spacing: 4px;">联系电话</span><span
|
|
|
|
|
class="person_content">--</span>
|
2025-03-17 16:08:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="person_detail">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<span class="person_title" style="letter-spacing: 4px;">体检日期</span><span
|
|
|
|
|
class="person_content">--</span>
|
2025-03-17 16:08:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-20 11:23:46 +08:00
|
|
|
|
<div style="text-align: center; margin-top: 80px;">
|
|
|
|
|
<span style="font-size: 18px;">兴和县卫生健康委员会</span>
|
|
|
|
|
</div>
|
2025-03-17 16:08:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<!-- 前言 -->
|
|
|
|
|
<div class="report-item" style="width: 800px;height: 1123px;margin:0 auto;position: relative;">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
2025-03-19 09:42:58 +08:00
|
|
|
|
<span></span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span>填充值</span>
|
2025-03-19 14:52:42 +08:00
|
|
|
|
|
2025-03-17 18:02:47 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-19 09:53:03 +08:00
|
|
|
|
<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>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-19 09:53:03 +08:00
|
|
|
|
<div class="preface-paragraphs">
|
2025-03-20 11:23:46 +08:00
|
|
|
|
<p style="line-height: 2.5; margin-bottom: 40px;">您好!欢迎参加国家基本公共卫生服务老年人健康体检项目。</p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-20 11:23:46 +08:00
|
|
|
|
<p style="line-height: 2.5; margin-bottom: 40px;">健康体检是在自我感觉健康的情况下,通过医学手段对身体各脏器的状态进行的检测。定期的健康体检可以帮助您及早发现健康状态下的危机,为您的健康保驾护航。</p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-20 11:23:46 +08:00
|
|
|
|
<p style="line-height: 2.5; margin-bottom: 40px;">希望您仔细阅读并妥善保管这份体检报告,给予充分的重视。如有疑问请及时与我院进行联系。</p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-20 11:23:46 +08:00
|
|
|
|
<p style="line-height: 2.5; margin-bottom: 40px;">我们希望能够与您建立长期的联系,并为您建立健康档案,以便对您的健康状态进行长期的追踪,为您的健康提供长期的帮助和服务。</p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-20 11:23:46 +08:00
|
|
|
|
<p style="line-height: 2.5; margin-bottom: 40px;">由于体检项目和检测手段所限,一次体检不能全部检出身体中的潜在隐患,一旦发现身体出现不适,请及时到医院进行就诊。</p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2025-03-19 09:53:03 +08:00
|
|
|
|
<div class="preface-footer">
|
2025-03-19 15:18:04 +08:00
|
|
|
|
<p class="hospital-name">兴和县卫生健康委员会</p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第1页</div>
|
2025-03-17 14:54:53 +08:00
|
|
|
|
</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
</br>
|
|
|
|
|
<!-- 汇总 -->
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<div class="report-item" id="summary-page-1" style="width: 800px;height: 1123px;margin:0 auto;position: relative;">
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
2025-03-19 15:18:04 +08:00
|
|
|
|
<span></span>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<div class="summary-section">
|
2025-03-19 14:48:37 +08:00
|
|
|
|
<h2 class="summary-title">检查结果汇总</h2>
|
|
|
|
|
<div class="summary-notice">
|
|
|
|
|
<p class="notice-text">在本次体检的项目中,您有以下几方面的情况敬请注意:</p>
|
|
|
|
|
<div class="notice-line"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph-group">
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<p id="summary-content-1" class="summary-content">
|
|
|
|
|
<!-- 第一页汇总内容 -->
|
2025-03-19 14:48:37 +08:00
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2025-04-03 17:27:34 +08:00
|
|
|
|
<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>
|
2025-03-19 14:48:37 +08:00
|
|
|
|
<div class="summary-tip">
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<p id="summary-tip-1">温馨提示:本次体检未发现异常的部分,不代表完全没有潜在性疾病,如有疾病或身体不适,要立即就医。</p>
|
2025-03-19 14:48:37 +08:00
|
|
|
|
</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="report-footer">
|
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第2页</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<p> </p>
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<!-- 汇总续页 -->
|
|
|
|
|
<div class="report-item" id="summary-page-2" style="width: 800px;height: 1123px;margin:0 auto;position: relative; display: none;">
|
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<span></span>
|
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="summary-section">
|
|
|
|
|
<h2 class="summary-title">检查结果汇总</h2>
|
|
|
|
|
<div class="summary-notice">
|
|
|
|
|
<p class="notice-text">在本次体检的项目中,您有以下几方面的情况敬请注意:</p>
|
|
|
|
|
<div class="notice-line"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph-group">
|
|
|
|
|
<p id="summary-content-2" class="summary-content">
|
|
|
|
|
<!-- 第二页汇总内容 -->
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2025-04-03 17:27:34 +08:00
|
|
|
|
<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>
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<div class="summary-tip">
|
|
|
|
|
<p>温馨提示:本次体检未发现异常的部分,不代表完全没有潜在性疾病,如有疾病或身体不适,要立即就医。</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="report-footer">
|
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第3页</div>
|
2025-03-21 14:07:36 +08:00
|
|
|
|
</div>
|
|
|
|
|
<p> </p>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<!-- 一般检查部分 -->
|
|
|
|
|
<div class="report-item general-exam">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
|
|
|
<span style="display: none; ">一般检查</span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">一般检查</span>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-content" id="general-exam-content">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<table class="exam-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>检查项目</th>
|
|
|
|
|
<th>检查结果</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>体温</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>脉率</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>呼吸频率</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>血压</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>腰围</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>身高</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>体重</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>体质指数(BMI)</td>
|
|
|
|
|
<td>--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-summary" id="general-exam-summary">
|
2025-03-19 17:28:05 +08:00
|
|
|
|
<h4>一般检查小结:</h4>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<p>--</p>
|
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第4页</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 超声检查报告 -->
|
|
|
|
|
<div class="report-item ultrasound-exam">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<span></span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span class="report-number">填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div class="USPrinttitleDiv" style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">超声检查报告</span>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-content" id="ultrasound-exam-content">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<!-- 屏幕查看时显示PDF -->
|
|
|
|
|
<div class="screen-only">
|
|
|
|
|
<iframe src=""></iframe>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 打印时显示渲染的PDF -->
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="print-only pdf-container" data-pdf-url="" id="ultrasound-exam-pdf-container">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<div class="pdf-loading">正在准备PDF预览...</div>
|
|
|
|
|
<!-- 添加图片容器,用于存放渲染后的图片 -->
|
|
|
|
|
<div class="pdf-image-container" style="display:none;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 14:50:26 +08:00
|
|
|
|
<div class="report-summary" id="ultrasound-summary">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<p>
|
|
|
|
|
<strong>【所见】</strong>
|
|
|
|
|
<br>--
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<strong>【所得】</strong>
|
|
|
|
|
<br>--
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第5页</div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 尿常规检查报告 -->
|
|
|
|
|
<div class="report-item">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
|
|
|
<span style="display: none; ">尿常规检查报告</span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span class="report-number">填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">尿常规检查报告</span>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-content" id="urine-exam-content">
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 屏幕查看时显示PDF -->
|
|
|
|
|
<div class="screen-only">
|
2025-03-17 14:54:53 +08:00
|
|
|
|
<iframe src=""></iframe>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 打印时显示渲染的PDF -->
|
2025-03-17 14:54:53 +08:00
|
|
|
|
<div class="print-only pdf-container" data-pdf-url="">
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<div class="pdf-loading">正在准备PDF预览...</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<!-- 添加图片容器 -->
|
|
|
|
|
<div class="pdf-image-container" style="display:none;"></div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-25 11:15:48 +08:00
|
|
|
|
<div class="report-summary" id="urine-summary-div">
|
2025-03-19 17:28:05 +08:00
|
|
|
|
<h4>尿常规小结:</h4>
|
2025-03-25 11:15:48 +08:00
|
|
|
|
<p id="urine-summary-content" style="white-space: pre-line">--</p>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第6页</div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-25 15:10:46 +08:00
|
|
|
|
<!-- 尿常规续页 -->
|
|
|
|
|
<div class="report-item" id="urine-page-2" style="width: 800px;height: 1123px;margin:0 auto;position: relative; display: none;">
|
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<span></span>
|
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="summary-section">
|
|
|
|
|
<h2 class="summary-title">尿常规检查报告</h2>
|
|
|
|
|
<div class="paragraph-group">
|
|
|
|
|
<p id="urine-content-2" class="summary-content">
|
|
|
|
|
<!-- 第二页尿常规小结内容 -->
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="report-footer">
|
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第7页</div>
|
2025-03-25 15:10:46 +08:00
|
|
|
|
</div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
|
|
|
|
|
<!-- 生化检查报告 -->
|
|
|
|
|
<div class="report-item">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
|
|
|
<span style="display: none; ">生化检查报告</span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span class="report-number">填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">生化检查报告</span>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-content" id="biochemistry-exam-content">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 屏幕查看时显示PDF -->
|
|
|
|
|
<div class="screen-only">
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<iframe src="" +#toolbar=0&navpanes=0&view=Fit></iframe>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 打印时显示渲染的PDF -->
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="print-only pdf-container" data-pdf-url="" id="biochemistry-exam-pdf-container">
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<div class="pdf-loading">正在准备PDF预览...</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<!-- 添加图片容器 -->
|
|
|
|
|
<div class="pdf-image-container" style="display:none;"></div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-25 11:15:48 +08:00
|
|
|
|
<div class="report-summary" id="biochemistry-summary-div">
|
2025-03-19 17:28:05 +08:00
|
|
|
|
<h4>生化小结:</h4>
|
2025-03-25 11:15:48 +08:00
|
|
|
|
<p id="biochemistry-summary-content" style="white-space: pre-line">--</p>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-03-21 14:07:36 +08:00
|
|
|
|
<div class="page-number">第8页</div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2025-03-25 15:10:46 +08:00
|
|
|
|
<!-- 生化检查报告续页 -->
|
|
|
|
|
<div class="report-item" id="biochemistry-page-2" style="width: 800px;height: 1123px;margin:0 auto;position: relative; display: none;">
|
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<span></span>
|
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="summary-section">
|
|
|
|
|
<h2 class="summary-title">生化检查报告</h2>
|
|
|
|
|
<div class="paragraph-group">
|
|
|
|
|
<p id="biochemistry-content-2" class="summary-content">
|
|
|
|
|
<!-- 第二页生化小结内容 -->
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="report-footer">
|
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
|
|
|
|
<div class="page-number">第9页</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 血常规检查报告 -->
|
|
|
|
|
<div class="report-item">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
|
|
|
<span style="display: none; ">血常规检查报告</span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span class="report-number">填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">血常规检查报告</span>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-content" id="blood-exam-content" >
|
2025-03-21 17:38:35 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 屏幕查看时显示PDF -->
|
|
|
|
|
<div class="screen-only">
|
2025-03-17 14:54:53 +08:00
|
|
|
|
<iframe src=""></iframe>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 打印时显示渲染的PDF -->
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="print-only pdf-container" data-pdf-url="" id="blood-exam-pdf-container">
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<div class="pdf-loading">正在准备PDF预览...</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<!-- 添加图片容器 -->
|
|
|
|
|
<div class="pdf-image-container" style="display:none;"></div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-25 11:15:48 +08:00
|
|
|
|
<div class="report-summary" id="blood-summary-div">
|
2025-03-19 17:28:05 +08:00
|
|
|
|
<h4>血常规小结:</h4>
|
2025-03-25 11:15:48 +08:00
|
|
|
|
<p id="blood-summary-content" style="white-space: pre-line">--</p>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第10页</div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2025-03-25 15:10:46 +08:00
|
|
|
|
<!-- 血常规检查报告续页 -->
|
|
|
|
|
<div class="report-item" id="blood-page-2" style="width: 800px;height: 1123px;margin:0 auto;position: relative; display: none;">
|
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
<span></span>
|
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="summary-section">
|
|
|
|
|
<h2 class="summary-title">血常规检查报告</h2>
|
|
|
|
|
<div class="paragraph-group">
|
|
|
|
|
<p id="blood-content-2" class="summary-content">
|
|
|
|
|
<!-- 第二页血常规小结内容 -->
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="report-footer">
|
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第11页</div>
|
2025-03-25 15:10:46 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 心电图检查报告 -->
|
|
|
|
|
<div class="report-item">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<div class="report-title">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
|
|
|
<span style="display: none; ">心电图检查报告</span>
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<span class="report-number">填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">心电图检查报告</span>
|
|
|
|
|
</div>
|
2025-03-25 11:08:54 +08:00
|
|
|
|
<div class="report-content" id="ecg-exam-content">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<img src="" alt="心电图检查">
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-21 14:50:26 +08:00
|
|
|
|
<div class="report-summary" id="ecg-summary">
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<p><strong>【所见】</strong>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<br>--
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p><strong>【所得】</strong>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
<br>--
|
|
|
|
|
</p>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
<div class="report-footer">
|
2025-03-17 18:02:47 +08:00
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
2025-03-17 17:16:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第11页</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!-- 中医体质辨识 -->
|
|
|
|
|
<div class="report-item" style="width: 800px;height: 1123px;margin:0 auto;position: relative;">
|
|
|
|
|
<div class="report-title">
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<span></span>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<span>填充值</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-21 17:38:35 +08:00
|
|
|
|
<div style="text-align: center;margin-top: 5px;">
|
|
|
|
|
<span style="font-size: 20px;font-weight: bold;">中医体质辨识</span>
|
|
|
|
|
</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<table class="constitution-table" id="constitution-result" style="margin: 10px auto 30px;">
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="50%" style="text-align: center;">体质辨识结果</td>
|
|
|
|
|
<td width="50%" class="constitution-value" style="text-align: center;">--</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2025-03-20 17:39:41 +08:00
|
|
|
|
<!-- 添加体质辨识结果详情容器 -->
|
|
|
|
|
<div id="constitution-detail-container" class="constitution-detail-container">
|
|
|
|
|
<!-- 这里将通过JavaScript赋值 -->
|
|
|
|
|
</div>
|
2025-03-18 11:08:26 +08:00
|
|
|
|
<div class="report-footer">
|
|
|
|
|
<p class="report-footer-text">定期体检,尊享健康</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 添加页码 -->
|
2025-04-10 12:23:04 +08:00
|
|
|
|
<div class="page-number">第12页</div>
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<!-- 添加PDF渲染脚本 -->
|
|
|
|
|
<script>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
// 设置PDF.js worker
|
|
|
|
|
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.4.120/pdf.worker.min.js';
|
|
|
|
|
|
|
|
|
|
// 页面加载完成后立即开始预渲染所有PDF为图片
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
preRenderAllPDFs();
|
|
|
|
|
}, 1000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 预渲染所有PDF为图片
|
|
|
|
|
async function preRenderAllPDFs() {
|
|
|
|
|
const containers = document.querySelectorAll('.pdf-container');
|
|
|
|
|
|
|
|
|
|
for (const container of containers) {
|
|
|
|
|
const pdfUrl = container.getAttribute('data-pdf-url');
|
|
|
|
|
if (pdfUrl) {
|
|
|
|
|
try {
|
|
|
|
|
await renderPDFAsImage(pdfUrl, container);
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('预渲染PDF失败:', error);
|
|
|
|
|
showPDFError(container, pdfUrl);
|
|
|
|
|
}
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
|
|
|
|
// 将PDF渲染为图片 - 完全重写
|
|
|
|
|
async function renderPDFAsImage(url, container) {
|
|
|
|
|
try {
|
|
|
|
|
const loadingElem = container.querySelector('.pdf-loading');
|
|
|
|
|
const imageContainer = container.querySelector('.pdf-image-container');
|
|
|
|
|
|
|
|
|
|
// 加载PDF
|
|
|
|
|
const loadingTask = pdfjsLib.getDocument({
|
|
|
|
|
url: url,
|
|
|
|
|
withCredentials: false,
|
|
|
|
|
cMapUrl: 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.4.120/cmaps/',
|
|
|
|
|
cMapPacked: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const pdf = await loadingTask.promise;
|
|
|
|
|
// 只渲染第一页
|
|
|
|
|
const page = await pdf.getPage(1);
|
|
|
|
|
|
|
|
|
|
// 检查是否为超声检查报告
|
2025-03-21 13:10:45 +08:00
|
|
|
|
let scale = 1.7;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
// 查找最近的report-item父元素,检查是否有ultrasound-exam类
|
|
|
|
|
const reportItem = container.closest('.report-item');
|
|
|
|
|
if (reportItem && reportItem.classList.contains('ultrasound-exam')) {
|
|
|
|
|
// 超声检查报告使用更大的缩放比例
|
|
|
|
|
scale = 3.0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const viewport = page.getViewport({ scale: scale });
|
|
|
|
|
|
|
|
|
|
// 创建canvas
|
|
|
|
|
const canvas = document.createElement('canvas');
|
|
|
|
|
const context = canvas.getContext('2d');
|
|
|
|
|
canvas.height = viewport.height;
|
|
|
|
|
canvas.width = viewport.width;
|
|
|
|
|
|
|
|
|
|
// 渲染PDF页面到canvas
|
|
|
|
|
const renderContext = {
|
|
|
|
|
canvasContext: context,
|
|
|
|
|
viewport: viewport
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
await page.render(renderContext).promise;
|
|
|
|
|
|
|
|
|
|
// 裁剪canvas - 移除底部多余空白
|
|
|
|
|
// 这里我们尝试自动检测内容区域,避免显示多余的空白
|
|
|
|
|
const imageData = context.getImageData(0, 0, canvas.width, canvas.height);
|
|
|
|
|
const data = imageData.data;
|
|
|
|
|
|
|
|
|
|
// 从底部向上扫描,找到最后一行非空白像素
|
|
|
|
|
let bottomContentLine = canvas.height - 1;
|
|
|
|
|
let foundContent = false;
|
|
|
|
|
|
|
|
|
|
// 向上扫描最多200像素,寻找内容
|
|
|
|
|
for (let y = canvas.height - 1; y > canvas.height - 200 && !foundContent; y--) {
|
|
|
|
|
for (let x = 0; x < canvas.width; x++) {
|
|
|
|
|
const idx = (y * canvas.width + x) * 4;
|
|
|
|
|
// 检查像素是否不是白色(简单判断)
|
|
|
|
|
if (data[idx] < 240 || data[idx + 1] < 240 || data[idx + 2] < 240) {
|
|
|
|
|
bottomContentLine = y + 20; // 添加一些边距
|
|
|
|
|
foundContent = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
|
|
|
|
// 创建新的canvas,只包含内容部分
|
|
|
|
|
const newCanvas = document.createElement('canvas');
|
|
|
|
|
newCanvas.width = canvas.width;
|
|
|
|
|
newCanvas.height = Math.min(bottomContentLine + 1, canvas.height);
|
|
|
|
|
const newContext = newCanvas.getContext('2d');
|
|
|
|
|
|
|
|
|
|
// 将原canvas的内容复制到新canvas
|
|
|
|
|
newContext.drawImage(
|
|
|
|
|
canvas,
|
|
|
|
|
0, 0, canvas.width, newCanvas.height,
|
|
|
|
|
0, 0, newCanvas.width, newCanvas.height
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// 将新canvas转换为图片
|
|
|
|
|
const imgData = newCanvas.toDataURL('image/png');
|
|
|
|
|
const img = document.createElement('img');
|
|
|
|
|
img.src = imgData;
|
|
|
|
|
img.alt = 'PDF预览';
|
|
|
|
|
|
|
|
|
|
// 添加页码信息
|
|
|
|
|
const pageInfo = document.createElement('p');
|
|
|
|
|
// pageInfo.textContent = `第1页,共${pdf.numPages}页`;
|
|
|
|
|
// pageInfo.className = 'pdf-page-info';
|
|
|
|
|
|
|
|
|
|
// 清空并添加图片
|
|
|
|
|
imageContainer.innerHTML = '';
|
|
|
|
|
imageContainer.appendChild(img);
|
|
|
|
|
imageContainer.appendChild(pageInfo);
|
|
|
|
|
|
|
|
|
|
// 隐藏加载提示,显示图片
|
|
|
|
|
if (loadingElem) loadingElem.style.display = 'none';
|
|
|
|
|
imageContainer.style.display = 'block';
|
|
|
|
|
return true;
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('渲染PDF为图片失败:', error);
|
|
|
|
|
throw error;
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 显示PDF错误信息
|
|
|
|
|
function showPDFError(container, url) {
|
|
|
|
|
const loadingElem = container.querySelector('.pdf-loading');
|
2025-03-17 10:18:30 +08:00
|
|
|
|
if (loadingElem) loadingElem.style.display = 'none';
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
|
|
|
|
const imageContainer = container.querySelector('.pdf-image-container');
|
|
|
|
|
imageContainer.innerHTML = `
|
2025-03-17 10:18:30 +08:00
|
|
|
|
<div class="pdf-error">
|
|
|
|
|
<p>无法加载PDF预览</p>
|
|
|
|
|
<p>请访问以下链接查看完整报告:</p>
|
|
|
|
|
<p>${url}</p>
|
|
|
|
|
</div>
|
|
|
|
|
`;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
imageContainer.style.display = 'block';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 打印前事件处理
|
|
|
|
|
window.addEventListener('beforeprint', () => {
|
|
|
|
|
// 显示所有打印容器
|
|
|
|
|
document.querySelectorAll('.print-only').forEach(el => {
|
|
|
|
|
el.style.display = 'block';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 检查是否所有PDF都已渲染为图片
|
|
|
|
|
const containers = document.querySelectorAll('.pdf-container');
|
|
|
|
|
let allRendered = true;
|
|
|
|
|
|
|
|
|
|
containers.forEach(container => {
|
|
|
|
|
const imageContainer = container.querySelector('.pdf-image-container');
|
|
|
|
|
if (imageContainer.style.display !== 'block') {
|
2025-03-19 14:52:42 +08:00
|
|
|
|
allRendered = false;
|
2025-03-17 16:43:28 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (!allRendered) {
|
|
|
|
|
preRenderAllPDFs().catch(error => {
|
|
|
|
|
console.error('打印前渲染失败:', error);
|
|
|
|
|
});
|
2025-03-17 10:18:30 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
2025-03-21 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
// 处理汇总内容分页修改
|
|
|
|
|
function handleSummaryPagination(summaryText) {
|
2025-03-31 17:27:25 +08:00
|
|
|
|
// 添加处理标记,防止重复处理
|
|
|
|
|
if (window._summaryProcessed && document.getElementById('summary-content-1').textContent) {
|
|
|
|
|
console.log('汇总内容已处理,跳过重复操作');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 设置处理标记
|
|
|
|
|
window._summaryProcessed = true;
|
|
|
|
|
|
2025-03-21 14:07:36 +08:00
|
|
|
|
if (!summaryText || summaryText === '--') {
|
|
|
|
|
// 如果没有汇总内容,隐藏第二页
|
|
|
|
|
document.getElementById('summary-page-2').style.display = 'none';
|
|
|
|
|
document.getElementById('summary-content-1').textContent = '--';
|
|
|
|
|
document.getElementById('summary-tip-1').style.display = '';
|
2025-04-03 17:27:34 +08:00
|
|
|
|
// 显示第一页的总检医生签名
|
|
|
|
|
document.getElementById('summary-doctor-name').style.display = '';
|
|
|
|
|
document.getElementById('summary-doctor-image').style.display = '';
|
2025-03-21 14:07:36 +08:00
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建临时元素测量内容高度
|
|
|
|
|
const testElement = document.createElement('div');
|
|
|
|
|
testElement.className = 'summary-content';
|
|
|
|
|
testElement.style.position = 'absolute';
|
|
|
|
|
testElement.style.visibility = 'hidden';
|
|
|
|
|
testElement.style.width = document.getElementById('summary-content-1').offsetWidth + 'px';
|
|
|
|
|
testElement.textContent = summaryText;
|
|
|
|
|
document.body.appendChild(testElement);
|
|
|
|
|
|
|
|
|
|
// 获取第一页汇总内容区域的可用高度 (调整这个值根据实际布局)
|
|
|
|
|
const availableHeight = 800; // 大约可用高度,根据实际情况调整
|
|
|
|
|
|
|
|
|
|
if (testElement.offsetHeight <= availableHeight) {
|
|
|
|
|
// 内容不超过一页,隐藏第二页
|
|
|
|
|
document.getElementById('summary-content-1').textContent = summaryText;
|
|
|
|
|
document.getElementById('summary-page-2').style.display = 'none';
|
|
|
|
|
document.getElementById('summary-tip-1').style.display = '';
|
2025-04-03 17:27:34 +08:00
|
|
|
|
// 显示第一页的总检医生签名
|
|
|
|
|
document.getElementById('summary-doctor-name').style.display = '';
|
|
|
|
|
document.getElementById('summary-doctor-image').style.display = '';
|
2025-03-21 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
} else {
|
|
|
|
|
// 内容超过一页,需要分割
|
|
|
|
|
// 计算每个字符占用的平均高度
|
|
|
|
|
const avgCharHeight = testElement.offsetHeight / summaryText.length;
|
|
|
|
|
// 计算第一页可容纳的字符数
|
|
|
|
|
const firstPageChars = Math.floor(availableHeight / avgCharHeight);
|
|
|
|
|
|
|
|
|
|
// 分割文本
|
|
|
|
|
let firstPageText = summaryText.substring(0, firstPageChars);
|
|
|
|
|
let secondPageText = summaryText.substring(firstPageChars);
|
|
|
|
|
|
|
|
|
|
// 尝试在更合适的位置分割,如句号或逗号
|
2025-03-21 17:38:35 +08:00
|
|
|
|
const breakPoints = ['】', '\n'];
|
2025-03-21 14:07:36 +08:00
|
|
|
|
for (let i = 30; i > 0; i--) {
|
|
|
|
|
const checkPos = firstPageChars - i;
|
|
|
|
|
if (checkPos <= 0) continue;
|
|
|
|
|
const char = summaryText.charAt(checkPos);
|
|
|
|
|
if (breakPoints.includes(char)) {
|
|
|
|
|
firstPageText = summaryText.substring(0, checkPos + 1);
|
|
|
|
|
secondPageText = summaryText.substring(checkPos + 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新内容并显示第二页
|
|
|
|
|
document.getElementById('summary-content-1').textContent = firstPageText;
|
|
|
|
|
document.getElementById('summary-content-2').textContent = secondPageText;
|
|
|
|
|
document.getElementById('summary-page-2').style.display = 'block';
|
|
|
|
|
document.getElementById('summary-tip-1').style.display = 'none';
|
2025-04-03 17:27:34 +08:00
|
|
|
|
// 隐藏第一页的总检医生签名
|
|
|
|
|
document.getElementById('summary-doctor-name').style.display = 'none';
|
|
|
|
|
document.getElementById('summary-doctor-image').style.display = 'none';
|
2025-03-21 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 移除测试元素
|
|
|
|
|
document.body.removeChild(testElement);
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-21 15:41:23 +08:00
|
|
|
|
// 更新后续页码
|
|
|
|
|
function updatePageNumbers() {
|
|
|
|
|
// 获取所有页码元素
|
|
|
|
|
const pageNumbers = document.querySelectorAll('.page-number');
|
|
|
|
|
const summaryPage2Visible = document.getElementById('summary-page-2').style.display !== 'none';
|
|
|
|
|
|
|
|
|
|
// 计算实际总页数
|
|
|
|
|
let totalPages = document.querySelectorAll('.report-item').length;
|
|
|
|
|
if (!summaryPage2Visible) {
|
|
|
|
|
totalPages--; // 如果汇总第二页不显示,减少总页数
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从第1页开始计数
|
|
|
|
|
let pageIndex = 1;
|
|
|
|
|
|
|
|
|
|
pageNumbers.forEach((element) => {
|
|
|
|
|
// 更新页码文本
|
|
|
|
|
element.textContent = `第${pageIndex}页 共${totalPages}页`;
|
|
|
|
|
pageIndex++;
|
|
|
|
|
|
|
|
|
|
// 如果第二页汇总不显示,并且这是第四页的页码元素(即原本应该是汇总第二页),则跳过该元素
|
|
|
|
|
if (!summaryPage2Visible && element.closest('#summary-page-2')) {
|
|
|
|
|
// 不增加pageIndex,因为这一页不会显示
|
|
|
|
|
pageIndex--;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-25 15:10:46 +08:00
|
|
|
|
// 处理尿常规内容分页
|
|
|
|
|
function handleUrinePagination(urineText) {
|
|
|
|
|
if (!urineText || urineText === '--') {
|
|
|
|
|
// 如果没有尿常规内容,隐藏第二页
|
|
|
|
|
document.getElementById('urine-page-2').style.display = 'none';
|
|
|
|
|
document.getElementById('urine-summary-content').textContent = '--';
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建临时元素测量内容高度
|
|
|
|
|
const testElement = document.createElement('div');
|
|
|
|
|
testElement.className = 'summary-content';
|
|
|
|
|
testElement.style.position = 'absolute';
|
|
|
|
|
testElement.style.visibility = 'hidden';
|
|
|
|
|
testElement.style.width = document.getElementById('urine-summary-content').offsetWidth + 'px';
|
|
|
|
|
testElement.style.whiteSpace = 'pre-line';
|
|
|
|
|
testElement.textContent = urineText;
|
|
|
|
|
document.body.appendChild(testElement);
|
|
|
|
|
|
|
|
|
|
// 获取尿常规内容区域的可用高度
|
2025-03-31 13:28:19 +08:00
|
|
|
|
const availableHeight = 270; // 大约可用高度,根据实际情况调整
|
2025-03-25 15:10:46 +08:00
|
|
|
|
|
|
|
|
|
if (testElement.offsetHeight <= availableHeight) {
|
|
|
|
|
// 内容不超过一页,隐藏第二页
|
|
|
|
|
document.getElementById('urine-summary-content').textContent = urineText;
|
|
|
|
|
document.getElementById('urine-page-2').style.display = 'none';
|
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
} else {
|
|
|
|
|
// 内容超过一页,需要分割
|
|
|
|
|
// 计算每个字符占用的平均高度
|
|
|
|
|
const avgCharHeight = testElement.offsetHeight / urineText.length;
|
|
|
|
|
// 计算第一页可容纳的字符数
|
|
|
|
|
const firstPageChars = Math.floor(availableHeight / avgCharHeight);
|
|
|
|
|
|
|
|
|
|
// 分割文本
|
|
|
|
|
let firstPageText = urineText.substring(0, firstPageChars);
|
|
|
|
|
let secondPageText = urineText.substring(firstPageChars);
|
|
|
|
|
|
|
|
|
|
// 尝试在更合适的位置分割,如句号或逗号
|
2025-03-31 13:28:19 +08:00
|
|
|
|
const breakPoints = ['】', '\n'];
|
2025-03-25 15:10:46 +08:00
|
|
|
|
for (let i = 30; i > 0; i--) {
|
|
|
|
|
const checkPos = firstPageChars - i;
|
|
|
|
|
if (checkPos <= 0) continue;
|
|
|
|
|
const char = urineText.charAt(checkPos);
|
|
|
|
|
if (breakPoints.includes(char)) {
|
|
|
|
|
firstPageText = urineText.substring(0, checkPos + 1);
|
|
|
|
|
secondPageText = urineText.substring(checkPos + 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新内容并显示第二页
|
|
|
|
|
document.getElementById('urine-summary-content').textContent = firstPageText;
|
|
|
|
|
document.getElementById('urine-content-2').textContent = secondPageText;
|
|
|
|
|
document.getElementById('urine-page-2').style.display = 'block';
|
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 移除测试元素
|
|
|
|
|
document.body.removeChild(testElement);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改updatePageNumbers函数以考虑尿常规续页
|
|
|
|
|
function updatePageNumbers() {
|
|
|
|
|
// 获取所有页码元素
|
|
|
|
|
const pageNumbers = document.querySelectorAll('.page-number');
|
|
|
|
|
const summaryPage2Visible = document.getElementById('summary-page-2').style.display !== 'none';
|
|
|
|
|
|
|
|
|
|
// 计算实际总页数
|
|
|
|
|
let totalPages = document.querySelectorAll('.report-item').length;
|
|
|
|
|
if (!summaryPage2Visible) {
|
|
|
|
|
totalPages--; // 如果汇总第二页不显示,减少总页数
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从第1页开始计数
|
|
|
|
|
let pageIndex = 1;
|
|
|
|
|
|
|
|
|
|
pageNumbers.forEach((element) => {
|
|
|
|
|
// 更新页码文本
|
|
|
|
|
element.textContent = `第${pageIndex}页 共${totalPages}页`;
|
|
|
|
|
pageIndex++;
|
|
|
|
|
|
|
|
|
|
// 如果第二页汇总不显示,并且这是第四页的页码元素(即原本应该是汇总第二页),则跳过该元素
|
|
|
|
|
if (!summaryPage2Visible && element.closest('#summary-page-2')) {
|
|
|
|
|
// 不增加pageIndex,因为这一页不会显示
|
|
|
|
|
pageIndex--;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 处理生化检查报告内容分页
|
|
|
|
|
function handleBiochemistryPagination(biochemistryText) {
|
|
|
|
|
if (!biochemistryText || biochemistryText === '--') {
|
|
|
|
|
// 如果没有生化内容,隐藏第二页
|
|
|
|
|
document.getElementById('biochemistry-page-2').style.display = 'none';
|
|
|
|
|
document.getElementById('biochemistry-summary-content').textContent = '--';
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建临时元素测量内容高度
|
|
|
|
|
const testElement = document.createElement('div');
|
|
|
|
|
testElement.className = 'summary-content';
|
|
|
|
|
testElement.style.position = 'absolute';
|
|
|
|
|
testElement.style.visibility = 'hidden';
|
|
|
|
|
testElement.style.width = document.getElementById('biochemistry-summary-content').offsetWidth + 'px';
|
|
|
|
|
testElement.style.whiteSpace = 'pre-line';
|
|
|
|
|
testElement.textContent = biochemistryText;
|
|
|
|
|
document.body.appendChild(testElement);
|
|
|
|
|
|
|
|
|
|
// 获取生化内容区域的可用高度
|
2025-03-31 13:28:19 +08:00
|
|
|
|
const availableHeight = 270; // 可用高度,与尿常规相同
|
2025-03-25 15:10:46 +08:00
|
|
|
|
|
|
|
|
|
if (testElement.offsetHeight <= availableHeight) {
|
|
|
|
|
// 内容不超过一页,隐藏第二页
|
|
|
|
|
document.getElementById('biochemistry-summary-content').textContent = biochemistryText;
|
|
|
|
|
document.getElementById('biochemistry-page-2').style.display = 'none';
|
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
} else {
|
|
|
|
|
// 内容超过一页,需要分割
|
|
|
|
|
// 计算每个字符占用的平均高度
|
|
|
|
|
const avgCharHeight = testElement.offsetHeight / biochemistryText.length;
|
|
|
|
|
// 计算第一页可容纳的字符数
|
|
|
|
|
const firstPageChars = Math.floor(availableHeight / avgCharHeight);
|
|
|
|
|
|
|
|
|
|
// 分割文本
|
|
|
|
|
let firstPageText = biochemistryText.substring(0, firstPageChars);
|
|
|
|
|
let secondPageText = biochemistryText.substring(firstPageChars);
|
|
|
|
|
|
|
|
|
|
// 尝试在更合适的位置分割,如句号或逗号
|
2025-03-31 13:28:19 +08:00
|
|
|
|
const breakPoints = ['】', '\n'];
|
2025-03-25 15:10:46 +08:00
|
|
|
|
for (let i = 30; i > 0; i--) {
|
|
|
|
|
const checkPos = firstPageChars - i;
|
|
|
|
|
if (checkPos <= 0) continue;
|
|
|
|
|
const char = biochemistryText.charAt(checkPos);
|
|
|
|
|
if (breakPoints.includes(char)) {
|
|
|
|
|
firstPageText = biochemistryText.substring(0, checkPos + 1);
|
|
|
|
|
secondPageText = biochemistryText.substring(checkPos + 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新内容并显示第二页
|
|
|
|
|
document.getElementById('biochemistry-summary-content').textContent = firstPageText;
|
|
|
|
|
document.getElementById('biochemistry-content-2').textContent = secondPageText;
|
|
|
|
|
document.getElementById('biochemistry-page-2').style.display = 'block';
|
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 移除测试元素
|
|
|
|
|
document.body.removeChild(testElement);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 处理血常规检查报告内容分页
|
|
|
|
|
function handleBloodPagination(bloodText) {
|
|
|
|
|
if (!bloodText || bloodText === '--') {
|
|
|
|
|
// 如果没有血常规内容,隐藏第二页
|
|
|
|
|
document.getElementById('blood-page-2').style.display = 'none';
|
|
|
|
|
document.getElementById('blood-summary-content').textContent = '--';
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建临时元素测量内容高度
|
|
|
|
|
const testElement = document.createElement('div');
|
|
|
|
|
testElement.className = 'summary-content';
|
|
|
|
|
testElement.style.position = 'absolute';
|
|
|
|
|
testElement.style.visibility = 'hidden';
|
|
|
|
|
testElement.style.width = document.getElementById('blood-summary-content').offsetWidth + 'px';
|
|
|
|
|
testElement.style.whiteSpace = 'pre-line';
|
|
|
|
|
testElement.textContent = bloodText;
|
|
|
|
|
document.body.appendChild(testElement);
|
|
|
|
|
|
|
|
|
|
// 获取血常规内容区域的可用高度
|
2025-03-31 13:28:19 +08:00
|
|
|
|
const availableHeight = 270; // 可用高度,与尿常规相同
|
2025-03-25 15:10:46 +08:00
|
|
|
|
|
|
|
|
|
if (testElement.offsetHeight <= availableHeight) {
|
|
|
|
|
// 内容不超过一页,隐藏第二页
|
|
|
|
|
document.getElementById('blood-summary-content').textContent = bloodText;
|
|
|
|
|
document.getElementById('blood-page-2').style.display = 'none';
|
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
} else {
|
|
|
|
|
// 内容超过一页,需要分割
|
|
|
|
|
// 计算每个字符占用的平均高度
|
|
|
|
|
const avgCharHeight = testElement.offsetHeight / bloodText.length;
|
|
|
|
|
// 计算第一页可容纳的字符数
|
|
|
|
|
const firstPageChars = Math.floor(availableHeight / avgCharHeight);
|
|
|
|
|
|
|
|
|
|
// 分割文本
|
|
|
|
|
let firstPageText = bloodText.substring(0, firstPageChars);
|
|
|
|
|
let secondPageText = bloodText.substring(firstPageChars);
|
|
|
|
|
|
|
|
|
|
// 尝试在更合适的位置分割,如句号或逗号
|
2025-03-31 13:28:19 +08:00
|
|
|
|
const breakPoints = ['】', '\n'];
|
2025-03-25 15:10:46 +08:00
|
|
|
|
for (let i = 30; i > 0; i--) {
|
|
|
|
|
const checkPos = firstPageChars - i;
|
|
|
|
|
if (checkPos <= 0) continue;
|
|
|
|
|
const char = bloodText.charAt(checkPos);
|
|
|
|
|
if (breakPoints.includes(char)) {
|
|
|
|
|
firstPageText = bloodText.substring(0, checkPos + 1);
|
|
|
|
|
secondPageText = bloodText.substring(checkPos + 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新内容并显示第二页
|
|
|
|
|
document.getElementById('blood-summary-content').textContent = firstPageText;
|
|
|
|
|
document.getElementById('blood-content-2').textContent = secondPageText;
|
|
|
|
|
document.getElementById('blood-page-2').style.display = 'block';
|
|
|
|
|
|
|
|
|
|
// 更新页码
|
|
|
|
|
updatePageNumbers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 移除测试元素
|
|
|
|
|
document.body.removeChild(testElement);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新updatePageNumbers函数以考虑所有续页
|
|
|
|
|
function updatePageNumbers() {
|
|
|
|
|
// 获取所有页码元素
|
|
|
|
|
const pageNumbers = document.querySelectorAll('.page-number');
|
|
|
|
|
const summaryPage2Visible = document.getElementById('summary-page-2').style.display !== 'none';
|
|
|
|
|
const urinePage2Visible = document.getElementById('urine-page-2').style.display !== 'none';
|
|
|
|
|
const biochemistryPage2Visible = document.getElementById('biochemistry-page-2').style.display !== 'none';
|
|
|
|
|
const bloodPage2Visible = document.getElementById('blood-page-2').style.display !== 'none';
|
|
|
|
|
|
2025-04-10 12:23:04 +08:00
|
|
|
|
// 计算实际总页数(从前言页开始计算)
|
|
|
|
|
let totalPages = document.querySelectorAll('.report-item').length - 1; // 减去首页
|
2025-03-25 15:10:46 +08:00
|
|
|
|
if (!summaryPage2Visible) totalPages--;
|
|
|
|
|
if (!urinePage2Visible) totalPages--;
|
|
|
|
|
if (!biochemistryPage2Visible) totalPages--;
|
|
|
|
|
if (!bloodPage2Visible) totalPages--;
|
|
|
|
|
|
2025-04-10 12:23:04 +08:00
|
|
|
|
// 从第1页开始计数(前言页作为第1页)
|
2025-03-25 15:10:46 +08:00
|
|
|
|
let pageIndex = 1;
|
|
|
|
|
|
|
|
|
|
pageNumbers.forEach((element) => {
|
|
|
|
|
// 更新页码文本
|
|
|
|
|
element.textContent = `第${pageIndex}页 共${totalPages}页`;
|
|
|
|
|
pageIndex++;
|
|
|
|
|
|
|
|
|
|
// 如果对应的报告第二页不显示,且这是该报告第二页的页码元素,则不增加pageIndex
|
|
|
|
|
if ((!summaryPage2Visible && element.closest('#summary-page-2')) ||
|
|
|
|
|
(!urinePage2Visible && element.closest('#urine-page-2')) ||
|
|
|
|
|
(!biochemistryPage2Visible && element.closest('#biochemistry-page-2')) ||
|
|
|
|
|
(!bloodPage2Visible && element.closest('#blood-page-2'))) {
|
|
|
|
|
pageIndex--;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-21 14:07:36 +08:00
|
|
|
|
// 页面加载完成后执行
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
|
// 现有代码...
|
|
|
|
|
|
2025-03-25 15:10:46 +08:00
|
|
|
|
// 等待数据填充后处理分页
|
2025-03-21 14:07:36 +08:00
|
|
|
|
setTimeout(() => {
|
|
|
|
|
const summaryText = document.getElementById('summary-content-1').textContent;
|
|
|
|
|
handleSummaryPagination(summaryText);
|
2025-03-25 15:10:46 +08:00
|
|
|
|
|
|
|
|
|
const urineText = document.getElementById('urine-summary-content').textContent;
|
|
|
|
|
handleUrinePagination(urineText);
|
|
|
|
|
|
|
|
|
|
const biochemistryText = document.getElementById('biochemistry-summary-content').textContent;
|
|
|
|
|
handleBiochemistryPagination(biochemistryText);
|
|
|
|
|
|
|
|
|
|
const bloodText = document.getElementById('blood-summary-content').textContent;
|
|
|
|
|
handleBloodPagination(bloodText);
|
2025-03-21 14:07:36 +08:00
|
|
|
|
}, 2000);
|
|
|
|
|
});
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</script>
|
|
|
|
|
</body>
|
2025-03-17 16:43:28 +08:00
|
|
|
|
|
2025-03-17 10:18:30 +08:00
|
|
|
|
</html>
|