Add tenant-scoped teams and projects, order attribution across four businesses, conversion inheritance, scoped statistics and audited reassignment. Reuse existing Web and mobile UI patterns; team regions and hospitals remain informational.
Include incremental SQL and isolated regression coverage. Actual MySQL and browser/WebView integration validation remains pending; relates to issue #13.
Use existing menu permissions for management actions, preserve shared list styles in teleported detail dialogs, and align project attribution column collations with the project primary key. Record isolated MySQL and browser validation while retaining the real-device acceptance gate.
Add the Project navigation group alongside Market, Production and Quality. Preserve existing leaf IDs and role grants while migrating the menu hierarchy, keep legacy URLs redirecting, and align frontend/backend menus.
Keep project management lists and related detail, preview and audit dialogs consistent with existing table and filter styles. Number paginated rows continuously and align statistics and assignment searches to the right.
Separate cross-team selection from attribution maintenance and apply the same scope to options, history filters and writes. Add an opt-in tenant permission without granting existing roles.
Protect authorization mutation paths against self-grants, validate tenant targets and links, and include menu ancestors atomically. Cover role union, revocation, mobile writes and administration boundaries with regression tests.
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
为四类业务增加稳定的项目归属,支持按项目组/项目查看数量、状态及对应明细。区域与医院仅作项目组资料,沿用既有业务权限、地点字段和样式。关联 工单 #13,不自动关单。
用户追加导航要求已实现:“项目”为独立一级菜单,与市场/生产/质检平级,下含项目组管理、项目管理、业务统计、历史归属维护。旧地址保留重定向;追加
2026-11-02-project_top_menu.sql迁移,保留叶子ID和授权,仅补新祖先。两租户重复迁移、权限边界及移动根不变验证通过;后端17项、Web5项测试、定向ESLint和Web生产构建通过,实际浏览器导航/旧地址跳转及独立审查通过。范围:backend、web-admin、mobile-oa-h5;mobile-h5 仅待现有 WebView 联动验证。Figma v1 已由用户确认,代码复用既有 Element/Vant 组件、列表/表单/弹窗样式。临床申请不新增项目功能。
追加项目选择权限:所属项目权限已独立:默认仅本人作为项目组负责人/有效成员所在组(多组并集);跨组需 project:project:all,角色配置入口为“项目 → 全部项目”,不自动授予现有角色。归属维护权限、普通管理员和单独项目负责人不能越过组范围;super_admin沿用系统全权限语义但限认证租户。后端同时限制候选、历史筛选及写入,原业务数据权限/历史回显/转换继承保留。为防止自行授予all,同步严格校验系统用户/角色/职位/菜单变更及质检金额专用角色授权的权限、目标租户和关联ID;角色菜单保存补齐祖先且拒绝断链/循环。升级需执行2026-11-02-project_all_permission.sql,并核对配置人员原有system:*:list权限。
Evidence
列表样式反馈已处理:四个主列表及业务明细、关联预览、归属审计均补序号,分页按页码连续编号;业务统计、历史归属维护和明细弹窗检索按钮按全局样式右对齐。浏览器逐页/弹窗核验、Web5项测试、定向ESLint、生产构建和独立审查通过。截图 project-lists-polish-qa.jpg;真机待验收状态不变。
After: 新增后端44项、移动前端353项、Web5项测试通过;统计在数据库按项目汇总;独立审查无剩余P1/P2。
0bddf38e52c97ee67c5e1134a6b5ba2c5911846c;目标V2.0,开发基线e9df9d65e1524df3f58a82b9ef2eb212bcdd762f。追加验证:121项相关自动测试通过(含先失败后修复的越权回归);隔离MySQL/HTTP41项检查通过,3租户重复权限种子不自动授权,5类主单及移动创建越权拒绝,同会话授权/撤权生效,8条自行授权入口被拒绝。浏览器确认单独勾选全部项目并自动补祖先,截图project-all-permission-qa.jpg;最终测试成员恢复为组内范围。独立复审无P1/P2。字段一致性仍5项既有警告。本轮无前端源码变更,不重复构建;微信真机、集成验证及合并继续待办。
Merge Danger
Door: two-way(保留增量表和nullable字段,可回退应用代码)。
Blast Radius: 跨端业务归属。
待真机验收,暂不合并。 用户已明确没有微信真机调试环境,要求保留任务版本。浏览器尺寸模拟不能替代真机 WebView 联动;集成候选验证、合并及主目录运行环境恢复尚未执行。任务 worktree 与 8000/3006/5178 服务保留,均使用独立测试库,原业务数据库未修改;环境占用不释放。工单保持开放。
Web 样式参考 P01 标准列表 CRUD、P02 复杂业务列表及 P12 重表单弹窗,沿用
src/views/system/unit/index.vue、src/views/cell-storage/protocol/ProtocolFormDialog.vue与全局样式;移动端复用现有市场 Vant 表单与选择器。迁移入口见 backend/README.md「项目归属启用」。
PROJECT_ASSIGNMENT_REQUIRED=false兼容启用阶段;项目配置齐全后由运维设true。菜单种子不自动授予角色权限。cykj referenced this pull request2026-11-02 07:32:37 +00:00
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.