diff --git a/src/api/digitalHuman/creation/index.ts b/src/api/digitalHuman/creation/index.ts index 295226e..7400514 100644 --- a/src/api/digitalHuman/creation/index.ts +++ b/src/api/digitalHuman/creation/index.ts @@ -76,7 +76,7 @@ export interface ExecutionItem { export interface ExecutionFlowItem { flowName: string; - flowId?: number | string; + Id?: number | string; sessionId?: string; items: ExecutionItem[]; } @@ -228,6 +228,15 @@ export function getWorkflowDetail(id: string, requestOptions?: RequestOptions) { }) as Promise; } +export function getExecutionDetail(id: string, requestOptions?: RequestOptions) { + return request({ + url: '/ai-agent/flow/execution/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: '/ai-agent/flow/user/update', diff --git a/src/views/digitalHuman/creation/index.vue b/src/views/digitalHuman/creation/index.vue index bae2ae9..a9c649f 100644 --- a/src/views/digitalHuman/creation/index.vue +++ b/src/views/digitalHuman/creation/index.vue @@ -585,6 +585,7 @@ import { getNodeLibraryList, getWorkflowList, getWorkflowDetail, + getExecutionDetail, updateWorkflow, deleteWorkflow, saveWorkflow, @@ -609,7 +610,7 @@ interface TreeNode { nodeType: NodeType; children?: TreeNode[]; fileUrl?: string; - flowId?: number | string; + workflowId?: number | string; sessionId?: string; } interface SelectedState { @@ -880,7 +881,7 @@ const buildTreeNodes = (tree: ExecutionTreeItem[]): TreeNode[] => id: `flow-${di}-${fi}`, label: f.flowName || '未命名工作流', nodeType: 'contentType', - flowId: f.flowId, + workflowId: f.Id, sessionId: f.sessionId, // 添加 sessionId children: (f.items || []).map((item, ii) => ({ id: `item-${di}-${fi}-${ii}`, @@ -1337,10 +1338,10 @@ const getFieldClass = (type: string) => { // 处理树节点点击 const handleTreeNodeClick = async (data: TreeNode) => { // 只处理工作流节点(contentType) - if (data.nodeType === 'contentType' && data.flowId) { + if (data.nodeType === 'contentType' && data.workflowId) { try { - // 调用详情接口获取工作流数据,使用 flowId - const res = await getWorkflowDetail(String(data.flowId)); + // 从工作空间进入,使用 execution/get 接口获取执行详情 + const res = await getExecutionDetail(String(data.workflowId)); if (res.data) { // 设置当前会话的 sessionId(从工作空间进入) currentSessionId.value = data.sessionId || null; diff --git a/src/views/digitalHuman/modelConfig/modelModule/component/editModule.vue b/src/views/digitalHuman/modelConfig/modelModule/component/editModule.vue index 8ad62fb..8444cde 100644 --- a/src/views/digitalHuman/modelConfig/modelModule/component/editModule.vue +++ b/src/views/digitalHuman/modelConfig/modelModule/component/editModule.vue @@ -38,7 +38,7 @@ - + 本地模型 @@ -609,7 +609,7 @@ const openDialog = async (type: string, row?: Record) => { baseUrl: '', httpMethod: 'POST', headMsg: '', - isPrivate: 0, + isPrivate: props.isSuperAdmin ? 1 : 0, apiKey: '', enabled: 1, isChatModel: 0,