样式修改

This commit is contained in:
Euni4U 2025-03-31 13:28:19 +08:00
parent 10b63c9ee0
commit ec07b415bb

View File

@ -301,16 +301,13 @@
/* 一般检查的小结 */ /* 一般检查的小结 */
.general-exam .report-summary { .general-exam .report-summary {
padding: 5px 40px !important; /* 增加左右内边距 */ padding: 5px 40px !important;
left: 0 !important; /* 重置left值因为我们使用padding */ position: static !important; /* 改为静态定位 */
right: 0 !important;
margin-left: 50px !important; margin-left: 50px !important;
margin-right: 20px !important; margin-right: 20px !important;
bottom: 170px !important; margin-top: 30px !important; /* 设置与表格的距离 */
min-height: auto; min-height: auto;
/* 移除固定高度 */ margin-bottom: 80px !important; /* 确保底部有足够空间不遮挡页脚 */
margin-bottom: 0 !important;
position: absolute;
font-size: 14px !important; font-size: 14px !important;
background-color: transparent !important; background-color: transparent !important;
} }
@ -1800,7 +1797,7 @@
document.body.appendChild(testElement); document.body.appendChild(testElement);
// 获取尿常规内容区域的可用高度 // 获取尿常规内容区域的可用高度
const availableHeight = 250; // 大约可用高度,根据实际情况调整 const availableHeight = 270; // 大约可用高度,根据实际情况调整
if (testElement.offsetHeight <= availableHeight) { if (testElement.offsetHeight <= availableHeight) {
// 内容不超过一页,隐藏第二页 // 内容不超过一页,隐藏第二页
@ -1821,7 +1818,7 @@
let secondPageText = urineText.substring(firstPageChars); let secondPageText = urineText.substring(firstPageChars);
// 尝试在更合适的位置分割,如句号或逗号 // 尝试在更合适的位置分割,如句号或逗号
const breakPoints = ['。', '', '', '\n']; const breakPoints = ['', '\n'];
for (let i = 30; i > 0; i--) { for (let i = 30; i > 0; i--) {
const checkPos = firstPageChars - i; const checkPos = firstPageChars - i;
if (checkPos <= 0) continue; if (checkPos <= 0) continue;
@ -1896,7 +1893,7 @@
document.body.appendChild(testElement); document.body.appendChild(testElement);
// 获取生化内容区域的可用高度 // 获取生化内容区域的可用高度
const availableHeight = 250; // 可用高度,与尿常规相同 const availableHeight = 270; // 可用高度,与尿常规相同
if (testElement.offsetHeight <= availableHeight) { if (testElement.offsetHeight <= availableHeight) {
// 内容不超过一页,隐藏第二页 // 内容不超过一页,隐藏第二页
@ -1917,7 +1914,7 @@
let secondPageText = biochemistryText.substring(firstPageChars); let secondPageText = biochemistryText.substring(firstPageChars);
// 尝试在更合适的位置分割,如句号或逗号 // 尝试在更合适的位置分割,如句号或逗号
const breakPoints = ['。', '', '', '\n']; const breakPoints = ['', '\n'];
for (let i = 30; i > 0; i--) { for (let i = 30; i > 0; i--) {
const checkPos = firstPageChars - i; const checkPos = firstPageChars - i;
if (checkPos <= 0) continue; if (checkPos <= 0) continue;
@ -1964,7 +1961,7 @@
document.body.appendChild(testElement); document.body.appendChild(testElement);
// 获取血常规内容区域的可用高度 // 获取血常规内容区域的可用高度
const availableHeight = 250; // 可用高度,与尿常规相同 const availableHeight = 270; // 可用高度,与尿常规相同
if (testElement.offsetHeight <= availableHeight) { if (testElement.offsetHeight <= availableHeight) {
// 内容不超过一页,隐藏第二页 // 内容不超过一页,隐藏第二页
@ -1985,7 +1982,7 @@
let secondPageText = bloodText.substring(firstPageChars); let secondPageText = bloodText.substring(firstPageChars);
// 尝试在更合适的位置分割,如句号或逗号 // 尝试在更合适的位置分割,如句号或逗号
const breakPoints = ['。', '', '', '\n']; const breakPoints = ['', '\n'];
for (let i = 30; i > 0; i--) { for (let i = 30; i > 0; i--) {
const checkPos = firstPageChars - i; const checkPos = firstPageChars - i;
if (checkPos <= 0) continue; if (checkPos <= 0) continue;