From 63aa678ac0fd629e8b7e2bedfef6f7a01d74c24b Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Wed, 6 May 2026 18:40:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD=E5=92=8C=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=A1=A8=E5=8D=95=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增工作流相关接口和类型定义,包括创建、更新、删除和获取工作流列表的功能 - 更新界面,支持工作流的展示和操作,允许用户保存和管理工作流 - 优化动态表单,支持根据工作流节点动态生成表单项 - 修改按钮事件名称以提高代码可读性 --- src/api/digitalHuman/creation/index.ts | 75 +- src/views/digitalHuman/creation/index.vue | 1630 +++++++++++++++++++-- 2 files changed, 1608 insertions(+), 97 deletions(-) diff --git a/src/api/digitalHuman/creation/index.ts b/src/api/digitalHuman/creation/index.ts index 65ed5db..03fb783 100644 --- a/src/api/digitalHuman/creation/index.ts +++ b/src/api/digitalHuman/creation/index.ts @@ -14,10 +14,16 @@ export interface NodeLibraryFormItem { default?: string | number | boolean; } +export interface NodeLibraryModelConfig { + modelName: string; + modelForm: NodeLibraryFormItem[]; +} + export interface NodeLibraryItem { nodeCode: string; nodeName: string; - form: NodeLibraryFormItem[]; + formConfig: NodeLibraryFormItem[]; + modelConfig: NodeLibraryModelConfig[]; } export interface NodeLibraryGroup { @@ -89,7 +95,6 @@ export interface DownloadToFileParams { fileURL: string; } -// requestOptions 用来声明“这个接口的错误提示由谁负责”。 export function getCreationList(params: CreationListParams, requestOptions?: RequestOptions) { return request({ url: '/black-deacon/creation/info/list', @@ -126,3 +131,69 @@ export function downloadToFile(data: DownloadToFileParams, requestOptions?: Requ requestOptions, }); } + +export function saveWorkflow(data: { flowName: string; description: string; flowContent: any }, requestOptions?: RequestOptions) { + return request({ + url: '/black-deacon/flow/user/create', + method: 'post', + data, + requestOptions, + }); +} + +export interface WorkflowItem { + id: string; + flowName: string; + description: string; + flowContent: any; + nodeInputParams?: any[]; +} + +export interface WorkflowListResponse { + code: number; + message: string; + data: { + list: WorkflowItem[]; + }; +} + +export function getWorkflowList(requestOptions?: RequestOptions) { + return request({ + url: '/black-deacon/flow/user/list', + method: 'get', + requestOptions, + }) as Promise; +} + +export interface WorkflowDetailResponse { + code: number; + message: string; + data: WorkflowItem; +} + +export function getWorkflowDetail(id: string, requestOptions?: RequestOptions) { + return request({ + url: '/black-deacon/flow/user/get', + method: 'get', + params: { id }, + requestOptions, + }) as Promise; +} + +export function updateWorkflow(data: { id: string; flowName: string; description: string; flowContent: any }, requestOptions?: RequestOptions) { + return request({ + url: '/black-deacon/flow/user/update', + method: 'put', + data, + requestOptions, + }); +} + +export function deleteWorkflow(id: string, requestOptions?: RequestOptions) { + return request({ + url: '/black-deacon/flow/user/delete', + method: 'delete', + params: { id }, + requestOptions, + }); +} diff --git a/src/views/digitalHuman/creation/index.vue b/src/views/digitalHuman/creation/index.vue index d202efb..4539ad3 100644 --- a/src/views/digitalHuman/creation/index.vue +++ b/src/views/digitalHuman/creation/index.vue @@ -1,8 +1,17 @@