feat(P1④/P1⑤): 改表加列UI + 审批列表入口e2e

- P1④ 改表加列: meta.ts alterEntity(POST /api/meta/entity/{table}/attributes)
  + ModelerPage 行内「加字段」Dialog(复用FieldTable),打破"v1只建新不改表"
  + five-ring.spec.ts 新增"改已有表加列(建模器加字段→元数据落库)"浏览器e2e
- P1⑤ 审批列表入口: 新增 approval-list-entry.spec.ts(纯mock)验生产主路径
  转换列表页按钮→选中行(checkOnItemClick)→openApprovalDrawer→AppShell→ApprovalDrawer抽屉打开
- build绿+vitest73;fivering 5/5 + 审批入口 1/1 全绿

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-21 13:56:27 +08:00
parent d1fd6ed956
commit 5b117df4d1
4 changed files with 235 additions and 3 deletions

View File

@@ -59,6 +59,24 @@ export async function createEntity(body: CreateEntityBody): Promise<CreateEntity
return resp.data.data;
}
export interface AlterEntityResult {
tablename: string;
addedColumns: string[];
indexCount: number;
}
/**
* POST /api/meta/entity/{table}/attributes —— 给已建实体加列(P1④ 改表加字段)。
* 后端走受控 ALTER 安全通道(只加列 / 恒可空,经 AlterTableSqlGuard 白名单)。
*/
export async function alterEntity(table: string, attributes: EntityAttr[]): Promise<AlterEntityResult> {
const resp = await http.post<Envelope<AlterEntityResult>>(
`/api/meta/entity/${encodeURIComponent(table)}/attributes`,
{ attributes },
);
return resp.data.data;
}
/** GET /api/meta/entities —— 实体目录(供引用列选择器)。 */
export async function listEntities(): Promise<EntitySummary[]> {
const resp = await http.get<Envelope<EntitySummary[]>>('/api/meta/entities');