diff --git a/src/features/breakdown/BreakdownPage.vue b/src/features/breakdown/BreakdownPage.vue index d76f455..9b4953c 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 } from './types' +import type { BreakdownAction, BreakdownInput, BreakdownModule, BreakdownPreview, StoryboardHandOccupancyDiagnostics } from './types' import { breakdownSnapshot, recoveryOptions, workflowCheckpoints } from '../workflows/selectors' import { getOperation, isOperationRunning, runOperation } from '../workflows/operations' import ConfirmAction from '../workflows/ConfirmAction.vue' @@ -32,6 +32,24 @@ const preview = ref(null) const previewBusy = ref(false) const tab = ref('character') const toolsOpen = ref(false) +/** 仅打开设置面板时按需查询,不增加页面常驻提示或后台轮询。 */ +const handDiagnostics = ref(null) +const handDiagnosticsBusy = ref(false) +let handDiagnosticsVersion = 0 +async function loadHandDiagnostics(id: string) { + const version = ++handDiagnosticsVersion + handDiagnosticsBusy.value = true + handDiagnostics.value = null + try { + const data = await breakdownApi.handOccupancyDiagnostics(id) + if (version === handDiagnosticsVersion) handDiagnostics.value = data + } catch (cause) { + if (version === handDiagnosticsVersion) actionMessage?.error(errorMessage(cause)) + } finally { + if (version === handDiagnosticsVersion) handDiagnosticsBusy.value = false + } +} + const moduleOptions: { value: BreakdownModule; label: string; description: string }[] = [ { value: 'character', label: '人物', description: '人物身份、外观与形态' }, { value: 'scene', label: '场景', description: '故事空间与环境特征' }, @@ -48,6 +66,13 @@ const summary = computed(() => snapshot.value?.taskSummary) const validation = computed(() => result.value?.storyboardShotValidation ?? snapshot.value?.storyboardShotValidation) const projectId = computed(() => project.value?.id ?? '') const operation = computed(() => getOperation(projectId.value)) +watch([toolsOpen, projectId], ([open, id]) => { + ++handDiagnosticsVersion + handDiagnostics.value = null + handDiagnosticsBusy.value = false + if (open && id) void loadHandDiagnostics(id) +}) + const backgroundExecution = useWorkflowExecution(projectId, 'breakdown') const recovery = computed(() => recoveryOptions(checkpoints.value)) const execution = computed(() => snapshot.value?.workflowExecution) @@ -379,6 +404,25 @@ const rules = { @refresh="backgroundExecution.query.refresh" @dismiss="backgroundExecution.dismiss" /> + +
+
+

手部动作质量

+ 刷新 +
+
+ 镜头 {{ handDiagnostics.shotCount }} + 有效证据 {{ handDiagnostics.evidenceShotCount }} / {{ handDiagnostics.shotCount }} + 冲突 {{ handDiagnostics.warningCount }} + 证据不足 + 部分镜头缺少证据 +
+
+
+ 第 {{ issue.episodeNo }} 集 / Beat {{ issue.beatNo }} / Shot {{ issue.shotNo }} / 阶段 {{ issue.phaseNo }}:{{ issue.suggestion }} +
+
+