From a285c9d982613ca8992d4b841355ca69a6e2c1f9 Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Fri, 8 May 2026 22:00:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E4=BA=BA=E5=88=9B=E4=BD=9C=E9=A1=B5=E9=9D=A2=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B7=A5=E4=BD=9C=E6=B5=81=E5=92=8C=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改工作流项接口,新增流模板名称和用户流列表支持 - 引入新的输入区域,允许用户上传文件并选择创作技能 - 实现工作流列表的Tab切换,分为“我的工作流”和“模板工作流” - 优化界面布局和交互,提升用户体验 --- src/api/digitalHuman/creation/index.ts | 82 +++- src/views/digitalHuman/creation/index.vue | 487 ++++++++++++++++++---- 2 files changed, 493 insertions(+), 76 deletions(-) diff --git a/src/api/digitalHuman/creation/index.ts b/src/api/digitalHuman/creation/index.ts index e22a6aa..c6bfb94 100644 --- a/src/api/digitalHuman/creation/index.ts +++ b/src/api/digitalHuman/creation/index.ts @@ -144,7 +144,8 @@ export function saveWorkflow(data: { flowName: string; description: string; flow export interface WorkflowItem { id: string; - flowName: string; + flowName?: string; + flowTemplateName?: string; description: string; flowContent: any; nodeInputParams?: any[]; @@ -154,7 +155,15 @@ export interface WorkflowListResponse { code: number; message: string; data: { - list: WorkflowItem[]; + listFlowUserRes: { + list: WorkflowItem[]; + total: number; + }; + listFlowTemplateRes: { + list: WorkflowItem[]; + total: number; + }; + isAdmin?: boolean; }; } @@ -198,3 +207,72 @@ export function deleteWorkflow(id: string, requestOptions?: RequestOptions) { requestOptions, }); } + +// 执行工作流相关类型定义 +export interface FlowNodeFormField { + default?: any; + field?: string; + label?: string; + options?: { label?: string; value?: string }[]; + required?: boolean; + type?: string; + value?: string; +} + +export interface FlowNodeInputSource { + field?: string[]; + nodeId?: string; + quoteOutput?: boolean; +} + +export interface FlowNodeModelItem { + modelApiKey?: string; + modelForm?: FlowNodeFormField[]; + modelName?: string; +} + +export interface FlowNode { + config?: { [key: string]: any }; + formConfig?: FlowNodeFormField[]; + id?: string; + inputSource?: FlowNodeInputSource[]; + modelConfig?: FlowNodeModelItem; + name?: string; + nodeCode?: string; + outputResult?: FlowNodeFormField[]; + skillName?: string; +} + +export interface FlowEdge { + from?: string; + id?: string; + to?: string; +} + +export interface FlowInfo { + edges?: FlowEdge[]; + nodes?: FlowNode[]; + startNodeId?: string; + version?: string; +} + +export interface ExecuteFlowParams { + desc?: string; + fileUrl?: string[]; + flowContent?: FlowInfo; + flowId?: number; + nodeInputParams?: FlowNode[]; + sessionId?: string; + skillName?: string; +} + +export function executeFlow(data: ExecuteFlowParams | FormData, requestOptions?: RequestOptions) { + return request({ + url: '/ai-agent/flow/execution/execute', + method: 'post', + data, + headers: data instanceof FormData ? { 'Content-Type': 'multipart/form-data' } : undefined, + timeout: 0, + requestOptions, + }); +} diff --git a/src/views/digitalHuman/creation/index.vue b/src/views/digitalHuman/creation/index.vue index 974979b..bb118d3 100644 --- a/src/views/digitalHuman/creation/index.vue +++ b/src/views/digitalHuman/creation/index.vue @@ -296,8 +296,45 @@ -
- 开始创作 + + +
+ +
+ + {{ file.name }} + +
+ + +
+ +
+ + + + +
+ + + + + + +
+ + +
+ 技能: {{ selectedCreationSkill.name }} +
@@ -343,41 +380,80 @@
-
-
我的工作流
- 刷新 -
-
- -
-
-
-
{{ workflow.flowName }}
-
{{ workflow.description || '暂无描述' }}
-
-
- 编辑 - 删除 + + + +
+ 新建 + 刷新 +
+
+ +
+
+
+
{{ workflow.flowName }}
+
{{ workflow.description || '暂无描述' }}
+
+
+ 编辑 + 删除 +
+
-
-
- -
- -
+ +
+ +
+ + + + +
+ 新建 + 刷新 +
+
+ +
+
+
+
{{ workflow.flowName || workflow.flowTemplateName }}
+
{{ workflow.description || '暂无描述' }}
+
+
+ 编辑 + 使用 + 删除 +
+
+
+
+ +
+ +
+
+
@@ -403,13 +479,16 @@ + + +