2026-08-05 09:32:10 +08:00
|
|
|
/* iAOP 配置化驾驶舱样式(issue #131 / PRD 5.5)。
|
|
|
|
|
* 调色全部由 plan JSON 的 themeTokens 注入(--cockpit-* CSS 变量),
|
2026-08-05 14:17:37 +08:00
|
|
|
* 这里只写默认值(= #51 THEME_TOKENS 的 light 方案,Ant Design 5 色板,
|
|
|
|
|
* 2026-08 全站 Ant Design Pro 风格重构),切主题 = 换一套变量。 */
|
2026-08-05 09:32:10 +08:00
|
|
|
:root {
|
2026-08-05 14:17:37 +08:00
|
|
|
--cockpit-bg: #f0f2f5;
|
|
|
|
|
--cockpit-surface: #ffffff;
|
|
|
|
|
--cockpit-fg: rgba(0, 0, 0, 0.88);
|
|
|
|
|
--cockpit-fg-muted: rgba(0, 0, 0, 0.45);
|
|
|
|
|
--cockpit-accent: #1677ff;
|
|
|
|
|
--cockpit-warn: #faad14;
|
|
|
|
|
--cockpit-grid-line: rgba(5, 5, 5, 0.06);
|
2026-08-05 09:32:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
|
body {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
|
|
|
|
background: var(--cockpit-bg);
|
|
|
|
|
color: var(--cockpit-fg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ---- 顶栏 -------------------------------------------------------------- */
|
|
|
|
|
#topbar {
|
|
|
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
|
|
|
padding: 10px 16px; background: var(--cockpit-surface);
|
|
|
|
|
border-bottom: 1px solid var(--cockpit-grid-line);
|
|
|
|
|
}
|
|
|
|
|
#cockpit-title { font-size: 18px; margin: 0; color: var(--cockpit-accent); }
|
|
|
|
|
#topbar-right { display: flex; align-items: center; gap: 8px; font-size: 13px;
|
|
|
|
|
color: var(--cockpit-fg-muted); }
|
|
|
|
|
#template-select { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--cockpit-grid-line);
|
|
|
|
|
background: var(--cockpit-bg); color: var(--cockpit-fg); }
|
|
|
|
|
.status-dot { font-size: 14px; }
|
2026-08-06 08:20:17 +08:00
|
|
|
.status-dot.ok { color: #52c41a; }
|
|
|
|
|
.status-dot.down { color: #ff4d4f; }
|
2026-08-05 09:32:10 +08:00
|
|
|
|
|
|
|
|
/* ---- 驾驶舱栅格(12 列基线,行高固定,widget 按 plan 的 grid.style 落位) -- */
|
|
|
|
|
#cockpit-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(12, 1fr);
|
|
|
|
|
grid-auto-rows: 90px;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ---- 通用 widget 卡片 --------------------------------------------------- */
|
|
|
|
|
.widget {
|
|
|
|
|
background: var(--cockpit-surface);
|
|
|
|
|
border: 1px solid var(--cockpit-grid-line);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
display: flex; flex-direction: column;
|
|
|
|
|
min-width: 0; min-height: 0;
|
|
|
|
|
}
|
|
|
|
|
.widget .w-title { font-size: 13px; color: var(--cockpit-fg-muted); margin-bottom: 8px;
|
|
|
|
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
|
.widget .w-body { flex: 1; min-height: 0; }
|
|
|
|
|
|
|
|
|
|
/* ---- ProcessView:四状态工艺流程 ---------------------------------------- */
|
|
|
|
|
.process-flow { display: flex; align-items: stretch; gap: 8px; height: 100%; }
|
|
|
|
|
.stage {
|
|
|
|
|
flex: 1; border-radius: 8px; padding: 10px;
|
|
|
|
|
display: flex; flex-direction: column; justify-content: center; align-items: center;
|
|
|
|
|
border: 1px solid var(--cockpit-grid-line); text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.stage .stage-name { font-size: 16px; font-weight: 600; }
|
|
|
|
|
.stage .stage-device { font-size: 11px; color: var(--cockpit-fg-muted); margin-top: 4px; }
|
|
|
|
|
.stage .stage-state { font-size: 11px; margin-top: 6px; padding: 2px 8px; border-radius: 10px; }
|
|
|
|
|
.stage-arrow { align-self: center; color: var(--cockpit-fg-muted); font-size: 18px; }
|
|
|
|
|
/* 四状态配色(running/warning/alarm/offline,对齐 #51 states 语义) */
|
2026-08-06 08:20:17 +08:00
|
|
|
.state-running { box-shadow: inset 0 0 0 1px #52c41a; }
|
|
|
|
|
.state-running .stage-state { background: rgba(82,196,26,.15); color: #52c41a; }
|
2026-08-05 09:32:10 +08:00
|
|
|
.state-warning { box-shadow: inset 0 0 0 1px var(--cockpit-warn); }
|
2026-08-06 08:20:17 +08:00
|
|
|
.state-warning .stage-state { background: rgba(250,173,20,.15); color: var(--cockpit-warn); }
|
|
|
|
|
.state-alarm { box-shadow: inset 0 0 0 1px #ff4d4f; }
|
|
|
|
|
.state-alarm .stage-state { background: rgba(255,77,79,.15); color: #ff4d4f; }
|
2026-08-05 09:32:10 +08:00
|
|
|
.state-offline { opacity: .55; }
|
2026-08-06 08:20:17 +08:00
|
|
|
.state-offline .stage-state { background: rgba(0,0,0,0.06); color: var(--cockpit-fg-muted); }
|
2026-08-05 09:32:10 +08:00
|
|
|
|
|
|
|
|
/* ---- TrendChart --------------------------------------------------------- */
|
|
|
|
|
.trend-bind { font-size: 11px; color: var(--cockpit-fg-muted); margin-bottom: 4px; }
|
|
|
|
|
.trend-canvas { width: 100%; height: calc(100% - 18px); display: block; }
|
|
|
|
|
|
|
|
|
|
/* ---- KpiCard ------------------------------------------------------------ */
|
|
|
|
|
.kpi-value { font-size: 28px; font-weight: 700; color: var(--cockpit-accent); }
|
|
|
|
|
.kpi-label { font-size: 13px; color: var(--cockpit-fg); margin-top: 2px; }
|
|
|
|
|
.kpi-desc { font-size: 11px; color: var(--cockpit-fg-muted); margin-top: 6px; }
|
|
|
|
|
|
|
|
|
|
/* ---- AlarmPanel ---------------------------------------------------------- */
|
|
|
|
|
.alarm-list { overflow-y: auto; height: 100%; display: flex; flex-direction: column; gap: 6px; }
|
|
|
|
|
.alarm-item { border-radius: 6px; padding: 6px 10px; font-size: 12px;
|
|
|
|
|
display: flex; align-items: center; gap: 8px; border-left: 3px solid transparent; }
|
|
|
|
|
.alarm-item .sev { font-weight: 700; }
|
|
|
|
|
.alarm-item .msg { flex: 1; }
|
|
|
|
|
.alarm-item .ack-btn { padding: 2px 10px; border: none; border-radius: 4px; cursor: pointer;
|
2026-08-06 08:20:17 +08:00
|
|
|
background: var(--cockpit-accent); color: #ffffff; font-size: 11px; }
|
2026-08-05 09:32:10 +08:00
|
|
|
.alarm-item .acked { color: var(--cockpit-fg-muted); font-size: 11px; }
|
|
|
|
|
.alarm-sop { font-size: 11px; color: var(--cockpit-fg-muted); margin-top: 2px; }
|
|
|
|
|
|
|
|
|
|
/* ---- NlQuery ------------------------------------------------------------- */
|
|
|
|
|
.nl-answer { flex: 1; overflow-y: auto; font-size: 12px; color: var(--cockpit-fg);
|
|
|
|
|
background: var(--cockpit-bg); border-radius: 6px; padding: 8px; margin-bottom: 8px;
|
|
|
|
|
white-space: pre-wrap; min-height: 0; }
|
|
|
|
|
.nl-input-row { display: flex; gap: 6px; }
|
|
|
|
|
.nl-input-row input { flex: 1; padding: 6px 8px; border-radius: 6px; font-size: 12px;
|
|
|
|
|
border: 1px solid var(--cockpit-grid-line);
|
|
|
|
|
background: var(--cockpit-bg); color: var(--cockpit-fg); }
|
|
|
|
|
.nl-input-row button { padding: 6px 12px; border: none; border-radius: 6px; cursor: pointer;
|
2026-08-06 08:20:17 +08:00
|
|
|
background: var(--cockpit-accent); color: #ffffff; font-size: 12px; }
|
2026-08-05 09:32:10 +08:00
|
|
|
.nl-input-row button:disabled { opacity: .5; }
|
|
|
|
|
|
|
|
|
|
/* ---- 底栏 ---------------------------------------------------------------- */
|
|
|
|
|
#bottombar { display: flex; justify-content: space-between; padding: 8px 16px;
|
|
|
|
|
font-size: 11px; color: var(--cockpit-fg-muted);
|
|
|
|
|
border-top: 1px solid var(--cockpit-grid-line); }
|
|
|
|
|
|
|
|
|
|
/* 窄屏降级:保持栅格语义,列宽过小时允许横向滚动而非挤压变形 */
|
|
|
|
|
@media (max-width: 900px) {
|
|
|
|
|
#cockpit-grid { grid-auto-rows: 80px; min-width: 860px; }
|
|
|
|
|
body { overflow-x: auto; }
|
|
|
|
|
}
|