feat: 接入分镜单集重生成接口

接入后端正式单集 Storyboard Shot 重生成能力,补齐校验回执、旧 Shot 缓存失效与页面刷新逻辑。
This commit is contained in:
GouJ authored and GitHub committed 2026-09-08 20:09:37 +08:00
1 parent b4e1e6873c
commit 6dc3a93348
8 files changed
+159 -10

No files matched your search

@@ -7,9 +7,11 @@ import type { StoryboardReceipt } from '../types'
/** 独立展示提交结果,不能将 HTTP 成功或局部成功显示为整批完成。 */
const props = defineProps<{ receipt: StoryboardReceipt }>()
const failed = computed(() =>
props.receipt.kind === 'batch' ? props.receipt.result.failedEpisodes > 0 : props.receipt.result.failed > 0
)
const failed = computed(() => {
if (props.receipt.kind === 'shots') return !props.receipt.result.storyboardShotValidation.valid
if (props.receipt.kind === 'batch') return props.receipt.result.failedEpisodes > 0
return props.receipt.result.failed > 0
})
/** 导出原始回执,保留后端提供的完整失败诊断。 */
function exportReceipt() {
@@ -26,7 +28,23 @@ function exportReceipt() {
<NAlert v-if="failed" role="alert" type="error" :show-icon="false" class="mt-3">
本次存在失败、校验未通过或未保存项。关闭“批量覆盖已有结果”后再补齐,可跳过已完整保存项。
</NAlert>
<template v-if="receipt.kind === 'batch'">
<template v-if="receipt.kind === 'shots'">
<p class="my-4 text-xs text-muted">
第 {{ receipt.result.episodeNo }} 集 · {{ receipt.result.storyboardShotSummary.beatCount }} 个 Beat ·
{{ receipt.result.storyboardShotSummary.shotCount }} 个镜头 ·
{{ receipt.result.storyboardShotSummary.totalDurationSeconds }} 秒 · 形态绑定覆盖率
{{ Math.round(receipt.result.storyboardShotSummary.bindingCoverage * 100) }}%
</p>
<NAlert v-if="receipt.result.storyboardShotValidation.valid" type="success" :show-icon="false" class="mt-3">
本集新镜头已保存。该集下游结果已随旧镜头清除,请依次重新生成导演设计、即时状态、首帧、提示词和视频。
</NAlert>
<ul v-else class="mt-3 space-y-2 text-xs text-danger">
<li v-for="(issue, index) in receipt.result.storyboardShotValidation.issues" :key="index">
Beat {{ issue.beatNo ?? '—' }} / Shot {{ issue.shotNo ?? '—' }}:{{ issue.message }}
</li>
</ul>
</template>
<template v-else-if="receipt.kind === 'batch'">
<p class="my-4 text-xs text-muted">
共 {{ receipt.result.episodeCount }} 集 · 完成 {{ receipt.result.completedEpisodes }} · 跳过
{{ receipt.result.skippedEpisodes }} · 失败 {{ receipt.result.failedEpisodes }}