fix(web): support approval history drawer

This commit is contained in:
2026-06-18 02:12:49 +08:00
parent 16393c183c
commit d03c2ba156
6 changed files with 114 additions and 19 deletions

View File

@@ -179,11 +179,11 @@ export function AppShell() {
};
}, []);
// 转换页 amis action → 全局审批抽屉。事件 detail 只信 taskId;其余字段缺失时由 ApprovalDrawer 再查 meta 补齐。
// 转换页 amis action → 全局审批抽屉。taskId 走办理/已办详情;businessKey/processInstanceId 走只读历史查看。
useEffect(() => {
const openApprovalDrawer = (event: Event) => {
const detail = (event as CustomEvent<ApprovalDrawerRequest>).detail;
if (!detail?.taskId) return;
if (!detail?.taskId && !detail?.businessKey && !detail?.processInstanceId) return;
setApprovalRequest(detail);
};
window.addEventListener(OPEN_APPROVAL_DRAWER_EVENT, openApprovalDrawer);