From 03b0a4802888701cd0509357bc4b66ed3cbeee14 Mon Sep 17 00:00:00 2001 From: GouJ Date: Sat, 26 Sep 2026 20:11:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=A7=E6=9C=AC=E5=88=9B=E4=BD=9C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=E6=8C=81=E4=B9=85=E5=8C=96?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/projects/ProjectLayout.vue | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/features/projects/ProjectLayout.vue b/src/features/projects/ProjectLayout.vue index bd754bf..12943b4 100644 --- a/src/features/projects/ProjectLayout.vue +++ b/src/features/projects/ProjectLayout.vue @@ -6,6 +6,8 @@ import { EmptyState } from '../../components/ui' import { projectContextKey, useProjectData } from './context' import { getOperation } from '../workflows/operations' import { isProjectComplete, projectAccessKey, type ProjectAccess } from './access' +import { useWorkflowExecution } from '../workflows/execution' +import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue' /** 项目标题只保留名称;下游工作区在剧本完成前不挂载,直接链接也无法越过限制。 */ const route = useRoute() @@ -19,6 +21,13 @@ const isGallery = computed(() => { const context = useProjectData(id) provide(projectContextKey, context) const operation = computed(() => getOperation(id.value)) +const createDramaExecution = useWorkflowExecution(id, 'create-drama') +watchEffect(() => { + const status = createDramaExecution.query.data.value?.status + if ((status === 'completed' || status === 'failed') && context.project.value?.status === 'generating') { + void context.refresh() + } +}) const complete = computed(() => isProjectComplete(context.project.value, id.value)) const isCreation = computed(() => route.path.replace(/\/+$/, '').endsWith('/create-drama')) type OperationGuide = { @@ -134,6 +143,16 @@ onScopeDispose(() => { {{ operation.notice }} +