feat: refine vehicle console and self-repair workflow

This commit is contained in:
vee
2026-08-13 17:38:04 +08:00
parent fd3c219c39
commit 0ec43052f3
20 changed files with 3925 additions and 552 deletions
+213 -126
View File
@@ -46,7 +46,7 @@
display: flex;
flex: 1;
flex-direction: column;
margin-top: clamp(20px, 3vh, 36px);
margin-top: clamp(22px, 3.5vh, 42px);
overflow: hidden;
}
@@ -70,7 +70,7 @@
grid-row: 2;
grid-template-rows: auto minmax(0, 1fr);
gap: 11px;
padding: clamp(12px, 1.35vw, 20px) 0 0;
padding: var(--v2-module-title-block) 0 0;
overflow: hidden;
}
@@ -88,12 +88,12 @@
}
.v2-repair-view-switch button {
min-height: 58px;
min-height: var(--v2-sidebar-item-height);
display: grid;
grid-template-columns: 30px minmax(0, 1fr);
align-items: center;
gap: 10px;
padding: 8px 13px;
padding: 6px 15px;
color: color-mix(in srgb, var(--v2-accent-strong) 56%, #65787a);
background: transparent;
border: 1px solid transparent;
@@ -105,15 +105,15 @@
.v2-repair-view-switch button:hover {
color: var(--v2-accent-strong);
background: color-mix(in srgb, var(--v2-accent-soft) 68%, white);
border-color: color-mix(in srgb, var(--v2-accent) 14%, white);
background: color-mix(in srgb, var(--v2-accent-soft) 34%, white);
border-color: color-mix(in srgb, var(--v2-accent) 10%, white);
}
.v2-repair-view-switch button.active {
color: var(--v2-accent-strong);
background: color-mix(in srgb, var(--v2-accent-soft) 82%, white);
border-color: color-mix(in srgb, var(--v2-accent) 24%, white);
box-shadow: 0 10px 28px color-mix(in srgb, var(--v2-accent) 14%, transparent);
color: #111f20;
background: rgba(255, 255, 255, 0.94);
border-color: color-mix(in srgb, var(--v2-accent) 18%, white);
box-shadow: 0 10px 28px color-mix(in srgb, var(--v2-accent) 10%, transparent);
}
.v2-repair-view-switch button > svg {
@@ -124,7 +124,7 @@
}
.v2-repair-view-switch button.active > svg {
color: var(--v2-accent-strong);
color: var(--v2-accent);
}
.v2-repair-view-switch button > span {
@@ -142,11 +142,12 @@
.v2-repair-view-switch strong {
font-size: 15px;
line-height: 1.2;
}
.v2-repair-view-switch small {
color: color-mix(in srgb, var(--v2-accent) 34%, #829092);
font-size: 10px;
font-size: 9px;
font-weight: 600;
}
@@ -156,21 +157,23 @@
.v2-repair-config-stack {
display: grid;
gap: 7px;
gap: 8px;
padding-left: 9px;
border-left: 1px solid color-mix(in srgb, var(--v2-accent) 14%, transparent);
}
.v2-repair-config-card {
min-width: 0;
min-height: 50px;
min-height: var(--v2-sidebar-card-height);
display: grid;
grid-template-columns: 27px minmax(0, 1fr) auto;
grid-template-columns: 28px minmax(0, 1fr) auto;
align-items: center;
gap: 9px;
padding: 8px 10px;
gap: 8px;
padding: 6px 8px;
color: var(--repair-ink);
background: rgba(255, 255, 255, 0.52);
border: 1px solid var(--repair-line);
border-radius: 13px;
background: rgba(255, 255, 255, 0.72);
border: 1px solid rgba(255, 255, 255, 0.78);
border-radius: var(--v2-sidebar-card-radius);
}
.v2-repair-config-card > svg {
@@ -187,21 +190,25 @@
.v2-repair-config-card small {
color: var(--repair-muted);
font-size: 10px;
font-size: 8px;
font-weight: 650;
}
.v2-repair-config-card strong {
overflow: hidden;
color: var(--repair-heading);
font-size: 13px;
margin-top: 2px;
font-size: 11px;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-repair-config-card > span {
padding: 3px 5px;
color: var(--v2-accent-strong);
font: 800 9px/1.1 "IBM Plex Mono", Consolas, monospace;
background: color-mix(in srgb, var(--v2-accent-soft) 68%, white);
border-radius: 5px;
font: 800 7px/1.1 "IBM Plex Mono", Consolas, monospace;
}
.repair-execution-card .v2-config-card-select,
@@ -210,12 +217,12 @@
}
.repair-execution-card .v2-dropdown-trigger {
min-height: 21px;
min-height: 18px;
padding: 0;
color: var(--repair-heading);
background: transparent;
border: 0;
font-size: 13px;
font-size: 11px;
font-weight: 800;
box-shadow: none;
}
@@ -231,9 +238,10 @@
min-width: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: end;
align-items: start;
gap: 16px;
padding: 0 2px;
margin-inline: var(--v2-module-title-inline);
padding: 0;
}
.v2-repair-heading h1 {
@@ -416,6 +424,13 @@
transform: translateY(0);
}
.v2-repair-toolbar button.danger {
color: #a63f47;
background: #fff0f1;
border-color: #efc4c7;
box-shadow: none;
}
.v2-repair-toolbar button:focus-visible {
outline: 2px solid color-mix(in srgb, var(--v2-accent) 42%, white);
outline-offset: 2px;
@@ -438,8 +453,8 @@
min-width: 0;
min-height: 0;
display: grid;
grid-template-areas: "twin cases timeline";
grid-template-columns: minmax(280px, 1.18fr) minmax(185px, 0.66fr) minmax(330px, 1.32fr);
grid-template-areas: "twin cases logs";
grid-template-columns: minmax(280px, 1.18fr) minmax(210px, 0.72fr) minmax(360px, 1.4fr);
gap: 9px;
overflow: hidden;
}
@@ -482,34 +497,17 @@
.v2-repair-cases-panel {
grid-area: cases;
display: grid;
grid-template-rows: auto auto auto minmax(0, 1fr);
grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.v2-repair-overall-progress {
height: 8px;
margin: 10px 12px 5px;
overflow: hidden;
background: #fff;
border: 1px solid var(--repair-line);
border-radius: 999px;
}
.v2-repair-overall-progress span {
width: 0;
height: 100%;
display: block;
background: linear-gradient(90deg, var(--repair-active-blue), var(--repair-deep-blue));
border-radius: inherit;
transition: width 260ms ease;
}
#repairBatchSummary {
margin: 0 12px 7px;
overflow: hidden;
.v2-repair-injection-note {
margin: 9px 10px 6px;
padding: 8px 9px;
color: var(--repair-muted);
font-size: 9px;
text-overflow: ellipsis;
white-space: nowrap;
background: color-mix(in srgb, var(--v2-accent-soft) 66%, white);
border-radius: 9px;
font-size: 8px;
line-height: 1.5;
}
.v2-repair-case-list {
@@ -517,7 +515,7 @@
display: grid;
align-content: start;
gap: 6px;
padding: 0 10px 10px;
padding: 0 10px 8px;
overflow: auto;
}
@@ -538,9 +536,9 @@
}
.v2-repair-case-list button.selected {
background: #fff;
border-color: color-mix(in srgb, var(--v2-accent) 22%, white);
box-shadow: 0 7px 20px color-mix(in srgb, var(--v2-accent) 10%, transparent);
background: color-mix(in srgb, var(--v2-accent-soft) 76%, white);
border-color: color-mix(in srgb, var(--v2-accent) 72%, white);
box-shadow: none;
}
.v2-repair-case-list button > span {
@@ -581,14 +579,59 @@
.v2-repair-case-list button[data-state="complete"] > i { background: var(--repair-deep-blue); }
.v2-repair-case-list button[data-state="failed"] > i { background: var(--repair-danger); }
.v2-repair-injection-footer {
display: grid;
gap: 6px;
padding: 9px 10px 10px;
border-top: 1px solid var(--repair-line);
}
.v2-repair-injection-footer small,
.v2-repair-injection-footer > span {
overflow: hidden;
color: var(--repair-muted);
font-size: 8px;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-repair-injection-footer > span {
padding: 6px 7px;
color: #9a6428;
background: #fff4e7;
border-radius: 7px;
text-align: center;
}
.v2-repair-injection-footer button {
min-height: 34px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
color: #fff;
background: linear-gradient(145deg, var(--v2-accent), var(--v2-accent-strong));
border: 1px solid var(--v2-accent-strong);
border-radius: 9px;
font-size: 10px;
font-weight: 750;
cursor: pointer;
}
.v2-repair-injection-footer button svg { width: 13px; height: 13px; }
.v2-repair-injection-footer button:disabled { color: var(--repair-muted); background: var(--repair-soft); border-color: var(--repair-line); cursor: not-allowed; }
.v2-repair-twin-panel,
.v2-repair-timeline-panel {
.v2-repair-log-panel {
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.v2-repair-twin-panel { grid-area: twin; }
.v2-repair-timeline-panel { grid-area: timeline; }
.v2-repair-log-panel {
grid-area: logs;
grid-template-rows: auto auto auto minmax(0, 1fr);
}
.v2-repair-seat-viewer {
min-height: 0;
@@ -911,88 +954,94 @@
white-space: nowrap;
}
.v2-repair-timeline {
min-height: 0;
padding: 9px 11px 10px;
overflow: auto;
.v2-repair-log-panel > header > b {
padding: 6px 10px;
border-radius: 999px;
font-size: 11px;
}
.v2-repair-timeline article {
min-height: 70px;
position: relative;
.v2-repair-log-panel > header h2 { font-size: 16px; }
.v2-repair-log-panel > header > b[data-state="healthy"] { color: #19805e; background: #e6f6ef; }
.v2-repair-log-panel > header > b[data-state="repairing"] { color: #a86a1f; background: #fff2de; }
.v2-repair-log-panel > header > b[data-state="fault"] { color: #ad4248; background: #fdebed; }
.v2-repair-log-panel > header > b[data-state="idle"] { color: var(--repair-muted); background: var(--repair-soft); }
.v2-repair-log-summary {
display: grid;
grid-template-columns: 18px minmax(0, 1fr);
gap: 8px;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
padding: 9px 10px;
border-bottom: 1px solid var(--repair-line);
}
.v2-repair-timeline article:not(:last-child)::before {
width: 2px;
position: absolute;
top: 13px;
bottom: -2px;
left: 7px;
content: "";
background: #c8ced0;
}
.v2-repair-timeline article > i {
width: 15px;
height: 15px;
z-index: 1;
display: block;
margin-top: 4px;
background: var(--repair-pending);
border: 2px solid rgba(255, 255, 255, 0.94);
border-radius: 50%;
box-shadow: 0 0 0 1px var(--repair-line);
}
.v2-repair-timeline article[data-state="complete"] > i { background: var(--repair-deep-blue); }
.v2-repair-timeline article[data-state="active"] > i { background: var(--repair-active-blue); box-shadow: 0 0 0 4px rgba(115, 166, 232, 0.14); }
.v2-repair-timeline article[data-state="failed"] > i { background: var(--repair-danger); }
.v2-repair-timeline article[data-state="complete"]::before { background: var(--repair-deep-blue); }
.v2-repair-timeline article > div {
.v2-repair-log-summary > div {
min-width: 0;
padding-bottom: 8px;
padding: 9px 10px;
background: var(--repair-soft);
border-radius: 9px;
}
.v2-repair-timeline article header {
min-height: 24px;
.v2-repair-log-summary small { display: block; overflow: hidden; color: var(--repair-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.v2-repair-log-summary strong { display: block; margin-top: 5px; color: var(--repair-heading); font: 800 15px "IBM Plex Mono", Consolas, monospace; }
.v2-repair-log-toolbar {
min-height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 0 3px;
padding: 5px 10px;
border-bottom: 1px solid var(--repair-line);
}
.v2-repair-timeline article header strong {
color: var(--repair-ink);
font-size: 12px;
.v2-repair-log-toolbar > div { display: flex; gap: 3px; }
.v2-repair-log-toolbar button { padding: 6px 9px; color: var(--repair-muted); background: transparent; border: 0; border-radius: 7px; font-size: 10px; font-weight: 750; cursor: pointer; }
.v2-repair-log-toolbar button.active { color: var(--v2-accent-strong); background: var(--v2-accent-soft); }
.v2-repair-log-toolbar > span { display: inline-flex; align-items: center; gap: 6px; color: var(--repair-muted); font-size: 9px; white-space: nowrap; }
.v2-repair-log-toolbar > span i { width: 7px; height: 7px; background: #26916d; border-radius: 50%; }
.v2-repair-event-stream {
min-height: 0;
padding: 4px 10px 10px;
overflow: auto;
}
.v2-repair-timeline article[data-state="complete"] header strong { color: var(--repair-deep-blue); }
.v2-repair-timeline article[data-state="active"] header strong { color: var(--v2-accent); }
.v2-repair-timeline article[data-state="failed"] header strong { color: var(--repair-danger); }
.v2-repair-timeline article header span {
color: #909b9d;
font-size: 8px;
font-weight: 750;
.v2-repair-event-stream article {
min-height: 88px;
position: relative;
display: grid;
grid-template-columns: 78px 14px minmax(0, 1fr);
gap: 8px;
padding: 11px 0;
border-bottom: 1px solid var(--repair-line);
}
.v2-repair-timeline article p {
min-height: 38px;
margin: 0;
padding: 8px 9px;
overflow: hidden;
color: var(--repair-muted);
background: var(--repair-soft);
border: 1px solid var(--repair-line);
border-radius: 9px;
font-size: 9px;
line-height: 1.45;
}
.v2-repair-event-stream article > time { padding-top: 3px; color: var(--repair-muted); font: 9px "IBM Plex Mono", Consolas, monospace; }
.v2-repair-event-stream article > i { width: 11px; height: 11px; z-index: 1; margin-top: 3px; background: var(--v2-accent); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--repair-line); }
.v2-repair-event-stream article:not(:last-child)::after { width: 1px; position: absolute; top: 27px; bottom: -2px; left: 91px; content: ""; background: var(--repair-line); }
.v2-repair-event-stream article[data-kind="fault"] > i { background: var(--repair-danger); }
.v2-repair-event-stream article[data-kind="diagnosis"] > i,
.v2-repair-event-stream article[data-kind="repair"] > i { background: var(--repair-warn); }
.v2-repair-event-stream article[data-kind="success"] > i,
.v2-repair-event-stream article[data-kind="heartbeat"] > i { background: #248b67; }
.v2-repair-event-stream article > div { min-width: 0; }
.v2-repair-event-stream article header { min-height: 21px; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; }
.v2-repair-event-stream article header span { padding: 3px 5px; color: var(--repair-muted); background: var(--repair-soft); border-radius: 5px; font-size: 9px; font-weight: 750; }
.v2-repair-event-stream article header strong { overflow: hidden; color: var(--repair-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.v2-repair-event-stream article[data-kind="fault"] header strong { color: var(--repair-danger); }
.v2-repair-event-stream article[data-kind="diagnosis"] header strong,
.v2-repair-event-stream article[data-kind="repair"] header strong { color: #a7681d; }
.v2-repair-event-stream article[data-kind="success"] header strong,
.v2-repair-event-stream article[data-kind="heartbeat"] header strong { color: #197c5c; }
.v2-repair-event-stream article p { margin: 5px 0 0; color: var(--repair-muted); font-size: 10px; line-height: 1.55; }
.v2-repair-event-stream article footer { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.v2-repair-event-stream article footer span { padding: 3px 6px; color: var(--repair-muted); background: var(--repair-soft); border-radius: 5px; font-size: 9px; }
.v2-repair-log-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 24px; color: var(--repair-muted); text-align: center; }
.v2-repair-log-empty svg { width: 24px; height: 24px; color: var(--v2-accent); }
.v2-repair-log-empty strong { color: var(--repair-ink); font-size: 14px; }
.v2-repair-log-empty span { max-width: 280px; font-size: 10px; line-height: 1.6; }
.v2-repair-view[data-repair-page="hardware"] {
overflow: auto;
@@ -1280,10 +1329,48 @@
.v2-repair-event-list strong { font-size: 9px; }
.v2-repair-event-list span { color: #758587; font-size: 8px; }
@media (max-height: 820px) {
.console-v2[data-module="self-repair"] .v2-repair-sidebar {
margin-top: 14px;
}
.v2-repair-sidebar .v2-section-heading h2 {
margin-bottom: 10px;
}
.v2-repair-sidebar > .v2-field-caption {
margin-bottom: 5px;
font-size: 11px;
}
.v2-repair-view-switch button {
min-height: 48px;
grid-template-columns: 21px minmax(0, 1fr);
padding: 4px 9px;
}
.v2-repair-view-switch button > svg {
width: 17px;
height: 17px;
}
.v2-repair-view-switch strong {
font-size: 10px;
}
.v2-repair-view-switch small {
font-size: 8px;
}
.v2-repair-config-card {
min-height: 38px;
}
}
@media (max-width: 1220px) {
.v2-repair-heading { grid-template-columns: minmax(0, 1fr); }
.v2-repair-status-grid { display: none; }
.v2-repair-software-grid { grid-template-columns: minmax(260px, 1fr) minmax(175px, 0.65fr) minmax(310px, 1.2fr); }
.v2-repair-software-grid { grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.68fr) minmax(330px, 1.25fr); }
.v2-repair-toolbar button { padding-inline: 8px; }
.v2-repair-toolbar button svg { display: none; }
.v2-repair-hardware-grid { grid-template-columns: minmax(180px, 0.62fr) minmax(450px, 1.5fr) minmax(190px, 0.68fr); }
@@ -1293,7 +1380,7 @@
.console-v2[data-module="self-repair"] .v2-self-repair { overflow: auto; }
.v2-repair-view { min-height: 900px; overflow: visible; }
.v2-repair-software-grid {
grid-template-areas: "twin cases" "timeline timeline";
grid-template-areas: "twin cases" "logs logs";
grid-template-columns: minmax(330px, 1fr) 210px;
grid-template-rows: 410px 390px;
}