From 10ea44d26f113a64fac7641a9d96e0ede483160f Mon Sep 17 00:00:00 2001 From: GouJ Date: Fri, 16 Oct 2026 11:03:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=86=E8=A7=A3=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=8C=89=E9=9C=80=E5=B1=95=E7=A4=BA=E6=89=8B?= =?UTF-8?q?=E9=83=A8=E5=86=B2=E7=AA=81=E4=BF=AE=E5=A4=8D=E5=80=99=E9=80=89?= =?UTF-8?q?=E5=92=8C=E8=B5=84=E4=BA=A7=E9=98=BB=E6=96=AD=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/breakdown/BreakdownPage.vue | 35 +++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/features/breakdown/BreakdownPage.vue b/src/features/breakdown/BreakdownPage.vue index 73e162f..8d0a638 100644 --- a/src/features/breakdown/BreakdownPage.vue +++ b/src/features/breakdown/BreakdownPage.vue @@ -13,7 +13,7 @@ import { Layers, LoaderCircle, ArrowRight, Settings2 } from '@lucide/vue' import { EmptyState, StatusBadge, WorkspaceTools } from '../../components/ui' import { useProjectContext } from '../projects/context' import { breakdownApi } from './api' -import type { BreakdownAction, BreakdownInput, BreakdownModule, BreakdownPreview, StoryboardHandOccupancyDiagnostics } from './types' +import type { BreakdownAction, BreakdownInput, BreakdownModule, BreakdownPreview, StoryboardHandOccupancyDiagnostics, StoryboardHandRepairPreview } from './types' import { breakdownSnapshot, recoveryOptions, workflowCheckpoints } from '../workflows/selectors' import { getOperation, isOperationRunning, runOperation } from '../workflows/operations' import ConfirmAction from '../workflows/ConfirmAction.vue' @@ -35,6 +35,22 @@ const toolsOpen = ref(false) /** 仅打开设置面板时按需查询,不增加页面常驻提示或后台轮询。 */ const handDiagnostics = ref(null) const handDiagnosticsBusy = ref(false) +const handRepairPreview = ref(null) +const handRepairBusy = ref(false) +/** 只在用户主动查看时加载修复候选,避免打开设置就请求额外接口。 */ +async function loadHandRepairPreview(id: string) { + const version = handDiagnosticsVersion + handRepairBusy.value = true + try { + const data = await breakdownApi.handRepairPreview(id) + if (version === handDiagnosticsVersion && toolsOpen.value && projectId.value === id) handRepairPreview.value = data + } catch (cause) { + if (version === handDiagnosticsVersion && toolsOpen.value && projectId.value === id) actionMessage?.error(errorMessage(cause)) + } finally { + if (version === handDiagnosticsVersion) handRepairBusy.value = false + } +} + let handDiagnosticsVersion = 0 async function loadHandDiagnostics(id: string) { const version = ++handDiagnosticsVersion @@ -70,6 +86,8 @@ watch([toolsOpen, projectId], () => { ++handDiagnosticsVersion handDiagnostics.value = null handDiagnosticsBusy.value = false + handRepairPreview.value = null + handRepairBusy.value = false }) const backgroundExecution = useWorkflowExecution(projectId, 'breakdown') @@ -422,6 +440,21 @@ const rules = { +
+
+

局部修复候选

+ + {{ handRepairPreview ? '刷新候选' : '查看候选' }} + +
+
+
+

第 {{ item.episodeNo }} 集 / Beat {{ item.beatNo }} / Shot {{ item.shotNo }} / 阶段 {{ item.phaseNo }}

+

{{ item.suggestion }}

+

{{ item.blockingReasons.join(';') }}

+
+
+