fix(web): support approval history drawer
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user