diff --git a/clinical-web/src/views/management/document-permissions/components/DepartmentPermissionTable.vue b/clinical-web/src/views/management/document-permissions/components/DepartmentPermissionTable.vue new file mode 100644 index 0000000..8855748 --- /dev/null +++ b/clinical-web/src/views/management/document-permissions/components/DepartmentPermissionTable.vue @@ -0,0 +1,123 @@ + + + + + + + + 科室 + 本科室文档 + 全院通用文档 + 其他科室文档 + 操作 + + + + + + {{ row.department }} + + + + {{ accessLabels[row.ownDocuments] }} + + + + + {{ accessLabels[row.commonDocuments] }} + + + + + {{ accessLabels[row.otherDocuments] }} + + + + 调整 + + + + + + + + diff --git a/clinical-web/src/views/management/document-permissions/components/RolePermissionMatrix.vue b/clinical-web/src/views/management/document-permissions/components/RolePermissionMatrix.vue new file mode 100644 index 0000000..d10e2ba --- /dev/null +++ b/clinical-web/src/views/management/document-permissions/components/RolePermissionMatrix.vue @@ -0,0 +1,144 @@ + + + + + 角色 + + {{ column.label }} + + + + + + {{ row.name }} + + + + + + + + + + + diff --git a/clinical-web/src/views/management/document-permissions/index.vue b/clinical-web/src/views/management/document-permissions/index.vue index a916892..f5f1259 100644 --- a/clinical-web/src/views/management/document-permissions/index.vue +++ b/clinical-web/src/views/management/document-permissions/index.vue @@ -1,12 +1,187 @@ - + + + + 文档库权限矩阵 + 可见 / 可用 / 可维护 分级授权,下级继承上级 + + + 可见=可浏览模板;可用=可发起签署;可维护=可编辑/停用模板。科室签署员默认继承本科室「可用」权限。调整即时生效并记录审计日志。 + + + + + + + + + + + + + + + + 按角色授权 + + + + + + + 按科室授权 + 科室级别的文档可用范围 + + + + + + + diff --git a/clinical-web/src/views/management/document-permissions/mock.ts b/clinical-web/src/views/management/document-permissions/mock.ts new file mode 100644 index 0000000..34cd434 --- /dev/null +++ b/clinical-web/src/views/management/document-permissions/mock.ts @@ -0,0 +1,108 @@ +import type { DepartmentPermissionRow, PermissionColumn, RolePermissionRow } from './types' + +export const permissionColumns: PermissionColumn[] = [ + { + key: 'visible', + label: '可见', + description: '可浏览模板', + }, + { + key: 'usable', + label: '可用', + description: '可发起签署', + }, + { + key: 'maintainable', + label: '可维护', + description: '可编辑、停用模板', + }, +] + +export const rolePermissionRows: RolePermissionRow[] = [ + { + id: 'system-admin', + name: '系统管理员', + color: '#6b5bd2', + description: '系统配置、用户与权限管理、审计日志', + userCount: 2, + permissions: { + visible: true, + usable: true, + maintainable: true, + }, + }, + { + id: 'medical-management', + name: '医务管理', + color: '#0e6e8c', + description: '全院文档库维护、报表分析、任务监督', + userCount: 4, + permissions: { + visible: true, + usable: true, + maintainable: false, + }, + }, + { + id: 'department-signer', + name: '科室签署员', + color: '#0f9d6c', + description: '本科室文档发起签署、手写板 / 短信操作', + userCount: 23, + permissions: { + visible: false, + usable: false, + maintainable: false, + }, + }, + { + id: 'audit-viewer', + name: '查询审计员', + color: '#d9821f', + description: '只读查询报表与审计留痕,不可发起', + userCount: 3, + permissions: { + visible: false, + usable: false, + maintainable: false, + }, + }, +] + +export const departmentPermissionRows: DepartmentPermissionRow[] = [ + { + id: 'radiology', + department: '放射科', + ownDocuments: 'available', + commonDocuments: 'available', + otherDocuments: 'invisible', + }, + { + id: 'cardiology', + department: '心内科', + ownDocuments: 'available', + commonDocuments: 'available', + otherDocuments: 'invisible', + }, + { + id: 'orthopedics', + department: '骨科', + ownDocuments: 'available', + commonDocuments: 'available', + otherDocuments: 'invisible', + }, + { + id: 'health-management', + department: '健康管理中心', + ownDocuments: 'available', + commonDocuments: 'available', + otherDocuments: 'invisible', + }, + { + id: 'general', + department: '全院通用', + ownDocuments: 'available', + commonDocuments: 'available', + otherDocuments: 'invisible', + }, +] diff --git a/clinical-web/src/views/management/document-permissions/types.ts b/clinical-web/src/views/management/document-permissions/types.ts index 756e54b..9df1cb0 100644 --- a/clinical-web/src/views/management/document-permissions/types.ts +++ b/clinical-web/src/views/management/document-permissions/types.ts @@ -1,15 +1,26 @@ -export type PermissionSubjectFilter = 'all' | 'user' | 'role' +export type PermissionKey = 'visible' | 'usable' | 'maintainable' -export interface PermissionFilterForm { - keyword: string - subjectType: PermissionSubjectFilter +export interface PermissionColumn { + key: PermissionKey + label: string + description: string } -export interface PermissionTableRow { +export interface RolePermissionRow { id: string - subjectType: PermissionSubjectFilter - subjectName: string - documentName: string - permission: 'view' | 'sign' | 'manage' - updatedAt: string + name: string + color: string + description: string + userCount: number + permissions: Record +} + +export type DepartmentDocumentAccess = 'available' | 'invisible' + +export interface DepartmentPermissionRow { + id: string + department: string + ownDocuments: DepartmentDocumentAccess + commonDocuments: DepartmentDocumentAccess + otherDocuments: DepartmentDocumentAccess }
+ 可见=可浏览模板;可用=可发起签署;可维护=可编辑/停用模板。科室签署员默认继承本科室「可用」权限。调整即时生效并记录审计日志。 +