feat(flow-editor): ApprovalNode 增多出口 outlets/branches,遍历链路打通
This commit is contained in:
@@ -28,6 +28,10 @@ export interface ApprovalNode {
|
||||
countersign: Countersign;
|
||||
/** 办理时限(小时):null=不限,生成 JSON 时省略 */
|
||||
deadlineHours: number | null;
|
||||
/** 多出口(≥2 才有多出口语义):出口按钮文案,办理人按下哪个按钮走哪条泳道;单出口不写字段 */
|
||||
outlets?: string[];
|
||||
/** 各出口泳道(与 outlets 一一对应);分支尾隐式汇合到后继节点(同条件分支,无 JOIN) */
|
||||
branches?: EditorItem[][];
|
||||
}
|
||||
|
||||
/** 抄送节点(2026-09-23):瞬时知会,不产生待办;receivers 复用审批人结构(DEPT_KEY/USERS) */
|
||||
@@ -192,9 +196,12 @@ export interface ContainerRef {
|
||||
items: EditorItem[];
|
||||
}
|
||||
|
||||
/** 容器型节点(并行/条件分支)的分支数组取用(resolveContainer/removeItem 等共用口径) */
|
||||
/** 容器型节点(并行/条件分支/多出口审批)的分支数组取用(resolveContainer/removeItem 等共用口径) */
|
||||
export function branchesOf(item: EditorItem | null): EditorItem[][] | null {
|
||||
if (item && (item.kind === "parallel" || item.kind === "condition")) return item.branches;
|
||||
if (item && (item.kind === "parallel" || item.kind === "condition"
|
||||
|| (item.kind === "approval" && item.branches && item.branches.length))) {
|
||||
return item.branches;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -336,6 +343,8 @@ export interface EditorCtx {
|
||||
/** 添加分支(并行/条件分支容器通用;条件分支同步补一个占位出口名) */
|
||||
addBranch: (containerUid: string) => void;
|
||||
removeBranch: (containerUid: string, index: number) => void;
|
||||
/** 退出多出口(多出口审批泳道头部按钮):仅保留出口①泳道内容 */
|
||||
exitOutlets: (uid: string) => void;
|
||||
}
|
||||
|
||||
export const EDITOR_CTX: InjectionKey<EditorCtx> = Symbol("flowDefEditorCtx");
|
||||
|
||||
Reference in New Issue
Block a user