Commit Graph

202 Commits

Author SHA1 Message Date
Cheng Zhou 35acf96d6b 前端权限管理:添加单元测试
新增测试文件:
- ApiPermissions.test.ts: 权限管理主页面测试
- ApiEndpointPermissions.test.ts: 接口级权限矩阵组件测试
- PermissionMonitoring.test.ts: 权限监控仪表板组件测试

测试覆盖:
- 组件渲染验证
- 事件发出验证
- 搜索和筛选功能测试
- 数据显示验证

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-14 09:23:17 +08:00
Cheng Zhou c73c00d932 前端权限管理:修复组件数据结构和路由参数处理
修复内容:
- 修复 ApiPermissions.vue 中的路由参数处理,支持 id 和 projectId 两种参数
- 修复 ApiEndpointPermissions.vue 中的权限数据结构处理
- 修复 PermissionMonitoring.vue 中的缓存统计显示
- 修复 ProjectPermissionsModule.vue 中的权限矩阵更新逻辑
- 优化保存逻辑,保存后重新加载数据以确保同步

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-14 09:21:33 +08:00
Cheng Zhou 387d035b08 前端权限管理:实现接口级权限管理UI和监控仪表板
新增功能:
- 新增 ApiPermissions.vue 主页面,支持模块级/接口级权限切换
- 新增 ProjectPermissionsModule.vue 组件,展示模块级权限矩阵
- 新增 ApiEndpointPermissions.vue 组件,展示接口级权限矩阵
- 新增 PermissionMonitoring.vue 组件,展示权限系统监控仪表板
- 更新 projectPermissions.ts API 客户端,支持接口级权限和监控API
- 新增权限相关的 TypeScript 类型定义
- 更新路由配置,添加接口级权限管理路由
- 更新国际化文本,添加权限管理相关的中文文本

API 客户端新增函数:
- fetchApiEndpointPermissions: 获取接口级权限矩阵
- updateApiEndpointPermissions: 更新接口级权限矩阵
- fetchPermissionMetrics: 获取权限检查指标
- fetchCacheStats: 获取缓存统计
- fetchPermissionAlerts: 获取告警列表
- fetchPermissionHealth: 获取系统健康状态
- resetPermissionMetrics: 重置指标
- clearPermissionAlerts: 清除告警

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-14 09:19:07 +08:00
Cheng Zhou a17f4cc522 完善项目级权限与项目管理入口
- 新增项目成员候选用户接口,避免 PM 读取全局用户列表
- 按项目角色和权限矩阵控制项目管理、成员、中心与审计入口
- 合并侧边栏管理后台入口,统一从项目管理进入成员等模块
- 加强成员管理安全约束,禁止 PM 修改自己、系统管理员或更高权限角色
- 修复多项目角色缓存串用问题,并补充前后端回归测试
2026-05-13 14:16:15 +08:00
Cheng Zhou ab1975d3c6 登录注册:优化协议弹窗与PM后台落点
授权项目负责人登录后,若当前项目具备项目成员、中心管理或审计导出读取权限,优先进入对应管理后台页面,避免仍停留在我的工作台。

抽取登录协议为共享内容模块,注册页新增服务条款和隐私政策弹窗,并在注册成功后展示待管理员审核提示。

补充路由、登录页和注册页静态回归测试,覆盖 PM 管理后台默认落点和协议弹窗行为。
2026-05-13 11:03:46 +08:00
Cheng Zhou 89cecce6b5 权限管理:新增医学审核项目角色
新增 MEDICAL_REVIEW 项目角色,界面显示为医学审核,并通过 Alembic 迁移扩展 user_role 枚举。

为医学审核配置独立默认权限:项目总览、参与者、风险问题、监查稽查、FAQ、共享库按医学审核职责开放,不再复制 PV 默认权限。

同步前后端类型、项目成员角色下拉、权限矩阵展示、文件分发角色兜底和用户协议文案,并补充权限矩阵回归测试。
2026-05-13 09:25:37 +08:00
Cheng Zhou 939fc70532 权限管理:接入项目级权限矩阵
新增项目级角色权限矩阵,覆盖 PM、CRA、PV、IMP、QA 等项目角色,并通过迁移表持久化各业务模块的读写权限。

后端将参与者、合同费用、物资、启动、里程碑、风险问题、监查稽查、FAQ、共享库、文件版本等接口接入矩阵校验,修复审计日志导出权限和登录 502 的依赖导入问题。

前端新增权限管理页面和项目路由权限映射,按矩阵控制导航显示、直接访问拦截、操作按钮启停,并限制管理后台仅 admin 和授权 PM 可进入。

补充后端权限归一化与接口静态测试、前端路由/权限工具/权限管理页面/工作台等回归测试。
2026-05-13 08:58:03 +08:00
Cheng Zhou 77e842637d 中文:收口权限与中心/立项配置改造 2026-05-12 10:16:52 +08:00
Cheng Zhou 6e90370a5f 移除特殊费用模块 2026-05-12 10:15:18 +08:00
Cheng Zhou 20d45cfdfe 修复项目配置草稿原子保存逻辑 2026-05-11 11:03:06 +08:00
Cheng Zhou 8d061a1520 兼容旧草稿避免项目信息被清空 2026-05-11 09:02:14 +08:00
Cheng Zhou 917ab7ccf1 feat: refine subject visits and project workflows
Add early termination visit workflow with ordering, non-applicable visit handling, visit window display, and medication adherence support.

Extend monitoring visit issue template fields, site scoping, setup draft project info handling, login security UI, attachment behavior, and related tests/migrations.
2026-05-09 17:10:34 +08:00
Cheng Zhou 74feca4467 feat: harden auth and study workflows
- replace plaintext login and unlock requests with RSA-OAEP/AES-GCM encrypted payloads

- add login challenge replay protection, production RSA key validation, and auth tests

- wire compose to environment-driven dev/prod settings without committing local secrets

- update setup-config smoke scripts and Postman docs for encrypted login

- add visit schedule migrations/tests and update study/subject setup workflows
2026-05-08 22:16:43 +08:00
Cheng Zhou a7bbcaa5dc fix: 优化业务表格展示与登录会话体验 2026-03-31 14:37:06 +08:00
Cheng Zhou ceda34fd1d fix: 修复筛选栏空关联告警 2026-03-31 12:16:04 +08:00
Cheng Zhou 4bebc64662 feat: 清理示例数据并统一空态体验 2026-03-31 11:20:57 +08:00
Cheng Zhou fc74d1e9a9 fix: 对齐用户接口尾斜杠路径 2026-03-31 10:08:26 +08:00
Cheng Zhou ba880dad9a fix: 移除前端 API 环境入口 2026-03-31 09:44:49 +08:00
Cheng Zhou 9535fece6c feat: 按历史痕迹恢复 nginx 同域入口 2026-03-31 09:16:41 +08:00
Cheng Zhou 27ba5eabff feat: 移除仓库内 nginx 并拆分前端运行时 2026-03-30 22:04:15 +08:00
Cheng Zhou 3a1415d1e1 chore: 清理本地配置并重组文档结构 2026-03-30 17:36:09 +08:00
Cheng Zhou 8c5d03f1cb 移除示例项目初始化并修复前后端稳定性问题 2026-03-30 15:35:22 +08:00
Cheng Zhou f2f856ea24 chore: productionize compose deployment 2026-03-27 16:13:28 +08:00
Cheng Zhou d8c5413b26 style: normalize CSS selector spacing 2026-03-27 15:22:48 +08:00
Cheng Zhou 8bec268a5b 优化登录页UI、新增占满布局类 2026-03-10 11:37:19 +08:00
Cheng Zhou 4c98147f3e 登录页UI及长时间未操作锁定逻辑优化 2026-03-10 10:10:58 +08:00
Cheng Zhou 5caf4c51cc feat(ui): unify loading empty error states 2026-03-04 16:40:18 +08:00
Cheng Zhou a3036c2233 feat(ui): align admin project detail with enterprise system 2026-03-04 16:38:18 +08:00
Cheng Zhou 39b4d2a2ea feat(ui): unify finance and file management surfaces 2026-03-04 16:36:28 +08:00
Cheng Zhou 90d724a5fe feat(ui): elevate project overview for executive readout 2026-03-04 16:34:25 +08:00
Cheng Zhou 1b920520d6 feat(ui): unify list-page enterprise visual pattern 2026-03-04 16:28:41 +08:00
Cheng Zhou 80d9830139 feat(ui): enforce shared page shell contract 2026-03-04 16:26:17 +08:00
Cheng Zhou f7e867c2bd feat(ui): add enterprise token baseline 2026-03-04 16:25:05 +08:00
Cheng Zhou fd6177d479 chore(ui): add enterprise ui contract checks 2026-03-04 16:23:31 +08:00
Cheng Zhou 0cd03eefa8 立项配置版本管理优化(回滚逻辑、UI、下载功能) 2026-03-04 14:49:59 +08:00
Cheng Zhou 6c5e5770c6 小优化-立项配置-预览模式下“更新”显示 2026-02-28 16:41:20 +08:00
Cheng Zhou 9b36a42e6f 参与者管理- PD模块内容补充 2026-02-28 14:33:57 +08:00
Cheng Zhou af0c1b4b7d 补充监查访视问题模块内容、翻页功能UI统一 2026-02-28 09:51:13 +08:00
Cheng Zhou db2d38edbc 立项配置数据入库、审计日志数据入库、编辑页UI界面美化、设备管理内容补充、审计日志显示优化 2026-02-27 16:16:26 +08:00
Cheng Zhou fd7e3fc948 项目里程碑初步优化 2026-02-27 09:06:06 +08:00
Cheng Zhou 8f3f717e48 立项配置页初步优化 2026-02-24 16:53:22 +08:00
Cheng Zhou 0693f09b1d init.sql小bug修复-20260204 2026-02-04 16:17:51 +08:00
Cheng Zhou 737f84bf54 未知(继上次中断) 2026-02-04 10:52:34 +08:00
Cheng Zhou 8e258d21a7 chore: stop tracking frontend node_modules 2026-01-20 08:52:54 +08:00
Cheng Zhou 7fdcfdaadd 管理后台前后端逻辑、UI美化 2026-01-16 13:50:08 +08:00
Cheng Zhou 05c1f9579a 启动与授权-初步优化 2026-01-15 11:25:13 +08:00
Cheng Zhou 4fc5f0ee9b 立项与伦理-初步优化,新增.env 2026-01-14 15:33:52 +08:00
Cheng Zhou f9ef5c109f 文件版本管理-初步优化 2026-01-14 11:35:37 +08:00
Cheng Zhou ef1e67218c 药品流向管理内容优化-初步 2026-01-13 19:42:28 +08:00
Cheng Zhou 1db36f40b0 费用管理内容优化-初步 2026-01-13 16:49:55 +08:00