.page1 { width: 100%; height: 100%; padding: 6px; } .page1 .page1-grid-1 { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .page1 .page1-grid-2 { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; } .page1 .page1-card { width: 100%; background: #0f172a; border: 1px solid #1f2937; border-radius: 6px; padding: 12px; overflow: hidden; } .page1 .service-card { grid-column: span 2; } .page1 .page1-header { height: 24px; line-height: 24px; margin-bottom: 12px; color: #e2e8f0; font-size: 14px; } .page1 .page1-chart { width: 100%; height: 260px; } .page1 .info-list { width: 100%; padding: 0 12px; overflow-x: auto; } .page1 .info-item { height: 42px; display: flex; align-items: center; border-bottom: 1px solid #1f2937; min-width: max-content; } .page1 .info-info { width: 145px; flex-shrink: 0; display: flex; flex-direction: column; } .page1 .info-name { color: #cbd5e1; font-size: 14px; } .page1 .info-desc { color: #64748b; font-size: 12px; } .page1 .info-value { width: 145px; margin-left: 12px; text-align: center; color: #94a3b8; font-size: 14px; font-family: ui-monospace, Consolas, monospace; } /* 服务操作组: 桌面端 display:contents 不产生盒子, 内部的版本号与按钮 仍作为 .info-item 的直接子项参与原有 flex 排版, 桌面布局零变化; 移动端在媒体查询中改为真实容器, 参与两行网格布局 */ .page1 .svc-ops { display: contents; } /* ================= 移动端/矮屏适配 (≤768px 或 ≤600px, 一行"或"判定) ================= */ @media (max-width: 768px), (max-height: 600px) { .page1 { height: auto; } .page1 .page1-grid-1, .page1 .page1-grid-2 { grid-template-columns: 1fr; } .page1 .service-card { grid-column: auto; } .page1 .page1-grid-2 { margin-top: 12px; } } /* ================= 运行总览看板 (仅移动端显示, 桌面端保持原布局) ================= */ .page1 .page1-dash { display: none; margin-bottom: 12px; } .page1 .dash-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; } .page1 .dash-kpi { background: #111c33; border: 1px solid #1f2937; border-radius: 6px; padding: 8px 10px; overflow: hidden; } .page1 .dash-kpi-name { color: #64748b; font-size: 12px; margin-bottom: 2px; } .page1 .dash-kpi-value { color: #e2e8f0; font-size: 18px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; } .page1 .dash-kpi-value .dot { margin-right: 8px; vertical-align: 3px; } .page1 .dash-kpi-txt { font-size: 13px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .page1 .dash-kpi-value.warm { color: #eab308; } .page1 .dash-kpi-value.hot { color: #ef4444; } .page1 .dash-kpi-bar { height: 4px; background: #1f2937; border-radius: 2px; margin-top: 8px; overflow: hidden; } .page1 .dash-bar-fill { display: block; height: 100%; width: 0; background: #22c55e; border-radius: 2px; transition: width 0.4s ease; } .page1 .dash-bar-fill.warm { background: #eab308; } .page1 .dash-bar-fill.hot { background: #ef4444; } /* 模块卡片网格: 左侧边框随状态着色 */ .page1 .dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .page1 .dash-mod { background: #111c33; border: 1px solid #1f2937; border-left: 3px solid #64748b; border-radius: 6px; padding: 8px 10px; min-width: 0; } .page1 .dash-mod.dash-ok { border-left-color: #22c55e; } .page1 .dash-mod.dash-info { border-left-color: #3b82f6; } .page1 .dash-mod.dash-warn { border-left-color: #eab308; } .page1 .dash-mod.dash-err { border-left-color: #ef4444; } .page1 .dash-mod-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; } .page1 .dash-name { color: #e2e8f0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .page1 .dash-unit { color: #64748b; font-size: 10px; font-family: ui-monospace, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; } .page1 .dash-info { font-family: ui-monospace, Consolas, monospace; color: #94a3b8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .page1 .dash-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; background: #64748b; vertical-align: middle; flex-shrink: 0; } .page1 .dash-dot.dash-ok { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); } .page1 .dash-dot.dash-info { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); } .page1 .dash-dot.dash-warn { background: #eab308; box-shadow: 0 0 6px rgba(234, 179, 8, 0.6); } .page1 .dash-dot.dash-err { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); animation: dot-pulse 1.2s ease-in-out infinite; } /* 状态徽章 */ .page1 .dash-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 999px; font-size: 10px; color: #cbd5e1; background: rgba(148, 163, 184, 0.1); white-space: nowrap; flex-shrink: 0; } .page1 .dash-badge.dash-ok { color: #4ade80; background: rgba(34, 197, 94, 0.12); } .page1 .dash-badge.dash-info { color: #60a5fa; background: rgba(59, 130, 246, 0.12); } .page1 .dash-badge.dash-warn { color: #facc15; background: rgba(234, 179, 8, 0.14); } .page1 .dash-badge.dash-err { color: #f87171; background: rgba(239, 68, 68, 0.14); } .page1 .dash-foot { margin-top: 8px; text-align: right; color: #64748b; font-size: 11px; } /* ================= 移动端启用看板并去掉重复内容 ================= */ @media (max-width: 768px), (max-height: 600px) { /* 启用运行总览看板 */ .page1 .page1-dash { display: block; } /* 概览信息已由看板提供, echarts 图表卡在手机上占屏, 隐藏 */ .page1 .page1-grid-1 { display: none; } /* 服务卡: 两行网格, 列边缘严格对齐 — 第一行: 名称+描述(左) | 状态(右) 第二行: 版本号 | 操作按钮弹性等分填满整行 竖屏横屏同一套规则, 所有条目的状态/版本/按钮起始位置完全一致 */ .page1 .info-item { height: auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 6px; padding: 8px 0; } .page1 .info-info { grid-column: 1; grid-row: 1; width: auto; } .page1 .info-item > .info-value { width: auto; margin-left: 0; } /* 状态值: 第一行右侧 */ .page1 .info-item > .info-value:first-of-type { grid-column: 2; grid-row: 1; text-align: right; } /* 操作组: 第二行整行 */ .page1 .svc-ops { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 8px; min-width: 0; } /* 组内版本号: 定宽对齐 */ .page1 .svc-ops .info-value { flex: 0 0 78px; width: 78px; text-align: left; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 组内按钮: 等分剩余宽度; 字号与全站按钮组统一为 13px */ .page1 .svc-ops .btn { flex: 1 1 0; min-width: 0; display: block; height: auto; padding: 6px 4px; line-height: 18px; font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 0 !important; } }