45 lines
1.2 KiB
Markdown
45 lines
1.2 KiB
Markdown
# 危化品证上传按钮权限 实现计划
|
|
|
|
> **For agent:** 按 Task 顺序执行;设计见 `docs/superpowers/specs/2026-09-03-pl-plan-cert-button-permission-design.md`
|
|
|
|
**Goal:** 为【危化品证上传】三按钮加 `upload` / `ready` 权限,前后端一致拦截。
|
|
|
|
**Architecture:** `sys_menu` F 按钮 + `fetchGetMenuCodes` 前端隐藏 + `pl_plan_cert_perm.py` 后端 403。
|
|
|
|
**Tech Stack:** Vue 3 / FastAPI / MySQL sys_menu
|
|
|
|
---
|
|
|
|
### Task 1: 菜单 SQL
|
|
|
|
**Files:**
|
|
- Create: `docs/sql/migrations/2026-09-03-pl-plan-cert-button-perm.sql`
|
|
- Modify: `docs/sql/shanxia2.0.sql`
|
|
|
|
- [x] 新增 `PL_PLAN_CERT_U` / `PL_PLAN_CERT_R`
|
|
- [x] 对已拥有 `PL_PLAN_CERT` 的角色补授权
|
|
|
|
### Task 2: 后端权限
|
|
|
|
**Files:**
|
|
- Create: `backend/app/services/pl_plan_cert_perm.py`
|
|
- Modify: `backend/app/api/pl/plan.py`
|
|
|
|
- [x] `product-certs` → `upload`
|
|
- [x] `hazard-cert-ready` → `ready`
|
|
|
|
### Task 3: 前端接线
|
|
|
|
**Files:**
|
|
- Modify: `web-admin/src/views/pl/plan-cert/index.vue`
|
|
|
|
- [x] `loadPlanCertPermissions`
|
|
- [x] 工具栏 / hero / 列表附件列
|
|
- [x] 写操作 handler 二次校验
|
|
|
|
### Task 4: 验收
|
|
|
|
- [ ] 测试库执行迁移 SQL
|
|
- [ ] 场景:仅 list / upload / ready / 全权限
|
|
- [ ] 重新登录刷新 menuCodes
|