VAI-CLIP Desktop UI Design System · 页面结构与视觉设计指南

Status: Active project-level standard
Applies to: all desktop clinical and operational workspaces
Last updated: 2026-09-10
唯一现行入口:本文件。用于其他页面改造时调用,涵盖页面结构、表格展示、信息层级、设置与动作位置,以及配色和共享组件。

This document is the shared visual and interaction baseline for VAI-CLIP desktop interfaces. Product PRDs may add domain-specific requirements, but must not silently redefine these foundations. When a local PRD conflicts with this standard, the later confirmed business or safety requirement takes precedence and the exception must be documented.

0. 改造页面时先读什么

本指南从 Appointment、Registration、Cashier 和 Drug Dispensing 已有规范与页面提炼呈现方式,不复制各领域的业务状态机。界面文案默认英文;说明文档可以中文。

  1. 用 §4.0 确定页面骨架和动作位置,用 §4.2 确定表格效果。
  2. 用 §8 选择最接近的页面范式,按对象与任务调整宽度,不机械复制整页。
  3. 用 §2 选取已有配色、字号和尺寸,按 §9 找共享组件与调用模板。
  4. 用 §7 检查实现;权限、字段和状态转换仍以对应业务 PRD 为准。

证据用语:“共享规范/已确认”是现有约束或有日期来源的决定;“改造默认”是本指南对尚未统一的细节给出的设计默认;“实现参考”仅表示当前代码值,不代表全站均已采用。补全文档不等于已完成页面迁移、联调或 UAT。

四类工作页面的结构示意;色块表示区域职责,非运行截图或真实业务数据

1. Principles

  1. Clinical clarity and task completion take priority over decorative styling.
  2. The same semantic component uses the same size, radius, color, state and interaction pattern across Appointment, Registration, Patient & eMR, Consultation, Pharmacy, V-Lab and Cashier.
  3. Color, shape or icon alone must not carry clinical, operational or financial meaning.
  4. Reuse shared tokens and components before adding page-local Tailwind combinations.
  5. A screen must remain understandable in loading, empty, error, permission-denied, read-only, disabled, stale and unsaved states.

1.1 已记录的风格偏好

来源:已有 UI 决策记录、Cashier 2026-09-07/08 版式决定,以及 Pharmacy/V-Lab 的当前工作台展示规则。历史记录中的业务细则不覆盖更晚的领域 PRD。

2. Design tokens

2.1 Radius

Token Value Use
radius-control 6px Inputs, selects, standard buttons, compact icon buttons
radius-card 8px Cards, tables, list rows, menus and inline panels
radius-dialog 12px Dialogs, drawers, important summary panels and floating editors
radius-pill 9999px Status, count and category badges only

Rules:

2.2 Control heights

Token Value Use
control-compact 32px Dense secondary toolbars and table utilities
control-default 36px Standard form fields and secondary actions
control-primary 40px Main workflow actions and important confirmation controls

Controls in the same action group use the same height. Icon-only controls must retain a clear hit area even when their visual icon is smaller.

2.3 Typography

Role Minimum size Notes
Micro label 10px Short uppercase labels and compact badges only
Supporting text 12px Metadata, help text and table labels
Body 14px Form values, descriptions and normal reading
Section title 16px Panel and dialog section titles

改造默认:沿用项目 Tailwind 系统无衬线字体栈,不新增页面专用字体。页面标题 18–20px/600;普通分区标题 16px/600,Cashier 的主要分区沿用已确认的 18px;正文、表格值及字段值 14px/400,关键姓名/小计 14px/600;表头、次级身份和辅助说明至少 12px。正文行高约 1.4–1.5,金额用等宽数字(tabular-nums),不要求整页等宽字体。10px 只用于非关键短标签,不用于患者身份、药品、剂量、金额、状态说明或可操作字段标签。

Cashier 底部核心金额的 30–32px 是财务决策区实现参考,不是所有页面总计或统计数字的默认字号。

2.4 Color and surfaces

以下为 varclip_vue/src/assets/main.css 真实存在的变量。优先引用变量,不在新页面复制 hex。

角色 颜色 现有 CSS 变量 放置位置
页面底色 #F4F7FB --workspace-canvas 工作区背景
主内容面 #FFFFFF --workspace-surface 表格、表单、分区与弹窗
次级面 #F8FAFC --workspace-surface-muted 表头、只读摘要、次级分隔区
深蓝身份栏/实心选中 #173F5F --workspace-clinical-header 当前患者/Visit/历史发票身份;.workspace-selected
深蓝辅助色 #1F5575 --workspace-clinical-header-accent 受控的身份栏辅助表现
主要交互蓝 #2563EB --el-color-primary 主动作、链接、输入选中
强调蓝 #1D4ED8 --el-color-primary-dark-2 强调/hover;Cashier 当前主按钮
浅蓝底 #EFF6FF#DBEAFE --el-color-primary-light-8--el-color-primary-light-7 行 hover/行选中改造默认,不用作浅色正文
完成/成功 #059669 --el-color-success 完成结果、明确成功反馈
待处理/警告 #D97706 --el-color-warning 待核、警告,搭配文字与图标
错误/风险/破坏动作 #DC2626 --el-color-danger 阻断、错误、危险操作;不用于普通下游阶段
边框/弱分隔 #DBE3EF#E8EEF6 --el-border-color--el-border-color-light 分区边界/表格行分隔
主文字/常规文字 #172033#475569 --el-text-color-primary--el-text-color-regular 重要值/标签和辅助正文

实心导航选中是深蓝底白字;表格行选中是浅蓝底深色字;可执行主按钮是交互蓝。三者分别表达“所在位置”“所选对象”“下一步动作”,不要混用。成功/警告原色并不自动适合白字小徽章,实际字色与背景配对须检查可读性。

App launcher/窗口外壳现有模块渐变不等于新的业务语义颜色。AppWindow 会注入 --app-primary-button-background,Cashier 又有局部蓝色覆盖;检查最终计算样式后再迁移,不通过添加更多页面级 !important 解决冲突。

2.5 Spacing and elevation

改造默认:工作区外边距 16px(宽屏可 20–24px);相邻主分区 16px;分区内部 16px;字段组间距 12–16px;按钮组间距 8px。紧凑模式优先将间距减到 12px,不缩小关键文字或命中区域。普通分区是 1px 浅边框、8px 圆角、无明显阴影;阴影集中用于菜单、弹窗及抽屉。

§2.1 的 radius-control/card/dialog 在代码中分别为 --workspace-radius-control/card/dialog,默认 6/8/12px。控件高度、间距和字号的名称是设计约定,并不存在同名 control-primary 等 CSS token;实现时用现有组件尺寸或 Tailwind 工具,不引用不存在的变量。

3. Buttons and icons

2026-09-10 用户确认: Action 按钮优先使用现有 Element Plus el-button 及兼容的项目共享封装;统一主次层级、尺寸、loading、disabled、图标与主题。不要为每个页面用原生 <button>+局部样式重建另一套动作按钮。已有封装先核对其实际实现,缺失行为优先补到共用组件;导航、日期格和可选择数据行保留各自语义。

3.1 Icon completeness by component role

Every user-triggered command button in the scoped desktop workflows must have a recognizable Iconify icon. This includes create, edit, save, search, refresh, filter, upload, attach, check-in, prepare, send, handoff, reschedule, history, remove, cancel and close actions.

Every App registered in the desktop or mobile launcher must declare an approved icon. Persistent primary navigation that moves between materially different business domains—such as Service Items, Products, Coupons and Contracts—also uses a leading semantic icon. Inline tabs that only switch presentation or status remain text-first and do not receive decorative icons.

The following controls do not require decorative icons because their text or data is the control itself:

Icons must not be added merely to fill space. If an item is actually navigation, status or a selectable data row, keep that semantic pattern instead of turning it into an action button.

Literal command-button coverage is enforced by varclip_vue/tests/iconCoverage.test.mjs. A semantic exception must use a non-empty data-icon-exempt reason and is limited to the control categories above; an empty exemption or an exemption used to bypass a missing command icon is a defect.

3.2 Icon source and style

Action Preferred icon meaning
Add appointment calendar plus
Reschedule appointment calendar clock/edit
Check in patient account check
Edit patient information account edit
Duplicate patient check account multiple check
Add attachment file/paperclip plus
Maintain insurance card card/account-card edit
Record vitals heart pulse
Ready for consultation doctor/check-circle
Billing handoff cash-register/arrow-right
Save content save
Refresh refresh
Search magnify
Filter filter variant
History history
Close close

If a preferred Iconify glyph does not exist, choose the nearest clear business meaning and record the mapping in the shared component or icon map; do not invent a page-local metaphor. Unknown names must not silently ship as the generic fallback: icon coverage tests must prove that every literal Iconify name resolves to a bundled glyph or an explicit semantic alias whose target is bundled.

3.3 Text and icon-only buttons

3.4 Button hierarchy

3.5 Administrator maintenance action placement

4. Navigation, cards, forms and overlays

4.0 页面骨架、层级与动作坐标

默认结构:一个定位区,一个当前工作区。 浏览列表、处理单个对象和设置属于不同页面模式;不要为了统一外观强迫它们使用同一种左右分栏。

层级 放什么 展示规则 不应混入
0 · App 外壳 App 名、窗口控制 复用 AppWindow,不在业务组件重建窗口条 业务主操作、业务状态
1 · 页面标题区 页面名;业务主导航;右侧全局工具 紧凑白底、下边框;同一页面只保留一次标题 大面积说明、重复患者摘要
2 · 视图与筛选 状态/数量、搜索、日期、医生、诊所 紧邻其影响的列表;同类条件在一起,必要时分两行 新建动作、模板维护、保存表单
3 · 当前对象上下文 Patient/Visit/Invoice/Prescription 单对象处理时在正文顶部;主身份一行、次级编号与来源一行,状态/对象动作靠右 整页筛选、其他患者摘要
4 · 任务内容 表格、分区表单、阶段内容 占用剩余空间;白底和中性分区标题,内部信息有主次 无决策作用的统计卡、重复进度
5 · 决策与提交区 当前关键金额/阻断原因、Cancel/Save/下一步 长编辑/结算/配药任务固定在所属工作区底部;主体独立滚动 列表分页、模板配置或全局导航

列表页一般组合 1 → 2 → 4;对象工作页一般组合 1 → 3 → 4 → 5。短列表和只读页面不强加固定提交栏。状态筛选是可操作的条件;只读进度带是提示,不能伪装成可以跳步的导航。

动作位置矩阵(跨页面改造默认;Cashier Settings 为已确认规则)

动作类型 固定归属位置 视觉与行为
Settings/模板/低频配置 页面标题区最右侧,独立于搜索与业务 Tab 轻量 32–36px 齿轮按钮,aria-label="Settings",hover/focus tooltip;同一页面一个入口,不下沉到表格行或底部提交区
设置内返回 设置标题左侧 Back to [App] 返回进入前页面并保留筛选、分页与工作内容;有未保存修改时处理后再离开
页面级 New/Add 标题区右侧主要动作组 文字+图标,单一主按钮;若 Settings 同时存在,将其隔出为末端轻量工具
Refresh 工作流页面可在当前列表工具栏右端;管理员维护页优先遵循§3.5的标题动作组 选择一个与作用范围一致的位置,不重复放置
Search/Filter/日期/诊所 所影响列表上方 不跨到无关 Tab;选择后当前范围清楚,不因无结果偷偷改范围
Edit/Detail/More/下一步 表格最右 Action 列,或所选对象上下文栏 高频下一步保留文字;低频动作放 More,危险动作与常用动作区分
Add line/局部编辑/局部历史 对应分区标题右侧 不抬升为整页主操作,也不复制到页面顶栏
Save/Cancel/Confirm 编辑器或工作区底部右侧 Cancel 在左、单一主动作在右;有业务含义的“Cancel appointment”与关闭编辑器的 Cancel 不混淆
Destructive/退回等异常路径 对象所属区域;必要时底部左侧与主动作分开 保留文字和必要原因/确认;红色只用于真实危险动作
Pagination 列表底部 只影响列表;与详情提交区分别定位

Settings 的默认位置不是授权新增设置能力。只有存在真实可配置对象且用户有权限时才显示;不能放一个无行为的齿轮占位。

信息层级范式

4.1 Navigation

4.2 Cards and tables

表格展示效果(改造默认,沿用 Cashier/Registration 的共同表现)

项目 统一呈现方式
表格容器 占满当前工作区宽度;白底、1px 浅边框、8px 圆角;避免再套多层卡片
表头 浅灰蓝 surface-muted 底,12px/500–600 深色标签,底部细分隔;长表格在自身滚动容器内固定表头
普通数据行 14px 正文,白底与水平细分隔;默认不使用强竖线、深色斑马纹或每行独立阴影
密度 单行记录目标约 44–48px;双行身份/来源约 56–64px。行高随内容增长,不固定高度裁字;横向 padding 12–16px,纵向 10–14px
Hover 非选中行浅蓝背景,不改变布局、不加投影、不表达业务完成
Selected 比 hover 更明确的浅蓝底,配清楚的选择标记/边界与组件选中语义;键盘 focus 独立可见,不使用整个深蓝数据行
文本列 左对齐;姓名/项目名为主,编号/来源在次行;状态短词配 badge,避免每个字段都加 badge
数值列 金额右对齐、等宽数字、相同小数精度;Qty 固定采用同一对齐方式,单价/折扣/净额按垂直列线可比较;币种/单位清楚
操作列 最右,宽度稳定;容纳一个常用文字动作及 More。确需横向滚动时固定关键身份列与操作列,验证不会遮住中间数据
空值与异常 无值用清楚的占位/短语;未知不是 0;错误、无权限、无匹配与真空列表使用不同提示
合计 在金额列下对齐,使用细分隔和字重;固定决策栏只突出当前需要决定的金额,不再重复一排统计卡
列宽与小屏 身份/项目列优先占弹性空间,金额、状态、操作留可读宽度;次要元数据可进入详情。金额、药品剂量、关键操作不能为避免横向滚动而静默隐藏

以上行高是新的页面改造默认,不是已有全部表格的测试结论。可编辑单元格仍遵守 36px 默认输入高度;不要把输入、按钮压到普通文字行高。取消/历史行可以降低背景强调,但文字必须可读,并保留状态说明。

4.3 Forms

4.4 Dialogs and drawers

版式默认:标题与关闭按钮固定在上方;只滚动 body;底部动作固定、右对齐;同一弹窗只保留一个主要任务。普通确认沿用 AppDialog 默认宽 min(100% - 2rem, 48rem),复杂预约编辑可使用页面专属宽度。大型表单不反复嵌套弹窗,附属维护优先右侧抽屉;抽屉也保持 header/滚动 body/footer。AppDialog 及自定义表单弹窗统一禁止遮罩关闭,调用方不得重新启用;Escape 可用但调用方仍必须实现未保存保护,不能认为共享壳已经替业务完成。

2026-09-11 用户确认的管理页应用:Organization & Access 按 Catalogue 统一侧栏品牌/角色上下文、导航选中态、白色页头及卡片内筛选结构;标题与刷新/新增操作同区,搜索/筛选不挤占页头。用户和角色目录使用 Element Plus 表格与操作按钮,保留 12px 及以上辅助文字、长名称换行和 App 容器内横向滚动。统一布局不复制 Catalogue 遗留的原生控件、小字号或不适用于权限页的状态声明。

4.5 Search, scope and empty states

4.6 Bulk data and reporting controls

5. Accessibility and responsive behavior

布局以 App 内容容器宽度 判断,不只看浏览器宽度:窗口可能未最大化,桌面 Taskbar 和窗口条也占用高度。长页用 flexgrid 配合 min-height: 0,每个任务面板明确一个主滚动区,左右队列与详情可独立滚动,避免同面板多层嵌套滚动;固定 footer 不覆盖最后一行或横向滚动条。顶栏优先换行/收起低频项,再将左右内容改成上下结构;不靠把字体缩到 10px 保持分栏。1280px 与 1366×768 之外,检查一个窄窗口及长姓名/长项目名;不把桌面指南当作患者 H5 的移动布局规范。

6. Implementation and review requirements

  1. New or modified desktop components must use the semantic rules in this document.
  2. When a second page needs the same control, extract or extend a shared component instead of copying Tailwind class strings.
  3. A UI change is not complete until default, hover, active, focus-visible, disabled, loading, read-only and error states relevant to that control have been checked.
  4. Icon audits must classify controls before changing them: command action, icon-only utility, navigation/tab, selectable data row or status/filter.
  5. App registry and shared icon-map changes must run the icon coverage test. Generic fallback rendering is resilience for unexpected runtime data, not an accepted design state.
  6. Visual verification must cover at least 1280px and 1366x768 desktop sizes. Mobile preview does not substitute for desktop acceptance.
  7. Exceptions must state the business or safety reason in the owning PRD or component documentation.
  8. Use existing shared components and Element Plus first for forms, action buttons, selections, date/time pickers, calendar controls and interactive data tables. Use Tailwind for surrounding layout, spacing and the approved theme. Reuse AppDialog and other compliant wrappers; do not build new raw controls or introduce another UI library for the same functions. Existing specialised scheduling components retain their business behaviour. Current project dependency is Element Plus for Vue 3, not Element UI for Vue 2.
  9. Element Plus template components use the configured unplugin-vue-components resolver, which imports only the used component and its CSS. Do not register the library with app.use(ElementPlus) or import the global element-plus/dist/index.css stylesheet.
  10. Import Element Plus programmatic APIs, such as ElMessage and ElNotification, explicitly in the module that uses them.
  11. Run the component contract check for every new or modified desktop page. New and renamed Vue files receive a full check; existing files compare individual component findings against the Git base. Existing violations remain migration debt, not approved exceptions. Fully audit a migrated page with --files; the automated check supplements the complete checklist and real browser evidence. Commands and limits are maintained in component compliance verification.

7. Pull-request checklist

8. 四类页面的可复用版式

下列示意图只表示区域关系。像素值标为“实现参考”时,可以按内容容器调整;没有要求其他页面复制业务字段或状态。

8.1 Appointment · 时间与资源编排

紧凑标题/日期导航/当前范围                  页面工具
状态筛选与数量/医生/Consultation Type
┌────────────────────┬───────────────────────────┐
│ 多日/周日历         │ 所选日期 · Grid / List    │
│ 时间轴 + 预约事件    │ 当日明细/事件+Detail/More│
└────────────────────┴───────────────────────────┘
打开预约 → 共享编辑弹窗:固定标题/滚动分组表单/固定动作

8.2 Registration · 状态队列与行内下一步

Registration                                      Add appointment
状态筛选+数量
Search/Doctor/Date                                      Refresh
┌───────────────────────────────────────────────────────────────┐
│ Time/source | Patient | Doctor/type | Payer | Prep | Status | Action │
│ 主身份一行;编号/来源次行;当前行显示下一步文字动作                 │
└───────────────────────────────────────────────────────────────┘
行操作 → 任务弹窗:患者栏/主表单+必要清单/Cancel+当前下一步

8.3 Cashier · 全宽列表与全宽对象处理

Cashier   [Checkout Queue] [Billing History] [Day-end Report]   Settings
列表页:Search/Doctor/Status → 全宽表格 → Pagination
选择 Visit/Invoice 后:
Back to Queue/当前工作名称                                     Refresh
深蓝患者/Invoice 信息栏                  状态与对象操作
必要阻断提示 → 白色分区标题 → 全宽收费/付款表格与录入
固定底部:当前关键金额/简短状态                  当前单一主操作

8.4 Drug Dispensing · 左侧队列与右侧阶段任务

Drug Dispensing                        Clinic ▼/更新时间/Refresh
Active / History 与状态条件
┌───────────────────┬───────────────────────────────────────────┐
│ 窄队列             │ 深蓝患者/处方上下文栏                    │
│ Patient            │ 只读进度带;结算/库存提示                 │
│ Doctor · Clinic    │ 当前阶段分区内容                           │
│ 数量/必要状态     │ Prescription → Medication cards → remark │
│ 选中项浅蓝         │ 固定底部:状态/阻断原因+唯一下一步        │
└───────────────────┴───────────────────────────────────────────┘

9. 组件入口、调用方式与现状差异

9.1 实现入口

路径相对仓库根目录;共享样式类不自动构成完整组件。

需要复用的部分 入口 注意事项
颜色、圆角、基础交互 varclip_vue/src/assets/main.css .workspace-card 仅设圆角,不自动带背景/padding;检查最终计算样式
页面外壳 varclip_vue/src/components/desktop/AppWindow.vue 不重复实现窗口栏;注意模块按钮背景继承
分区标题与右侧局部动作 varclip_vue/src/components/desktop/apps/consultation-workspace/WorkspaceSectionHeader.vue 默认16px标题,使用 trailing slot;Cashier 主要标题18px是本域规范
通用弹窗 varclip_vue/src/components/ui/AppDialog.vue header/body/footer 分开;业务负责未保存与版本检查
轻量图标工具 varclip_vue/src/components/ui/IconActionButton.vue 标准 tooltip、accessible name、focus;Settings可沿用此模式
患者姓名链接 varclip_vue/src/components/desktop/PatientEmrLink.vue 稳定ID及返回上下文,避免连带触发行操作
当前/下一状态提示 varclip_vue/src/components/ui/WorkflowTransitionSummary.vue 提示不是任意切换状态的控件
预约与本次付款安排 varclip_vue/src/components/desktop/apps/appointments/AppointmentEditorDialog.vuevarclip_vue/src/components/desktop/apps/PaymentArrangementSection.vue 跨预约/登记复用;不另做不同的同义表单
结构参考 AppointmentsCalendar.vuePatientIntakeWorkflowApp.vueDrugDispensingWorkspace.vue(均在 varclip_vue/src/components/desktop/apps/);该目录 cashier/CashierWorkspaceApp.vue 复用 §8 的结构,不整页复制旧局部样式

9.2 给设计/开发代理的调用模板

请改造 [页面/组件]。
先读 agent_docs/product/desktop_ui_design_system.md 的 §4、§8、§9,
再读该领域 canonical PRD 与当前实现。
采用 [列表+任务弹窗 / 全宽列表到全宽详情 / 左队列右任务 / 时间编排] 范式。
按本指南确定标题、导航、筛选、对象上下文、表格、Settings 和底部动作的位置。
保持当前业务规则与权限边界;如果必须改变,在领域 PRD 单独明确。
复用 main.css、Element Plus、WorkspaceSectionHeader、AppDialog、IconActionButton。
先列出该页面与共享规范的差异,再实现;局部旧样式不能作为新增例外的依据。
核验1280px、1366×768及窄 App 窗口下的表格、长内容、滚动、固定动作和相关状态。
交付页面变化、视觉证据和未完成差异;不把指南发布当作业务验收。

9.3 当前差异及来源边界

2026-09-10 用户确认本轮先修共享组件库,暂不修改具体业务板块 UI。下列业务页面差异继续保留;共享组件与合规检查的实际验证状态见 组件合规验证,不代表业务页面已完成迁移:

观察到的差异 后续改造应遵守的规则
Registration 的正常下游 Ready for cashier 仍有 rose 标签;部分页面有10/11px普通说明和偏小主按钮 正常阶段不表达为危险;关键正文与动作遵守 §2,不能将历史值升级为规范
Cashier 当前局部表头/hover为灰色;其他表格有主题色;部分字号、边框未完全归一 §4.2 是改造默认,先看现有效果与计算样式,再通过共享层逐步统一
DayEndReportWorkspace 的 date/select、CashierReportTable 的带下钻表格仍为原生控件;Access 与用户管理也有待迁移表单 作为迁移差距保留,本轮暂不改业务页面;不因此放宽 Element Plus 输入和交互表格规则
共享导入 Drawer 仍有旧主色和原生控件;部分 tooltip 依赖旧 title 适配 可复用业务结构,需检查视觉/键盘行为;共享名称本身不证明合规
部分页面仍有重复标题、说明横幅、模块渐变按钮与纯色按钮并存 按 §1 和 §4 保留必要层级,逐页迁移;本次未更改全局主题
旧规范要求 Clinical Reference 深蓝标题;最新 STG 已记录2026-09-05浅色方案 采用已确认的浅色例外,保留 Cashier/Dispensing 的深蓝身份栏,不把分支差异当作所有页面已同步

指南结构提炼时的来源核对(2026-09-09 历史快照,非当前发布状态):当时已 fetch,开发分支 origin/dev/theron-li0a80d95,STG 为 f3f5e0e;已比较共享规范/样式差异并吸收较新确认记录,未将 STG 的其他临床代码合入本轮。后续须重新核对最新分支。WS1、WS4、WS5 已用于核对真实入口和实施边界;本轮没有改变其功能状态。

历史截图(含8月患者/预约截图、9月7日 Cashier 截图)只用于核对当时视觉表现,不作为最新导航或业务完成证据。本文结构图是无患者数据的规范示意,设计默认与运行截图分别辨识。