diff --git a/docs/student-training-ui-standard.md b/docs/student-training-ui-standard.md index 23ee143..63a3737 100644 --- a/docs/student-training-ui-standard.md +++ b/docs/student-training-ui-standard.md @@ -180,13 +180,24 @@ ### 5.2 桌面端尺寸与布局 - 步骤栏采用**流程式导航**:步骤卡、圆形编号节点、步骤间连线与箭头共同构成流程;不得退回为只有文字的胶囊标签。 + +#### 截图视觉基准(标准步骤条) + +标准步骤条必须呈现为一条完整的深色胶囊流程轨道。每一步从左到右依次为两位编号圆点、步骤名称和状态提示,步骤之间保留青蓝色连线与右向箭头。默认和已完成步骤直接置于整条轨道上,**不得**再绘制独立的深色矩形卡片、边框或背景块;只有当前步骤使用完整的蓝色渐变胶囊、带光晕的蓝色编号圆点和“当前步骤”提示。已完成步骤仅将编号圆点和前置连线改为青绿色,编号不得被勾选图标替代。 + +```text +(01) 步骤名称 / 点击切换 → → [ (02) 步骤名称 / 当前步骤 ] → (03) 步骤名称 / 点击切换 → +``` + +实现必须保留 `.step-marker`、`.step-copy`(含 `.step-name` 和 `.step-action`)以及 `.step-connector` 四类元素;不得通过隐藏编号、状态文案或连接箭头把流程步骤条简化为纯文字胶囊导航。 + - 为避免与工作台内容区过于局促,桌面端步骤栏可相对内容区向左右各扩展 `12px`:`width: calc(100% + 24px)`、`margin-left/right: -12px`。扩展范围只能位于主工作台内,不得突破主工作台边框。 -- 容器内边距 `18px 22px`,圆角 `18px`,边框 `1px solid rgba(0,180,255,.3)`;使用深青蓝渐变叠加深色背景与轻微内高光。 -- 每个步骤项使用 `flex: 1 0 145px` 分配宽度,最小高度 `66px`,内边距 `8px 10px`,圆角 `8px`,默认带低对比可点击边框和深色卡片背景。`145px` 是统一的最小可用宽度,不能因步骤名称不同而改为按名称定宽。 -- 步骤项左侧为 `38px` 圆形编号节点;节点始终显示两位步骤编号(如 `01`),**已完成步骤不得替换为勾选符号**。已完成态只能通过节点和连线颜色表达。 +- 容器内边距 `10px 18px`,圆角 `999px`,边框 `1px solid rgba(0,180,255,.3)`;使用深青蓝背景与轻微内高光,作为所有步骤共用的一条轨道。 +- 每个步骤项使用 `flex: 1 1 0` 分配宽度,最小宽度 `150px`、最小高度 `72px`、内边距 `8px 12px`、圆角 `999px`。默认背景和描边均透明;仅当前步骤使用蓝色渐变背景与青色描边。步骤名称不同不得改变统一的最小可用宽度。 +- 步骤项左侧为 `56px` 圆形编号节点;节点始终显示两位步骤编号(如 `01`),**已完成步骤不得替换为勾选符号**。已完成态只能通过节点和连线颜色表达。 - 步骤项依次显示“步骤名称”和操作提示;不得显示 `STAGE` 或其他英文阶段眉题。未激活项常驻显示“点击切换 →”,当前项显示“当前步骤”。 - 步骤项之间使用低饱和青蓝 `2px` 连线与右箭头表达先后关系;已完成区段可提高亮度,连线不承担点击区域。 -- **桌面端步骤间距(硬性值):** 单段连接线使用 `flex: 0 1 40px`、`min-width: 18px`、`height: 2px`、`margin: 0 8px`;箭头使用 `6px × 6px` 的右向描边。不得沿用历史的 `64px` 连接线或 `0 14px` 两侧外边距,避免步骤卡之间出现过宽空白。 +- **桌面端步骤间距(硬性值):** 单段连接线使用 `flex: 0 1 72px`、`min-width: 40px`、`height: 2px`、`margin: 0 12px`;箭头使用 `8px × 8px` 的右向描边。连线位于整条轨道内,用于区分透明的默认步骤与当前步骤。 - 步骤名称由配置提供,最多显示两行,超出后使用省略号截断;必须保留完整名称的悬停提示(如 `title`)和可访问名称。不得因长名称压缩编号节点、操作提示或相邻步骤卡。 - 当全部步骤的最小宽度无法容纳时,步骤栏允许横向滚动;禁止把步骤卡、文字或连线压缩变形。 @@ -194,11 +205,11 @@ | 状态 | 文字 | 背景 | 描边与效果 | | --- | --- | --- | --- | -| 默认/待完成 | `#9ab3d0` | `rgba(3,27,43,.52)` | `rgba(68,141,177,.35)`;显示“点击切换 →” | -| Hover(可点击) | `#ffffff` | `rgba(8,92,131,.52)` | `rgba(89,223,255,.82)`;卡片上移 `2px`、强化阴影与“点击切换”颜色 | -| 当前/激活 | `#ffffff` | 深青蓝渐变 | `rgba(89,226,255,.85)`;节点使用蓝色渐变与青色光晕,提示为“当前步骤” | -| 已完成(如业务提供) | `#dffbff` | 保持步骤卡底色 | 编号节点和已完成连线使用青绿色;编号仍可见,不显示勾选 | -| 禁用(如业务提供) | `#8299aa` | 深色卡片底色 | `opacity: .45`;无指针手势,且不显示“点击切换” | +| 默认/待完成 | `#9ab3d0` | 透明 | 无独立描边;显示“点击切换 →” | +| Hover(可点击) | `#ffffff` | 透明或轻微青蓝半透明 | 仅以胶囊圆角高亮反馈;上移 `2px`、强化“点击切换”颜色 | +| 当前/激活 | `#ffffff` | `#0eaae4 → #0572ac` 蓝色渐变胶囊 | `#36d9ff` 描边;节点使用蓝色渐变与青色光晕,提示为“当前步骤” | +| 已完成(如业务提供) | `#dffbff` | 透明 | 编号节点和已完成连线使用青绿色;编号仍可见,不显示勾选 | +| 禁用(如业务提供) | `#8299aa` | 透明 | `opacity: .45`;无指针手势,且不显示“点击切换” | - 过渡仅用于 `transform`、颜色、背景、描边和阴影,时长 `0.2s`;不得做闪烁、跳动或自动轮播动画。 - 激活状态只表现当前业务状态,不根据名称、索引或固定第一个项目推断。 diff --git a/src/assets/styles/student-training.scss b/src/assets/styles/student-training.scss index 29073ec..e8fff74 100644 --- a/src/assets/styles/student-training.scss +++ b/src/assets/styles/student-training.scss @@ -1,8 +1,8 @@ .student-training-shell { --student-step-height: 46px; --student-step-font: 14px; - --student-action-height: 52px; - --student-action-font: 20px; + --student-action-height: 42px; + --student-action-font: 16px; --student-upload-height: 40px; --student-upload-font: 14px; --student-aux-height: 42px; @@ -290,11 +290,11 @@ display: inline-flex !important; align-items: center !important; justify-content: center !important; - min-width: 144px !important; + min-width: 112px !important; width: auto !important; height: var(--student-action-height) !important; min-height: var(--student-action-height) !important; - padding: 0 20px !important; + padding: 0 16px !important; border: 1px solid #2c83aa !important; border-radius: var(--student-radius-sm) !important; color: #dff7ff !important; @@ -319,6 +319,82 @@ background: rgba(18, 85, 116, 0.98) !important; } +/* 新产品调查等页面使用 task-actions,而非 training-action。统一底部提交/重置按钮规格。 */ +.student-training-shell .task-actions { + display: flex !important; + flex-wrap: wrap !important; + justify-content: center !important; + align-items: center !important; + gap: 28px !important; + margin-top: 28px !important; +} + +.student-training-shell .task-actions > button { + display: inline-flex !important; + align-items: center !important; + justify-content: center !important; + min-width: 112px !important; + width: auto !important; + height: var(--student-action-height) !important; + min-height: var(--student-action-height) !important; + padding: 0 16px !important; + font-size: var(--student-action-font) !important; + font-weight: 800 !important; + line-height: 1 !important; +} + +.student-training-shell .taskfooter { + display: flex !important; + flex-wrap: wrap !important; + justify-content: center !important; + align-items: center !important; + gap: 28px !important; + margin-top: 28px !important; +} + +.student-training-shell .taskfooter .el-button { + min-width: 112px !important; + width: auto !important; + height: var(--student-action-height) !important; + min-height: var(--student-action-height) !important; + padding: 0 16px !important; + font-size: var(--student-action-font) !important; + font-weight: 800 !important; + line-height: 1 !important; +} + +/* 底部提交/重置操作统一采用实训页的胶囊按钮样式。 */ +.student-training-shell .training-actions, +.student-training-shell .task-actions, +.student-training-shell .taskfooter { + gap: 28px !important; + margin-top: 28px !important; +} + +.student-training-shell .training-actions .el-button.training-action, +.student-training-shell .training-actions button.training-action, +.student-training-shell .task-actions > button, +.student-training-shell .taskfooter .el-button { + border: 1px solid #2cc9ff !important; + border-radius: var(--student-radius-pill) !important; + color: #dff8ff !important; + background: rgba(8, 87, 121, 0.55) !important; + font-weight: 700 !important; +} + +.student-training-shell .training-actions .training-action--submit, +.student-training-shell .task-actions > .btn-submit, +.student-training-shell .task-actions > .btn-primary, +.student-training-shell .taskfooter .el-button:first-child { + border-color: #36d9ff !important; + color: #ffffff !important; + background: linear-gradient(110deg, #0eaae4, #0572ac) !important; +} + +.student-training-shell .task-actions > button .el-icon { + display: inline-flex !important; +} + .student-training-shell .el-button.ghost-action, .student-training-shell .el-button.outline-action, .student-training-shell .workbench-actions .el-button.material-download, diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index bcf1ff7..fffb9a2 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -42,12 +42,6 @@ - diff --git a/src/views/channel/supplier.vue b/src/views/channel/supplier.vue index 9ffb0b8..067068a 100644 --- a/src/views/channel/supplier.vue +++ b/src/views/channel/supplier.vue @@ -1,26 +1,34 @@ - + + + + diff --git a/src/views/test/index.vue b/src/views/test/index.vue index 0a4ef2d..e775854 100644 --- a/src/views/test/index.vue +++ b/src/views/test/index.vue @@ -18,10 +18,21 @@
@@ -223,4 +234,7 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY diff --git a/src/views/test/promotion.vue b/src/views/test/promotion.vue index 544bab5..4cc8463 100644 --- a/src/views/test/promotion.vue +++ b/src/views/test/promotion.vue @@ -18,10 +18,21 @@
@@ -269,6 +280,9 @@ onMounted(async () => { try { const result = await getTrainingTaskByKey(TASK_KEY