perf(short-drama-agent-front): 优化记录加载与工作区体验
This commit is contained in:
1 parent
d0264c08ce
commit
db9aea1694
111 files changed
+1680
-1290
No files matched your search
@@ -46,6 +46,7 @@ const {
|
||||
videoStatusItem,
|
||||
query,
|
||||
episodeSourceUnavailable,
|
||||
breakdownRecords,
|
||||
operation,
|
||||
session,
|
||||
concurrency,
|
||||
@@ -308,9 +309,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<div>
|
||||
<p class="eyebrow">镜头制作</p>
|
||||
<h2 class="text-lg font-semibold">镜头生产</h2>
|
||||
<p class="mt-2 text-sm text-muted">
|
||||
从可生成的提示词和首帧,到异步视频任务与最终成片。
|
||||
</p>
|
||||
<p class="mt-2 text-sm text-muted">制作首帧、视频和成片。</p>
|
||||
</div>
|
||||
</div>
|
||||
<section class="production-batch-config workspace-panel" aria-label="项目生产配置">
|
||||
@@ -351,7 +350,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<section class="production-tool-section workspace-panel">
|
||||
<h3 class="text-sm font-semibold">处理范围与覆盖规则</h3>
|
||||
<p class="mt-3 text-xs leading-6 text-muted">
|
||||
提示词与视频就绪检查面向全项目;视频实际提交受本批镜头上限控制,并使用严格质量流水线。首帧默认补当前剧集,存在过期主首帧时优先更新全项目过期项,覆盖模式处理全项目;过期首帧成功后会自动接替旧主图,其余新增候选。图片模型、视频模型与视觉校验均可能产生费用。
|
||||
提示词和视频准备情况按全项目检查,视频按本批上限提交。首帧默认补当前集,有过期主首帧时先更新全项目过期项。覆盖模式处理全项目。更新成功会替换过期主首帧,其余只新增候选。生成和质量检查可能收费。
|
||||
</p>
|
||||
</section>
|
||||
<section class="workspace-overview-panel production-tool-section workspace-panel">
|
||||
@@ -595,7 +594,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
:show-icon="false"
|
||||
class="text-xs"
|
||||
>
|
||||
输入规划暂不可用,仍可按“全部推荐模式”提交;刷新后可重试规划。
|
||||
暂未读取生成方案。可刷新,或使用推荐模式。
|
||||
</ContextNotice>
|
||||
<NFormItem path="videoInputMode" label="输入规划范围">
|
||||
<NSelect
|
||||
@@ -643,9 +642,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold">视频任务状态</h3>
|
||||
<p class="mt-2 text-xs text-muted">
|
||||
状态统计取每个镜头最近一次任务,不等同于主视频数量。
|
||||
</p>
|
||||
<p class="mt-2 text-xs text-muted">按每个镜头最近一次任务统计。</p>
|
||||
</div>
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, '重试失败视频任务')"
|
||||
@@ -654,7 +651,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
blocked || !batchValid || !query.data.value.videoStatus.failed
|
||||
"
|
||||
acknowledgement
|
||||
description="只重新提交可以重试的失败视频;其他项目会跳过,并在结果中显示数量。"
|
||||
description="重试可恢复的失败视频,其余跳过。"
|
||||
@confirm="run('retry-videos')"
|
||||
/>
|
||||
</div>
|
||||
@@ -710,8 +707,19 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
@dismiss="keyframeQualityExecution.dismiss"
|
||||
/>
|
||||
<!-- 以下是重生成后正文缺省的真实数据说明模块 -->
|
||||
<ContextNotice v-if="breakdownRecords.error.value" type="error" role="alert">
|
||||
{{ breakdownRecords.error.value }}
|
||||
<NButton text size="small" @click="breakdownRecords.refresh">重试读取</NButton>
|
||||
</ContextNotice>
|
||||
<p
|
||||
v-if="!breakdownRecords.data.value && breakdownRecords.loading.value"
|
||||
class="text-xs text-muted"
|
||||
role="status"
|
||||
>
|
||||
正在读取分镜记录…
|
||||
</p>
|
||||
<ContextNotice v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||
本集镜头已更新。标题和剧情详情待补齐。
|
||||
</ContextNotice>
|
||||
<NScrollbar v-if="query.error.value" class="workspace-feedback"
|
||||
><ContextNotice role="alert" type="error" :show-icon="false"
|
||||
@@ -880,11 +888,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
/>
|
||||
</article>
|
||||
</div>
|
||||
<EmptyState
|
||||
v-else-if="query.data.value"
|
||||
title="本集还没有正式镜头"
|
||||
description="先完成剧本拆解和分镜设计,再进入镜头生产。"
|
||||
/>
|
||||
<EmptyState v-else-if="query.data.value" title="本集还没有正式镜头" description="请先完成拆解和分镜设计。" />
|
||||
<p v-else-if="query.loading.value" class="panel mt-5 p-8 text-sm text-muted" role="status">
|
||||
正在检查全项目生产就绪状态……
|
||||
</p>
|
||||
|
||||
@@ -81,10 +81,10 @@ const confirmationDescription = computed(
|
||||
<NCollapse v-model:expanded-names="expanded" class="production-tool-section"
|
||||
><NCollapseItem name="advanced" title="高级:串联生产(全项目)">
|
||||
<ContextNotice type="warning" :show-icon="false"
|
||||
>依次补齐形态提示词、参考图、首帧质量校验与修复、视频提示词,再提交视频任务。视觉风格、身份母版、导演设计和即时状态仍需提前准备。</ContextNotice
|
||||
>先准备风格、身份母版和镜头设计,再补齐参考图、首帧和视频描述。</ContextNotice
|
||||
>
|
||||
<p class="mt-3 text-xs leading-6 text-muted">
|
||||
处理整个项目,并保留已有可用结果。试运行可以整理文字、检查图片、生成主体图片和少量首帧,并准备视频描述;会在真正生成视频前停止。试运行中的文字和图片处理仍可能产生费用。
|
||||
试运行保留可用结果,准备文字、主体图片和少量首帧,生成视频前停止。文字和图片处理可能收费。
|
||||
</p>
|
||||
<!-- 以下是生产范围配置模块,修改任一参数后须重新预检。 -->
|
||||
<div class="surface-inset mt-4 p-4">
|
||||
@@ -130,7 +130,7 @@ const confirmationDescription = computed(
|
||||
scopeError
|
||||
}}</ContextNotice>
|
||||
<ContextNotice v-if="!safeMode && !stopAfter" type="warning" :show-icon="false" class="mt-3">
|
||||
已关闭测试安全模式。启动后会进入视频任务提交阶段并产生较高视频生成费用。
|
||||
安全模式已关闭。启动后会提交视频生成并收费。
|
||||
</ContextNotice>
|
||||
</div>
|
||||
<!-- 以下是无消耗预检与费用确认模块。 -->
|
||||
@@ -216,9 +216,7 @@ const confirmationDescription = computed(
|
||||
{{ receipt.stableIdentityAnchorResult.generated }} · 失败
|
||||
{{ receipt.stableIdentityAnchorResult.failed }}
|
||||
</p>
|
||||
<p class="mt-3 text-xs text-muted">
|
||||
流程返回不等于成片完成。已保存结果不会回滚,最终结果以各资产页为准。
|
||||
</p>
|
||||
<p class="mt-3 text-xs text-muted">已保存的成果会保留。成片进度请到素材页查看。</p>
|
||||
<p v-for="row in rows" :key="row.name" class="mt-2 text-xs">
|
||||
{{ row.name }}:<template v-if="row.result"
|
||||
>共 {{ row.result.total }} · 生成 {{ row.result.generated }} · 跳过 {{ row.result.skipped }} ·
|
||||
|
||||
@@ -66,9 +66,7 @@ onScopeDispose(() => controller?.abort())
|
||||
<NCollapseItem name="episode-assembly" title="单集成片拼接">
|
||||
<NSpin :show="loading">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<p class="text-xs text-muted">
|
||||
按剧情段落和镜头顺序拼接当前选用的视频。目前只生成无声视频,不包含对白、配乐、字幕和转场。
|
||||
</p>
|
||||
<p class="text-xs text-muted">按镜头顺序拼接所选视频。成片无声,无字幕和转场。</p>
|
||||
<NButton size="small" :disabled="loading" @click="refresh">刷新就绪状态</NButton>
|
||||
</div>
|
||||
<FeedbackMessage v-if="error" :message="error" />
|
||||
|
||||
@@ -43,10 +43,7 @@ const qualityIssues = computed(() =>
|
||||
<template>
|
||||
<!-- 以下是道具结构规格准备模块,可准备不等于已经完成 -->
|
||||
<section v-if="specs" class="space-y-4" aria-label="道具结构规格">
|
||||
<WorkspaceSectionHeading
|
||||
title="道具结构规格"
|
||||
description="仅检查已有资料。待准备项需先补齐画面描述或规格,尚未执行。"
|
||||
/>
|
||||
<WorkspaceSectionHeading title="道具结构规格" description="先补齐缺少的画面描述或规格。" />
|
||||
<div class="flex flex-wrap gap-x-5 gap-y-2 text-xs">
|
||||
<span>共 {{ specs.total }} 项</span><span>已就绪 {{ specs.ready }}</span
|
||||
><span>待准备 {{ specs.upstreamResolvable }}</span
|
||||
@@ -85,10 +82,7 @@ const qualityIssues = computed(() =>
|
||||
</section>
|
||||
<!-- 以下是已确认母版依赖及准备顺序模块 -->
|
||||
<section v-if="anchors.length" class="space-y-4" aria-label="母版准备顺序">
|
||||
<WorkspaceSectionHeading
|
||||
title="母版准备顺序"
|
||||
description="按已确认的共享关系排列;锁定资产和人工阻断需要先核对。"
|
||||
/>
|
||||
<WorkspaceSectionHeading title="母版准备顺序" description="按已确认的共享关系排列。" />
|
||||
<ol class="space-y-4 text-xs leading-6">
|
||||
<li v-for="(item, index) in anchors" :key="item.subjectId" class="min-w-0">
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
@@ -115,10 +109,7 @@ const qualityIssues = computed(() =>
|
||||
</section>
|
||||
<!-- 以下是图片质量问题处理入口模块,保留旧图且不自动生成 -->
|
||||
<section v-if="qualityIssues.length" class="space-y-4 lg:col-span-2" aria-label="图片质量待处理">
|
||||
<WorkspaceSectionHeading
|
||||
title="图片质量待处理"
|
||||
description="审核失败或证据过期时,先核对候选并明确重新审核。"
|
||||
/>
|
||||
<WorkspaceSectionHeading title="图片质量待处理" description="请核对候选后重新审核。" />
|
||||
<article v-for="item in qualityIssues" :key="item.subjectFormId" class="space-y-2 text-xs leading-6">
|
||||
<strong>{{ item.subjectName }} · {{ item.formName }}</strong>
|
||||
<p
|
||||
|
||||
@@ -128,7 +128,7 @@ watch(
|
||||
<AppDialog
|
||||
v-model:open="open"
|
||||
:title="`${replacePrimary ? '生成替代候选' : '生成首帧候选'} · ${shotTitle}`"
|
||||
description="新图先作为候选;完成质量检查并通过后,才能设为主首帧。"
|
||||
description="新图通过检查后可设为主首帧。"
|
||||
:busy="submitting"
|
||||
>
|
||||
<AppForm
|
||||
@@ -140,14 +140,11 @@ watch(
|
||||
@submit="submit"
|
||||
>
|
||||
<ContextNotice v-if="replacePrimary" type="info" :show-icon="false" class="mt-5 text-xs">
|
||||
当前主首帧使用的主体参考资产已经变化。新图成功后应设为主首帧,旧图会继续保留为历史候选。
|
||||
参考图已变化。新候选通过后可设为主首帧,旧图会保留。
|
||||
</ContextNotice>
|
||||
<section v-if="generationCatalog" class="dialog-section mt-5" aria-label="本次首帧生成模型设置">
|
||||
<p class="text-xs font-medium">
|
||||
<FieldLabel
|
||||
label="本次生成设置"
|
||||
description="仅覆盖当前镜头本次首帧生成,不修改项目默认图片模型。"
|
||||
/>
|
||||
<FieldLabel label="本次生成设置" description="仅用于本次首帧生成。" />
|
||||
</p>
|
||||
<GenerationModelControls
|
||||
class="mt-4"
|
||||
|
||||
@@ -50,7 +50,7 @@ const display = computed<ImagePreview | null>(() => {
|
||||
|
||||
<template>
|
||||
<!-- 以下是当前候选生成输入的按需详情 -->
|
||||
<NCollapse v-model:expanded-names="expanded" class="mb-4">
|
||||
<NCollapse v-model:expanded-names="expanded">
|
||||
<NCollapseItem name="generation" title="当次参考图和画面描述">
|
||||
<p v-if="query.loading.value" role="status" class="text-xs text-muted">正在读取生成记录…</p>
|
||||
<NButton
|
||||
@@ -62,12 +62,6 @@ const display = computed<ImagePreview | null>(() => {
|
||||
>刷新生成记录</NButton
|
||||
>
|
||||
<template v-if="display && snapshot">
|
||||
<p class="text-xs text-muted">
|
||||
快照版本 {{ snapshot.version
|
||||
}}<template v-if="snapshot.width && snapshot.height">
|
||||
· {{ snapshot.width }} × {{ snapshot.height }}</template
|
||||
>
|
||||
</p>
|
||||
<ImageGenerationPreview
|
||||
:preview="display"
|
||||
:historical-references="snapshot.references"
|
||||
@@ -80,8 +74,8 @@ const display = computed<ImagePreview | null>(() => {
|
||||
<p v-else-if="query.data.value" class="text-xs text-muted">
|
||||
{{
|
||||
query.data.value.inputSnapshotStatus === 'not-recorded'
|
||||
? '这张首帧没有保存当次生成输入。'
|
||||
: '这张首帧的生成证据已损坏,无法读取。'
|
||||
? '暂无这张首帧的生成记录。'
|
||||
: '这张首帧的生成记录无法读取。'
|
||||
}}
|
||||
</p>
|
||||
</NCollapseItem>
|
||||
|
||||
@@ -78,6 +78,14 @@ const reviewQuery = useQuery(key, (value, signal) => {
|
||||
return qualityApi.keyframeQualityReview(shotId, keyframeId, signal)
|
||||
})
|
||||
const review = computed(() => reviewQuery.data.value)
|
||||
/** 视线复核的系统选项只在展示层转成中文。 */
|
||||
const gazeEvidenceLabels: Record<string, string> = {
|
||||
aligned: '符合预期',
|
||||
misaligned: '偏离目标',
|
||||
clear: '清楚',
|
||||
ambiguous: '不明确',
|
||||
unverifiable: '无法核实'
|
||||
}
|
||||
const decisionLabel = (value: string) =>
|
||||
({
|
||||
passed: 'AI 校验通过',
|
||||
@@ -85,7 +93,7 @@ const decisionLabel = (value: string) =>
|
||||
needs_review: '需要人工复核',
|
||||
manual_accepted: '人工已接受',
|
||||
unknown: '未校验'
|
||||
})[value] ?? value
|
||||
})[value] ?? '待确认'
|
||||
const reviewAction = ref<'accepted' | 'rejected' | null>(null)
|
||||
const reviewReason = ref('')
|
||||
const reviewer = ref('user')
|
||||
@@ -155,7 +163,6 @@ const records = computed(() =>
|
||||
:collapsible="!initialOpen"
|
||||
:show-header="!initialOpen"
|
||||
title="首帧校验历史"
|
||||
description="查看记录不收费;设置主首帧前仍需完成本次检查。"
|
||||
:loading="query.loading.value"
|
||||
:error="query.error.value"
|
||||
@refresh="
|
||||
@@ -167,20 +174,18 @@ const records = computed(() =>
|
||||
>
|
||||
<section v-if="review" class="panel p-3 text-xs leading-6">
|
||||
<p class="font-semibold">当前质量复核</p>
|
||||
<p>原始模型判定:{{ decisionLabel(review.qualityDecision) }}</p>
|
||||
<p>当前有效状态:{{ decisionLabel(review.effectiveQualityStatus) }}</p>
|
||||
<p>AI 检查:{{ decisionLabel(review.qualityDecision) }}</p>
|
||||
<p>当前状态:{{ decisionLabel(review.effectiveQualityStatus) }}</p>
|
||||
<p v-if="review.manualReview">
|
||||
人工审核:{{ review.manualReview.decision === 'accepted' ? '已接受' : '已拒绝' }} ·
|
||||
{{ review.manualReview.reason || '未填写理由' }}
|
||||
</p>
|
||||
<p v-else-if="review.manualReviewAvailable" class="text-muted">
|
||||
已发现可人工复核的证据分歧;当前仅展示信息,不会自动接受候选。
|
||||
</p>
|
||||
<p v-else-if="review.manualReviewAvailable" class="text-muted">有待人工核对的问题。</p>
|
||||
<div v-for="(item, index) in review.historicalGazePreview" :key="index" class="mt-2 bg-muted/10 p-2">
|
||||
<p>{{ item.subjectRef }} → {{ item.targetDescription }}:{{ decisionLabel(item.decision) }}</p>
|
||||
<p>
|
||||
结构判断:{{ item.physicalAlignment || '未知' }};独立观察:{{
|
||||
item.observationCertainty || '未知'
|
||||
结构判断:{{ gazeEvidenceLabels[item.physicalAlignment || ''] ?? '待确认' }};独立观察:{{
|
||||
gazeEvidenceLabels[item.observationCertainty || ''] ?? '待确认'
|
||||
}}
|
||||
</p>
|
||||
<p class="text-muted">{{ item.reason }}</p>
|
||||
@@ -242,12 +247,12 @@ const records = computed(() =>
|
||||
role="status"
|
||||
class="text-sm text-muted"
|
||||
>
|
||||
{{ userFacingText(state.unknown?.recoveryReason, '审核结果或费用待核查,请勿重复提交。') }}
|
||||
{{ userFacingText(state.unknown?.recoveryReason, '结果或费用待核对,请勿重试。') }}
|
||||
</p>
|
||||
<p v-else-if="state.active" role="status" class="text-sm text-muted">
|
||||
审核{{ execution.data.value?.status === 'pending' ? '等待开始' : '在后台进行' }},关闭页面后仍会保存记录。
|
||||
审核{{ execution.data.value?.status === 'pending' ? '等待开始' : '在后台进行' }}。
|
||||
</p>
|
||||
<p v-else-if="state.resumable" class="text-sm text-muted">可在质量检查中使用原参数继续;已保存的步骤会复用。</p>
|
||||
<p v-else-if="state.resumable" class="text-sm text-muted">可继续原审核。</p>
|
||||
<p v-if="!records.length" class="text-muted">暂无校验记录。</p>
|
||||
<!-- 以下是实际校验结论、问题与调用错误模块 -->
|
||||
<article v-for="record in records" :key="record.id" class="panel mt-3 p-3">
|
||||
@@ -259,7 +264,7 @@ const records = computed(() =>
|
||||
? record.validation.passed
|
||||
? '视觉通过'
|
||||
: '视觉未通过'
|
||||
: '未取得完整视觉结论'
|
||||
: '暂无结论'
|
||||
}}
|
||||
</p>
|
||||
<p v-if="record.allowedTexts !== undefined" class="text-muted">
|
||||
@@ -287,15 +292,19 @@ const records = computed(() =>
|
||||
:name="step.name"
|
||||
:title="`${stepNames[step.name]} · ${stepLabels[step.status]}`"
|
||||
>
|
||||
<dl class="grid gap-1 wrap-anywhere text-xs text-muted">
|
||||
<div v-if="step.startedAt">开始:{{ formatDate(step.startedAt) }}</div>
|
||||
<div v-if="step.finishedAt">完成:{{ formatDate(step.finishedAt) }}</div>
|
||||
<div v-if="step.requestId">请求编号:{{ step.requestId }}</div>
|
||||
<div v-if="step.providerRequestId">模型服务请求编号:{{ step.providerRequestId }}</div>
|
||||
<div v-for="(count, unit) in step.usage" :key="unit">
|
||||
{{ usageLabels[unit] }}词元:{{ count }}
|
||||
</div>
|
||||
</dl>
|
||||
<NCollapse>
|
||||
<NCollapseItem name="diagnostics" title="高级详情">
|
||||
<dl class="grid gap-1 wrap-anywhere text-xs text-muted">
|
||||
<div v-if="step.startedAt">开始:{{ formatDate(step.startedAt) }}</div>
|
||||
<div v-if="step.finishedAt">完成:{{ formatDate(step.finishedAt) }}</div>
|
||||
<div v-if="step.requestId">请求编号:{{ step.requestId }}</div>
|
||||
<div v-if="step.providerRequestId">模型服务请求编号:{{ step.providerRequestId }}</div>
|
||||
<div v-for="(count, unit) in step.usage" :key="unit">
|
||||
{{ usageLabels[unit] }}词元:{{ count }}
|
||||
</div>
|
||||
</dl>
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
<ul v-if="step.issues?.length" class="mt-2 space-y-1 text-xs">
|
||||
<li v-for="(issue, index) in step.issues" :key="index" class="text-danger">
|
||||
{{ issue.subjectRef ? issue.subjectRef + ' · ' : ''
|
||||
@@ -303,7 +312,7 @@ const records = computed(() =>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-else class="mt-2 text-xs text-muted">
|
||||
{{ step.issues ? '本步骤未发现结构化问题。' : '尚无此步骤的结构化问题记录。' }}
|
||||
{{ step.issues ? '未发现问题。' : '暂无问题记录。' }}
|
||||
</p>
|
||||
<p v-if="step.error" class="mt-2 text-danger">{{ userFacingText(step.error) }}</p>
|
||||
</NCollapseItem>
|
||||
|
||||
@@ -96,9 +96,7 @@ const problems = computed(() => [
|
||||
</tbody>
|
||||
</table>
|
||||
</NScrollbar>
|
||||
<p class="mt-2 text-xs text-muted">
|
||||
计划只反映当前准备情况。图片生成完成后仍需通过质量和来源检查;失败候选会保留,不能用重新生图自动消除质量阻断。
|
||||
</p>
|
||||
<p class="mt-2 text-xs text-muted">图片通过质量和来源检查后才可使用。失败候选会保留,请先处理失败原因。</p>
|
||||
<ContextNotice v-if="plan.hasManualBlockers" type="warning" :show-icon="false" class="mt-3">
|
||||
当前有
|
||||
{{ plan.manualBlocked }}
|
||||
|
||||
@@ -54,10 +54,10 @@ function exportReceipt() {
|
||||
:show-icon="false"
|
||||
class="mt-3"
|
||||
>
|
||||
严格质量候选已经创建,但尚未代表成片完成。后台会继续查询视频模型、执行视觉校验,并在失败时有限修复;只有校验通过的候选才会晋升主视频。
|
||||
视频候选已创建。系统会继续检查并按需修复,通过后设为主视频。
|
||||
</ContextNotice>
|
||||
<ContextNotice v-if="receipt.result.failed" role="alert" type="error" :show-icon="false" class="mt-3">
|
||||
本次存在部分失败,成功提交或生成的结果不会回滚。请查看逐镜错误后再重试。
|
||||
部分失败。成功结果已保留,请先查看失败原因。
|
||||
</ContextNotice>
|
||||
<ul v-if="receipt.result.failures.length" class="mt-3 space-y-2 text-xs text-danger">
|
||||
<li v-for="failure in receipt.result.failures" :key="failure.shotId">
|
||||
|
||||
@@ -285,12 +285,7 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
|
||||
<template>
|
||||
<!-- 以下是质量操作与显式费用确认模块 -->
|
||||
<AppDialog
|
||||
v-model:open="open"
|
||||
:title="`质量检查 · ${target?.title ?? ''}`"
|
||||
description="查看质量结果,或按需发起新的视觉检查。"
|
||||
wide
|
||||
>
|
||||
<AppDialog v-model:open="open" :title="`质量检查 · ${target?.title ?? ''}`" wide>
|
||||
<ContextNotice
|
||||
v-if="target?.kind === 'video' && (videoQuery.error.value || videoQuery.data.value?.staleReason)"
|
||||
type="warning"
|
||||
@@ -322,7 +317,7 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
}}</NRadioButton>
|
||||
</NRadioGroup>
|
||||
<ContextNotice v-if="target?.kind === 'video'" type="info" :show-icon="false" class="mt-4"
|
||||
>视频校验会按镜头启用抽样帧、运动及道具专项检查,不含音频和口型。普通候选只校验;修复候选复检通过后会自动设为主视频。</ContextNotice
|
||||
>仅检查画面、动作和道具。修复候选复检通过后自动设为主视频。</ContextNotice
|
||||
>
|
||||
<div v-if="generating" class="quality-fields mt-4">
|
||||
<NFormItem path="attempts" :label="videoRepair ? '修复链次数上限' : '每镜最多修复'"
|
||||
@@ -349,9 +344,7 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
仅第 {{ target.episodeNo }} 集{{ singleShot ? `,指定镜头 ${target.shotId}` : '' }},最多
|
||||
{{ singleShot ? 1 : (limit ?? '—') }} 镜;非重做模式处理符合条件的过期和缺失首帧。
|
||||
</p>
|
||||
<p v-if="videoRepair" class="mt-3 text-xs text-muted">
|
||||
本次仅创建一个修复视频,不自动等待或复检。完成后请打开新候选的质量检查;修复约束沿用上次失败校验,不使用额外参数。
|
||||
</p>
|
||||
<p v-if="videoRepair" class="mt-3 text-xs text-muted">按上次检查的问题修复一个视频。生成后请手动复检。</p>
|
||||
<ContextNotice v-if="!repairAvailable" type="warning" :show-icon="false" class="mt-3"
|
||||
>当前候选暂时不能执行这项检查,请查看原因或刷新任务状态。</ContextNotice
|
||||
>
|
||||
@@ -426,10 +419,7 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
<ContextNotice type="warning" :show-icon="false" class="mt-4">
|
||||
<template v-if="videoRepair"
|
||||
>本次最多提交 1
|
||||
个视频生成任务,可能产生费用;生成完成不会切换主视频,需再次付费复检通过后才会晋升。</template
|
||||
>
|
||||
<template v-if="videoRepair">最多生成 1 个候选,可能收费。付费复检通过后才会设为主视频。</template>
|
||||
<template v-else-if="target?.kind === 'video'"
|
||||
>本次会检查视频画面,可能使用多个识图模型并产生费用。</template
|
||||
>
|
||||
@@ -482,9 +472,7 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
<p class="mt-3 text-xs text-muted">此为历史抽样结论,不保证当前上游素材仍然一致。</p></NCollapseItem
|
||||
></NCollapse
|
||||
>
|
||||
<p v-if="target?.kind !== 'batch'" class="mt-3 text-xs text-muted">
|
||||
本会话回执可导出;首帧已有校验可在历史中只读查看,后台质量任务刷新后继续恢复。
|
||||
</p>
|
||||
<p v-if="target?.kind !== 'batch'" class="mt-3 text-xs text-muted">可导出结果或查看首帧检查历史。</p>
|
||||
<!-- 以下是底栏左侧费用确认与右侧操作按钮模块 -->
|
||||
<template #footer>
|
||||
<div class="quality-dialog-footer">
|
||||
|
||||
@@ -772,7 +772,7 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
:show-icon="false"
|
||||
class="mt-3 text-xs"
|
||||
>
|
||||
当前主首帧在本次质量检查中未通过,已阻止继续生成视频。请从候选中选择质量通过的图片。
|
||||
主首帧未通过检查,请更换合格候选后生成视频。
|
||||
</ContextNotice>
|
||||
<ContextNotice
|
||||
v-if="query.data.value?.qualityStatusError"
|
||||
@@ -780,7 +780,7 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
:show-icon="false"
|
||||
class="mt-3 text-xs"
|
||||
>
|
||||
视频质量链状态暂时无法读取;视频资产仍可查看。请稍后刷新。
|
||||
暂时无法读取检查结果,请刷新。
|
||||
</ContextNotice>
|
||||
<div class="production-stage-actions">
|
||||
<NButton
|
||||
@@ -967,9 +967,7 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
]"
|
||||
@update:value="videoInputModeOverride = $event"
|
||||
/>
|
||||
<p class="mt-1.5 text-[11px] leading-5 text-muted">
|
||||
自动选择合适的生成方式;手动选择只影响本次生成。
|
||||
</p>
|
||||
<p class="mt-1.5 text-[11px] leading-5 text-muted">可手动调整本次生成方式。</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1073,7 +1071,7 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
<AppDialog
|
||||
v-model:open="candidatesOpen"
|
||||
title="首帧候选管理"
|
||||
description="读取已保存质量结论;通过质量检查或完成有效人工复核的候选可以设为主首帧。"
|
||||
description="通过检查或人工复核后可设为主首帧。"
|
||||
:width="keyframeCandidatesWidth"
|
||||
>
|
||||
<!-- 候选图片和对应的人工复核入口按相同候选 ID 分组。 -->
|
||||
@@ -1137,12 +1135,7 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
<p v-else class="text-xs text-muted">暂无其它视频候选。</p>
|
||||
</AppDialog>
|
||||
<!-- 以下是指定视频质量记录弹窗模块,打开后直接展示结果与修改建议 -->
|
||||
<AppDialog
|
||||
v-model:open="videoHistoryOpen"
|
||||
title="视频质量记录"
|
||||
description="查看此视频已有的画面检查结果与本镜头的相关记录,不收费。"
|
||||
wide
|
||||
>
|
||||
<AppDialog v-model:open="videoHistoryOpen" title="视频质量记录" description="免费查看视频检查记录。" wide>
|
||||
<VideoQualityDiagnostics
|
||||
v-if="videoHistoryOpen && videoHistoryId"
|
||||
:key="`${shot.shotId}:${videoHistoryId}`"
|
||||
@@ -1152,30 +1145,19 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
:stale-reason="videoHistoryId === currentVideo?.id ? videoStaleReason : videoHistoryAsset?.staleReason"
|
||||
/>
|
||||
</AppDialog>
|
||||
<AppDialog
|
||||
v-model:open="historyOpen"
|
||||
title="首帧记录"
|
||||
description="核对当前候选的生成输入、视觉审核与人工复核。"
|
||||
wide
|
||||
>
|
||||
<!-- 以下是按需读取的候选生成证据 -->
|
||||
<KeyframeInputDetails
|
||||
v-if="historyOpen && historyKeyframeId"
|
||||
:key="historyKeyframeId"
|
||||
:project-id="projectId"
|
||||
:shot-id="shot.shotId"
|
||||
:keyframe-id="historyKeyframeId"
|
||||
/>
|
||||
<KeyframeValidationHistory
|
||||
v-if="historyOpen && historyKeyframeId"
|
||||
:key="historyKeyframeId"
|
||||
:project-id="projectId"
|
||||
:shot-id="shot.shotId"
|
||||
:keyframe-id="historyKeyframeId"
|
||||
:disabled="historyBlocked"
|
||||
initial-open
|
||||
@reviewed="refreshAfterReview"
|
||||
/>
|
||||
<AppDialog v-model:open="historyOpen" title="首帧记录" wide>
|
||||
<div v-if="historyOpen && historyKeyframeId" :key="historyKeyframeId" class="workspace-section-stack">
|
||||
<!-- 以下是按需读取的候选生成证据 -->
|
||||
<KeyframeInputDetails :project-id="projectId" :shot-id="shot.shotId" :keyframe-id="historyKeyframeId" />
|
||||
<KeyframeValidationHistory
|
||||
:project-id="projectId"
|
||||
:shot-id="shot.shotId"
|
||||
:keyframe-id="historyKeyframeId"
|
||||
:disabled="historyBlocked"
|
||||
initial-open
|
||||
@reviewed="refreshAfterReview"
|
||||
/>
|
||||
</div>
|
||||
</AppDialog>
|
||||
<KeyframeDialog
|
||||
v-model:open="keyframeOpen"
|
||||
|
||||
@@ -62,7 +62,7 @@ const orderedChain = computed(() => {
|
||||
const analysis = computed(() => query.data.value?.analysis)
|
||||
|
||||
/**
|
||||
* 将后端回退层级转成业务标签,未知值保持原文。
|
||||
* 将建议检查的范围转成中文标签。
|
||||
* @param target 后端建议回退层级
|
||||
* @returns 中文标签
|
||||
*/
|
||||
@@ -75,7 +75,30 @@ function rollbackLabel(target: VideoQualityRollbackTarget) {
|
||||
video_prompt: '视频提示词',
|
||||
provider: '视频模型'
|
||||
}
|
||||
return labels[target] ?? target
|
||||
return labels[target] ?? '待核对环节'
|
||||
}
|
||||
/** 视频画面与运动检查的问题类别。 */
|
||||
const issueTypeLabels: Record<string, string> = {
|
||||
identity_drift: '主体外观变化',
|
||||
identity_mismatch: '主体外观不符',
|
||||
form_drift: '形态变化',
|
||||
form_mismatch: '形态不符',
|
||||
subject_count_mismatch: '主体数量不符',
|
||||
scene_drift: '场景变化',
|
||||
visual_artifact: '画面瑕疵',
|
||||
unauthorized_text: '出现未指定文字',
|
||||
unnatural_start_stop: '动作起停不自然',
|
||||
motion_discontinuity: '动作衔接不连贯',
|
||||
weight_inertia_mismatch: '重量或惯性不符',
|
||||
contact_inconsistency: '接触不自然',
|
||||
subject_motion_integrity: '主体动作异常',
|
||||
camera_motion_discontinuity: '镜头移动不连贯',
|
||||
motion_plan_mismatch: '动作与设计不符',
|
||||
spatial_interaction_mismatch: '空间互动不符',
|
||||
physical_structure_mismatch: '结构不符',
|
||||
physical_joint_mismatch: '连接关系不符',
|
||||
state_mismatch: '画面状态不符',
|
||||
temporal_inconsistency: '前后画面不一致'
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -157,16 +180,22 @@ function rollbackLabel(target: VideoQualityRollbackTarget) {
|
||||
:show-icon="false"
|
||||
>
|
||||
<p class="font-semibold">镜头最近一次质量流程的修改建议</p>
|
||||
{{ analysis.summary }}
|
||||
{{
|
||||
analysis.persistentIssues?.length
|
||||
? `有 ${analysis.persistentIssues.length} 类问题反复出现。`
|
||||
: '暂无重复问题。'
|
||||
}}
|
||||
<p v-if="analysis.recommendedRollback.length" class="mt-1">
|
||||
建议检查:{{ analysis.recommendedRollback.map(rollbackLabel).join('、') }}
|
||||
</p>
|
||||
</ContextNotice>
|
||||
<article v-for="issue in analysis?.persistentIssues ?? []" :key="issue.type" class="mt-3">
|
||||
<strong>{{ issue.type }} · 出现 {{ issue.occurrences }} 次</strong>
|
||||
<p>{{ issue.suspectedCause }}</p>
|
||||
<strong>{{ issueTypeLabels[issue.type] ?? '其他画面问题' }} · 出现 {{ issue.occurrences }} 次</strong>
|
||||
<p>{{ userFacingText(issue.suspectedCause) }}</p>
|
||||
<ul class="text-muted">
|
||||
<li v-for="description in issue.descriptions" :key="description">{{ description }}</li>
|
||||
<li v-for="description in issue.descriptions" :key="description">
|
||||
{{ userFacingText(description) }}
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
@@ -84,7 +84,7 @@ export function issueLabel(code: ProductionIssueCode): string {
|
||||
/**
|
||||
* 将生产任务状态转换为中文标签,包含首帧与视频的生成中状态。
|
||||
* @param status 后端返回的生产任务状态
|
||||
* @returns 状态对应的中文名称,未知状态保留原值
|
||||
* @returns 状态对应的中文名称,未知状态显示待确认
|
||||
*/
|
||||
export function productionStatusLabel(status: string): string {
|
||||
const labels: Record<string, string> = {
|
||||
@@ -99,9 +99,11 @@ export function productionStatusLabel(status: string): string {
|
||||
completed: '已完成',
|
||||
failed: '失败',
|
||||
cancelled: '已取消',
|
||||
submitted: '已提交',
|
||||
processing: '处理中',
|
||||
not_started: '未开始'
|
||||
}
|
||||
return labels[status] ?? status
|
||||
return labels[status] ?? '待确认'
|
||||
}
|
||||
|
||||
/** 视频质量链状态标签与后端状态机保持一致。 */
|
||||
@@ -115,5 +117,5 @@ export function videoQualityStatusLabel(status: string): string {
|
||||
exhausted: '自动修复次数已用完',
|
||||
stale_motion_plan: '动作版本过期,质量流程已停止'
|
||||
}
|
||||
return labels[status] ?? status
|
||||
return labels[status] ?? '待确认'
|
||||
}
|
||||
@@ -76,8 +76,8 @@ export async function checkPipeline(projectId: string, scope: ProductionStartInp
|
||||
imageGenerationOptions: { ...profile.imageOptions },
|
||||
videoGenerationOptions: { ...profile.videoOptions }
|
||||
}
|
||||
const [checkpoints, forms, plan, status] = await Promise.all([
|
||||
projectsApi.checkpoints(projectId),
|
||||
const [summaries, forms, plan, status] = await Promise.all([
|
||||
projectsApi.checkpointSummaries(projectId),
|
||||
subjectImagesApi.listForms(projectId),
|
||||
productionApi.plan(projectId, undefined, providers),
|
||||
productionApi.status(projectId)
|
||||
@@ -111,7 +111,7 @@ export async function checkPipeline(projectId: string, scope: ProductionStartInp
|
||||
)
|
||||
issues.push('各阶段资产列表不一致,可能正在重新拆解,请刷新后重试。')
|
||||
if (project.status !== 'completed') issues.push('剧本尚未完成,请先完成剧本创作。')
|
||||
if (hasRunningWorkflow(checkpoints)) issues.push('项目仍有后台任务或工作流进行中。')
|
||||
if (hasRunningWorkflow(summaries)) issues.push('项目仍有后台任务或工作流进行中。')
|
||||
if (!forms.length || !plan.keyframes.total) issues.push('尚无正式形态或镜头,请先完成拆解和分镜。')
|
||||
if (forms.some(form => hasRunningImages(form.images))) issues.push('形态图片仍在生成中。')
|
||||
if (
|
||||
@@ -191,6 +191,7 @@ export function useAdvancedProduction() {
|
||||
operation.value.pending ||
|
||||
execution.active.value ||
|
||||
!!context.error.value ||
|
||||
context.summaryBlocked.value ||
|
||||
context.project.value?.status !== 'completed'
|
||||
)
|
||||
let version = 0
|
||||
@@ -275,7 +276,8 @@ export function useAdvancedProduction() {
|
||||
disposed ||
|
||||
id.value !== projectId ||
|
||||
context.project.value?.status !== 'completed' ||
|
||||
context.error.value
|
||||
context.error.value ||
|
||||
context.summaryBlocked.value
|
||||
)
|
||||
return
|
||||
if (JSON.stringify(result.input) !== confirmedInput) {
|
||||
|
||||
@@ -20,6 +20,8 @@ export type ProductionCommand = 'prompts' | 'keyframes' | 'videos' | 'retry-vide
|
||||
/** 镜头生产页的查询、筛选、就绪状态与批量操作。 */
|
||||
export function useProduction() {
|
||||
const context = useProjectContext()
|
||||
/** 制作正文只使用正式采用的拆解记录。 */
|
||||
const breakdownRecords = context.useWorkflowCheckpoints('breakdown')
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const id = computed(() => context.project.value?.id ?? '')
|
||||
/** 两个镜头工作区共用地址选择,刷新恢复同一正式镜头。 */
|
||||
@@ -43,7 +45,7 @@ export function useProduction() {
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const videoInputMode = ref<VideoInputMode | 'all'>('all')
|
||||
/** 生产页只关联正式镜头和正式正文,未提交候选不能补入当前资产。 */
|
||||
const snapshot = computed(() => formalBreakdownSnapshot(context.checkpoints.value))
|
||||
const snapshot = computed(() => formalBreakdownSnapshot(breakdownRecords.data.value ?? []))
|
||||
/** 当前工作区的响应式状态或派生业务条件。 */
|
||||
const sourceEpisodes = computed(
|
||||
() => snapshot.value?.storyboardEpisodeShots ?? snapshot.value?.breakdownResult?.storyboardEpisodeShots ?? []
|
||||
@@ -168,6 +170,10 @@ export function useProduction() {
|
||||
promptExecution.active.value ||
|
||||
videoExecution.active.value ||
|
||||
!!context.error.value ||
|
||||
context.summaryBlocked.value ||
|
||||
breakdownRecords.loading.value ||
|
||||
!!breakdownRecords.error.value ||
|
||||
breakdownRecords.data.value === null ||
|
||||
!!query.error.value ||
|
||||
!query.data.value ||
|
||||
context.project.value?.status !== 'completed'
|
||||
@@ -296,6 +302,7 @@ export function useProduction() {
|
||||
videoStatusItem,
|
||||
query,
|
||||
episodeSourceUnavailable,
|
||||
breakdownRecords,
|
||||
operation,
|
||||
session,
|
||||
concurrency,
|
||||
|
||||
@@ -155,14 +155,14 @@ export function useQuality(
|
||||
: '首帧自动修复'
|
||||
: '视觉质量校验',
|
||||
async () => {
|
||||
const [project, readiness, checkpoints] = await Promise.all([
|
||||
const [project, readiness, summaries] = await Promise.all([
|
||||
projectsApi.detail(projectId),
|
||||
productionApi.keyframeReadiness(projectId, target.kind === 'batch' ? input.force : true),
|
||||
projectsApi.checkpoints(projectId)
|
||||
projectsApi.checkpointSummaries(projectId)
|
||||
])
|
||||
if (project.id !== projectId || project.status !== 'completed')
|
||||
throw new Error('剧本未完成或项目已变化,未提交质量任务。')
|
||||
if (hasRunningWorkflow(checkpoints)) throw new Error('项目还有后台任务,请结束后再执行质量检查。')
|
||||
if (hasRunningWorkflow(summaries)) throw new Error('项目还有后台任务,请结束后再执行质量检查。')
|
||||
if (
|
||||
!Array.isArray(readiness.items) ||
|
||||
readiness.items.length !== readiness.total ||
|
||||
|
||||
Reference in new issue
Block a user