From 2baea6ccf7cc9591f41ec76d447b5a7a7fe8d144 Mon Sep 17 00:00:00 2001 From: GouJ Date: Sat, 26 Sep 2026 20:06:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=86=E8=A7=A3=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8C=81=E4=B9=85=E5=B1=95=E7=A4=BA=E5=90=8E=E5=8F=B0=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/breakdown/BreakdownPage.vue | 26 ++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/features/breakdown/BreakdownPage.vue b/src/features/breakdown/BreakdownPage.vue index 7cbbe4b..46eeb4c 100644 --- a/src/features/breakdown/BreakdownPage.vue +++ b/src/features/breakdown/BreakdownPage.vue @@ -15,6 +15,8 @@ import { breakdownSnapshot, recoveryOptions, workflowCheckpoints } from '../work import { getOperation, runOperation } from '../workflows/operations' import ConfirmAction from '../workflows/ConfirmAction.vue' import HistoryPanel from '../workflows/HistoryPanel.vue' +import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue' +import { useWorkflowExecution } from '../workflows/execution' import SubjectList from './components/SubjectList.vue' import StoryboardList from './components/StoryboardList.vue' import { errorMessage } from '../../lib/http' @@ -44,7 +46,9 @@ const plans = computed(() => result.value?.storyboardPlans ?? []) const shots = computed(() => result.value?.storyboardEpisodeShots ?? []) const summary = computed(() => snapshot.value?.taskSummary) const validation = computed(() => result.value?.storyboardShotValidation ?? snapshot.value?.storyboardShotValidation) -const operation = computed(() => getOperation(project.value!.id)) +const projectId = computed(() => project.value?.id ?? '') +const operation = computed(() => getOperation(projectId.value)) +const backgroundExecution = useWorkflowExecution(projectId, 'breakdown') const recovery = computed(() => recoveryOptions(checkpoints.value)) const execution = computed(() => snapshot.value?.workflowExecution) const taskStopped = computed(() => execution.value?.status === 'failed' || execution.value?.status === 'completed') @@ -62,6 +66,7 @@ const canStart = computed( !!preview.value && configValid.value && !operation.value.pending && + !backgroundExecution.active.value && !error.value && (!records.value.length || taskStopped.value) ) @@ -120,9 +125,13 @@ async function run(action: BreakdownAction) { 'resume-storyboard': '正在修复分镜绑定' } const id = project.value.id - await runOperation(id, labels[action], () => - breakdownApi.run(id, action, action === 'start' ? input.value : undefined) - ) + await runOperation(id, labels[action], async () => { + const result = await breakdownApi.run(id, action, action === 'start' ? input.value : undefined) + if (action === 'start' && 'executionId' in result) { + await backgroundExecution.track(result.executionId) + } + return result + }) await refresh() } @@ -282,6 +291,15 @@ const rules = { 后端尚无明确的完成或失败记录。为避免重复执行,已禁用整条重新拆解;如进程已中断,请先核实后台,再选择对应恢复操作。

+