diff --git a/src/features/breakdown/BreakdownPage.vue b/src/features/breakdown/BreakdownPage.vue index a63d3bd..17984ba 100644 --- a/src/features/breakdown/BreakdownPage.vue +++ b/src/features/breakdown/BreakdownPage.vue @@ -23,7 +23,7 @@ import { errorMessage } from '../../lib/http' import { downloadText, nodeLabel } from '../../lib/format' /** 拆解工作区:先预览真实分组,再启动;恢复操作根据 checkpoint 分阶段展示。 */ -const { project, checkpoints, refresh, error } = useProjectContext() +const { project, checkpoints, refresh, refreshStageReadiness, stageReadiness, error } = useProjectContext() const groupSize = ref(3) const modules = ref(['character', 'scene', 'prop']) const preview = ref(null) @@ -56,7 +56,8 @@ const taskStopped = computed(() => execution.value?.status === 'failed' || execu watch( () => backgroundExecution.query.data.value?.status, (status, previous) => { - if ((status === 'completed' || status === 'failed') && status !== previous) void refresh() + if ((status === 'completed' || status === 'failed') && status !== previous) + void Promise.all([refresh(), refreshStageReadiness()]) } ) const showRecovery = computed( @@ -66,6 +67,7 @@ const configValid = computed( () => Number.isSafeInteger(groupSize.value) && groupSize.value > 0 && modules.value.length > 0 ) const input = computed(() => ({ groupSize: groupSize.value, modules: [...modules.value] })) +const stageComplete = computed(() => stageReadiness.value?.breakdown.ready === true) const canStart = computed( () => !!project.value?.episodes.length && @@ -157,7 +159,7 @@ const rules = {