sub_flow 节点引入工作流修复与首页执行工作流重构
- 引入工作流列表字段兼容 flowName,选择弹窗卡片正常展示数据
- 生成次数 maxConcurrency 同步保存到 sub_flow 节点,回显兜底恢复
- valueSource 按后端契约统一 {nodeId, fieldName},表单展示/引用正确保存与回显
- 首页执行工作流 DSL 字段路径改为 .enumValues[i],支持引用上游输出与上传文件名
This commit is contained in:
@@ -12,6 +12,10 @@ export interface NodeLibraryPresetOption {
|
||||
value: string;
|
||||
config?: NodeLibraryPresetOption[] | null;
|
||||
}> | null;
|
||||
// 运行时已在用的扩展字段(补齐声明消除 TS 报错)
|
||||
isFormField?: boolean;
|
||||
constraint?: any;
|
||||
defaultValue?: any;
|
||||
}
|
||||
|
||||
export interface NodeLibraryItem {
|
||||
@@ -89,3 +93,37 @@ export function getWorkflowSkillList(params?: { pageNum: number; pageSize: numbe
|
||||
params,
|
||||
}) as Promise<{ code: number; message: string; data: { list: WorkflowSkillItem[]; total: number } }>;
|
||||
}
|
||||
|
||||
// ===== 子流程:引入已有工作流(独立实现,不依赖 creation)=====
|
||||
export interface SubFlowWorkflowItem {
|
||||
id: string;
|
||||
// 后端列表接口返回 flowName(name 仅为前端兜底)
|
||||
name?: string;
|
||||
flowName?: string;
|
||||
description?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 获取"我的工作流"列表(IsOwn=true 只取本人创建,供 sub_flow 节点选择引入)
|
||||
// 响应结构多形态容错在调用方处理(data.list ?? data.listFlowUserRes.list)
|
||||
export function getSubFlowWorkflowList(params?: {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
keyword?: string;
|
||||
IsOwn?: boolean;
|
||||
}) {
|
||||
return request({
|
||||
url: '/ai-agent/flow/user/list',
|
||||
method: 'get',
|
||||
params,
|
||||
}) as Promise<{ code: number; message: string; data: any }>;
|
||||
}
|
||||
|
||||
// 获取工作流详情(取开始节点 outputConfig 构建 sub_flow 引入参数)
|
||||
export function getSubFlowWorkflowDetail(id: string) {
|
||||
return request({
|
||||
url: '/ai-agent/flow/user/get',
|
||||
method: 'get',
|
||||
params: { id },
|
||||
}) as Promise<{ code: number; message: string; data: any }>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user