20260726225220

This commit is contained in:
oneao committed 2026-07-26 22:52:21 +08:00
1 parent e3c7c6f8da
commit a8478d60ed
170 files changed
+6786 -1678

No files matched your search

+19 -19
View File
@@ -30,9 +30,9 @@ fms-api/config/migrations/003_module_surrogate_key.sql
按以下顺序建立表:
1. `b_module`
2. `b_module_field`
3. `b_module_power`
1. `s_module`
2. `s_module_field`
3. `s_module_power`
4. `b_user_module`
5. `b_user_power`
6. `b_i18n`
@@ -91,9 +91,9 @@ grant 用户授权
| 数据 | 接口 | 数据源 |
| --- | --- | --- |
| 模块树 | `/data/loaddata` | `b_module` |
| 模块字段 | `/data/loaddata` | `b_module_field` |
| 操作权限定义 | `/data/loaddata` | `b_module_power` |
| 模块树 | `/data/loaddata` | `s_module` |
| 模块字段 | `/data/loaddata` | `s_module_field` |
| 操作权限定义 | `/data/loaddata` | `s_module_power` |
| 多语言 | `/data/loaddata` | `b_i18n` |
| 删除依赖检查 | `/data/loaddata` | `b_user_module`、`b_user_power` |
@@ -103,21 +103,21 @@ grant 用户授权
新增以下数据前调用 `/data/nextid`:
- `b_module_field.b_id`
- `b_module_power.b_id`
- `s_module_field.b_id`
- `s_module_power.b_id`
- `b_i18n.b_id`
- `b_module.b_id`
- `s_module.b_id`
`b_module.b_id` 使用不可变雪花 ID;可修改的小写模块编码保存在 `b_module.b_code`。
`s_module.b_id` 使用不可变雪花 ID;可修改的小写模块编码保存在 `s_module.b_code`。
### 模块保存
前端维护服务器快照和编辑副本,计算 inserts、updates、deletes,然后一次调用 `/data/saveobjt` 保存:
```text
b_module
b_module_field
b_module_power
s_module
s_module_field
s_module_power
b_i18n
```
@@ -126,12 +126,12 @@ b_i18n
```json
[
{
"table": "b_module",
"table": "s_module",
"key_field": "b_id",
"updates": []
},
{
"table": "b_module_field",
"table": "s_module_field",
"key_field": "b_id",
"inserts": [],
"updates": [],
@@ -159,10 +159,10 @@ b_i18n
```text
b_user_power
b_user_module
b_module_power
b_module_field
s_module_power
s_module_field
b_i18n
b_module
s_module
```
## 第四阶段:将 Demo 改为真实页面
@@ -200,7 +200,7 @@ services/moduleManagement.js
### 菜单
`AppSidebar` 通过现有通用查询接口读取当前用户的 `b_user_module` 和可用的 `b_module`,在前端构建菜单树。
`AppSidebar` 通过现有通用查询接口读取当前用户的 `b_user_module` 和可用的 `s_module`,在前端构建菜单树。
- 只显示 `b_canmenu = 1`、`b_canuse = 1` 且用户有权限的页面。
- 上级目录根据可访问下级页面自动显示。