diff --git a/clinical-web/src/views/management/users/components/RoleSummaryCards.vue b/clinical-web/src/views/management/users/components/RoleSummaryCards.vue new file mode 100644 index 0000000..3ef6106 --- /dev/null +++ b/clinical-web/src/views/management/users/components/RoleSummaryCards.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/clinical-web/src/views/management/users/components/UserTable.vue b/clinical-web/src/views/management/users/components/UserTable.vue new file mode 100644 index 0000000..1dfcf1f --- /dev/null +++ b/clinical-web/src/views/management/users/components/UserTable.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/clinical-web/src/views/management/users/index.vue b/clinical-web/src/views/management/users/index.vue index b01dedf..c9be25e 100644 --- a/clinical-web/src/views/management/users/index.vue +++ b/clinical-web/src/views/management/users/index.vue @@ -1,12 +1,196 @@ + + diff --git a/clinical-web/src/views/management/users/mock.ts b/clinical-web/src/views/management/users/mock.ts new file mode 100644 index 0000000..2b60eaf --- /dev/null +++ b/clinical-web/src/views/management/users/mock.ts @@ -0,0 +1,109 @@ +import type { RoleSummary, UserTableRow } from './types' + +export const roleSummaries: RoleSummary[] = [ + { + id: 'system-admin', + name: '系统管理员', + color: '#6b5bd2', + description: '系统配置、用户与权限管理、审计日志', + userCount: 2, + }, + { + id: 'medical-management', + name: '医务管理', + color: '#0e6e8c', + description: '全院文档库维护、报表分析、任务监督', + userCount: 4, + }, + { + id: 'department-signer', + name: '科室签署员', + color: '#0f9d6c', + description: '本科室文档发起签署、手写板 / 短信操作', + userCount: 23, + }, + { + id: 'audit-viewer', + name: '查询审计员', + color: '#d9821f', + description: '只读查询报表与审计留痕,不可发起', + userCount: 3, + }, +] + +export const users: UserTableRow[] = [ + { + id: 'user-001', + name: '张文静', + employeeNo: '10234', + campus: '本部院区', + department: '医务处', + role: '医务管理', + dataScope: '全院', + status: 'enabled', + }, + { + id: 'user-002', + name: '刘明辉', + employeeNo: '10301', + campus: '本部院区', + department: '放射科', + role: '科室签署员', + dataScope: '本科室', + status: 'enabled', + }, + { + id: 'user-003', + name: '王芳', + employeeNo: '10455', + campus: '本部院区', + department: '心内科', + role: '科室签署员', + dataScope: '本科室', + status: 'enabled', + }, + { + id: 'user-004', + name: '李国栋', + employeeNo: '10512', + campus: '东院区', + department: '骨科', + role: '科室签署员', + dataScope: '本科室', + status: 'enabled', + }, + { + id: 'user-005', + name: '陈晓云', + employeeNo: '10188', + campus: '本部院区', + department: '信息科', + role: '系统管理员', + dataScope: '全院', + status: 'enabled', + }, + { + id: 'user-006', + name: '赵雪梅', + employeeNo: '10602', + campus: '东院区', + department: '健康管理中心', + role: '科室签署员', + dataScope: '本科室', + status: 'disabled', + }, + { + id: 'user-007', + name: '孙立', + employeeNo: '10733', + campus: '本部院区', + department: '纪检监察室', + role: '查询审计员', + dataScope: '全院只读', + status: 'enabled', + }, +] + +export const roleColors = Object.fromEntries( + roleSummaries.map((role) => [role.name, role.color]), +) as Record diff --git a/clinical-web/src/views/management/users/types.ts b/clinical-web/src/views/management/users/types.ts index e0b0c73..77c159b 100644 --- a/clinical-web/src/views/management/users/types.ts +++ b/clinical-web/src/views/management/users/types.ts @@ -1,17 +1,20 @@ -export type UserFilterStatus = 'all' | 'enabled' | 'disabled' +export type UserStatus = 'enabled' | 'disabled' -export interface UserFilterForm { - keyword: string - department: string - status: UserFilterStatus +export interface RoleSummary { + id: string + name: string + color: string + description: string + userCount: number } export interface UserTableRow { id: string name: string - account: string + employeeNo: string + campus: string department: string role: string - status: UserFilterStatus - lastLoginAt: string + dataScope: string + status: UserStatus }