From 3a7714908717a52fac9fb25a8b89a6b67e6cdc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com> Date: Mon, 3 Aug 2026 14:54:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E5=88=97=E8=A1=A8=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/ai/workflow/WorkflowList.vue | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue b/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue index 210c345d..aa120fe8 100644 --- a/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue +++ b/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue @@ -597,13 +597,17 @@ const apiDocMarkdown = computed(() => { lines.push(``); lines.push(`通过 Public API 可异步执行已发布的工作流并获取执行结果。`); lines.push(``); - lines.push(`**调用流程**:发起执行 → 轮询查询执行结果 → (若有确认节点)恢复执行`); + lines.push( + `**调用流程**:发起执行 → 轮询查询执行结果 → (若有确认节点)恢复执行`, + ); lines.push(``); // ---- 鉴权 ---- lines.push(`## 鉴权`); lines.push(``); - lines.push(`所有请求需在 Header 中携带访问令牌,访问令牌需开启 **工作流 API 调用授权**。`); + lines.push( + `所有请求需在 Header 中携带访问令牌,访问令牌需开启 **工作流 API 调用授权**。`, + ); lines.push(``); lines.push('```'); lines.push(`ApiKey: `); @@ -617,7 +621,9 @@ const apiDocMarkdown = computed(() => { lines.push(``); lines.push(apiUrlLine('POST', `${baseUrl}/runAsync`)); lines.push(``); - lines.push(`异步执行工作流,立即返回执行 ID。工作流必须已发布且存在发布快照。`); + lines.push( + `异步执行工作流,立即返回执行 ID。工作流必须已发布且存在发布快照。`, + ); lines.push(``); lines.push(`### 请求体`); lines.push(``); @@ -644,7 +650,9 @@ const apiDocMarkdown = computed(() => { lines.push(`| --- | --- | --- | --- |`); for (const f of fields) { const desc = [f.label, f.description].filter(Boolean).join(' · '); - lines.push(`| ${f.key} | ${f.type} | ${f.required ? '是' : '否'} | ${desc} |`); + lines.push( + `| ${f.key} | ${f.type} | ${f.required ? '是' : '否'} | ${desc} |`, + ); } lines.push(``); } @@ -655,7 +663,9 @@ const apiDocMarkdown = computed(() => { lines.push(buildRunResponseExample()); lines.push('```'); lines.push(``); - lines.push(`\`data\` 为 **执行 ID**(executeId),后续查询和恢复均需使用此 ID。`); + lines.push( + `\`data\` 为 **执行 ID**(executeId),后续查询和恢复均需使用此 ID。`, + ); lines.push(``); lines.push(`---`); lines.push(``); @@ -745,7 +755,9 @@ const apiDocMarkdown = computed(() => { lines.push(`### 响应`); lines.push(``); lines.push('```json'); - lines.push(JSON.stringify({ errorCode: 0, message: '成功', data: null }, null, 2)); + lines.push( + JSON.stringify({ errorCode: 0, message: '成功', data: null }, null, 2), + ); lines.push('```'); lines.push(``); lines.push(`恢复后可继续轮询 \`getChainStatus\` 获取后续执行状态。`); @@ -756,13 +768,19 @@ const apiDocMarkdown = computed(() => { lines.push(``); lines.push(`## 错误处理`); lines.push(``); - lines.push(`当请求失败时,\`errorCode\` 不为 0,\`message\` 包含错误原因。常见错误:`); + lines.push( + `当请求失败时,\`errorCode\` 不为 0,\`message\` 包含错误原因。常见错误:`, + ); lines.push(``); lines.push(`| 场景 | 说明 |`); lines.push(`| --- | --- |`); lines.push(`| ApiKey 无效或过期 | 检查访问令牌状态与有效期 |`); - lines.push(`| 未授权工作流 API 调用 | 在访问令牌中开启「工作流 API 调用授权」 |`); - lines.push(`| 工作流尚未发布 | 仅已发布且存在发布快照的工作流可通过 API 调用 |`); + lines.push( + `| 未授权工作流 API 调用 | 在访问令牌中开启「工作流 API 调用授权」 |`, + ); + lines.push( + `| 工作流尚未发布 | 仅已发布且存在发布快照的工作流可通过 API 调用 |`, + ); return lines.join('\n'); }); @@ -777,8 +795,8 @@ async function submitPublishAction(row: any) { const confirmation = await confirmPublishSubmission({ api, confirmMessage: isRepublishAction(row) - ? $t('aiWorkflow.submitRepublishApprovalConfirm') - : $t('aiWorkflow.submitPublishApprovalConfirm'), + ? $t('aiWorkflow.submitRepublishApprovalConfirm') + : $t('aiWorkflow.submitPublishApprovalConfirm'), id: row.id, resourcePath: '/api/v1/workflow', title: $t('message.noticeTitle'),