From c885b672df7a558da89b4a4443d94144a594bcb4 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Fri, 22 May 2026 12:05:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#568:=20=E4=BF=AE=E5=A4=8D=E9=97=A8?= =?UTF-8?q?=E8=AF=8A=E6=97=A5=E7=BB=93=E9=A1=B5=E9=9D=A2=E6=8E=92=E7=89=88?= =?UTF-8?q?=E6=B7=B7=E4=B9=B1=20-=20=E4=BD=BF=E7=94=A8Grid=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E7=A1=AE=E4=BF=9D=E6=A0=87=E7=AD=BE=E5=80=BC=E5=AF=B9?= =?UTF-8?q?=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: 1. repeat(auto-fit, minmax(220px, 1fr)) 导致列数不可预测(1200px容器可能产生5列) 2. .report-item 使用 flex 布局,不同行的标签宽度不一致导致对不齐 3. .label 固定 width: 140px 无法适配所有中文标签长度 修复: 1. 改用 repeat(4, 1fr) 确保固定4列布局,span-2 正常工作 2. .report-item 改用 display: grid + grid-template-columns: 120px 1fr, 标签列统一120px宽度,所有标签值对齐 3. .label 移除固定宽度,由Grid自动对齐 4. 移动端响应式使用 grid-template-columns: 100px 1fr 适配 Co-Authored-By: Claude Opus 4.7 --- .../views/clinicmanagement/dayEnd/index.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/openhis-ui-vue3/src/views/clinicmanagement/dayEnd/index.vue b/openhis-ui-vue3/src/views/clinicmanagement/dayEnd/index.vue index f18687ec..fd78dcca 100755 --- a/openhis-ui-vue3/src/views/clinicmanagement/dayEnd/index.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/dayEnd/index.vue @@ -298,30 +298,31 @@ getPharmacyCabinetLists(); align-items: baseline; } .cols-4 { - grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + grid-template-columns: repeat(4, 1fr); } .span-2 { grid-column: span 2; } .report-item { - display: flex; - align-items: center; + display: grid; + grid-template-columns: 120px 1fr; + align-items: baseline; box-sizing: border-box; min-width: 0; } .label { - display: inline-block; - width: 140px; - flex-shrink: 0; color: #606266; white-space: nowrap; text-align: right; + padding-right: 4px; } .value { color: #303133; font-weight: 500; white-space: nowrap; - flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; } .divider { height: 1px; @@ -343,8 +344,8 @@ getPharmacyCabinetLists(); .span-2 { grid-column: span 1; } - .label { - width: 100px; + .report-item { + grid-template-columns: 100px 1fr; } }