feat(short-drama-agent-front): 补齐后端生产与质量功能
This commit is contained in:
1 parent
967c4ebea1
commit
470b52e26d
52 files changed
+3754
-1075
No files matched your search
@@ -4,15 +4,7 @@ import { NFormItem } from 'naive-ui'
|
||||
import { integerRule, sizeRules } from '../../lib/form-rules'
|
||||
import WorkspacePage from '../../components/ui/WorkspacePage.vue'
|
||||
import WorkspaceTools from '../../components/ui/WorkspaceTools.vue'
|
||||
import {
|
||||
NScrollbar,
|
||||
NAlert,
|
||||
NButton,
|
||||
NCheckbox,
|
||||
NInputNumber,
|
||||
NProgress,
|
||||
NSelect
|
||||
} from 'naive-ui'
|
||||
import { NScrollbar, NAlert, NButton, NCheckbox, NInputNumber, NProgress, NSelect } from 'naive-ui'
|
||||
import { computed, inject, ref, watch } from 'vue'
|
||||
import { ArrowLeft, CheckCircle2, CircleAlert, Film, Image, MessageSquareText, RefreshCw } from '@lucide/vue'
|
||||
import { EmptyState, StatusBadge } from '../../components/ui'
|
||||
@@ -30,6 +22,7 @@ import QualityDialog from './components/QualityDialog.vue'
|
||||
import CreativeProfileSettings from '../generation-config/components/CreativeProfileSettings.vue'
|
||||
import EpisodeAssemblyPanel from './components/EpisodeAssemblyPanel.vue'
|
||||
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
|
||||
import { useWorkflowExecution } from '../workflows/execution'
|
||||
const qualityOpen = ref(false)
|
||||
|
||||
/** 镜头生产页将项目批处理与单镜头资产管理放在同一条可核验链路中。 */
|
||||
@@ -42,10 +35,12 @@ const {
|
||||
shots,
|
||||
shot,
|
||||
promptItem,
|
||||
keyframeExecution,
|
||||
keyframeItem,
|
||||
videoItem,
|
||||
videoStatusItem,
|
||||
query,
|
||||
episodeSourceUnavailable,
|
||||
operation,
|
||||
session,
|
||||
concurrency,
|
||||
@@ -66,6 +61,26 @@ const {
|
||||
promptExecution,
|
||||
videoExecution
|
||||
} = useProduction()
|
||||
/** 首帧质量任务在关闭弹窗后仍可观察,刷新页面后恢复持久化句柄。 */
|
||||
const keyframeQualityExecution = useWorkflowExecution(id, 'keyframe-quality')
|
||||
|
||||
/**
|
||||
* 将首帧质量启动句柄交给页面级观察器,始终保存当前原项目归属。
|
||||
* @param executionId 后端返回的真实任务编号
|
||||
* @returns 当前观察状态刷新完成
|
||||
*/
|
||||
async function trackKeyframeQuality(executionId: string) {
|
||||
await keyframeQualityExecution.track(executionId, id.value)
|
||||
}
|
||||
|
||||
/** 后台首帧质量结束后刷新当前项目资产,不把开始任务当作完成。 */
|
||||
watch(
|
||||
() => keyframeQualityExecution.query.data.value?.status,
|
||||
status => {
|
||||
const record = keyframeQualityExecution.query.data.value
|
||||
if (record?.projectId === id.value && (status === 'completed' || status === 'failed')) void refreshProject()
|
||||
}
|
||||
)
|
||||
const route = inject(routeLocationKey, undefined)
|
||||
/** 从素材页返回时恢复到指定剧集与正式镜头,不按重复的 Shot 编号定位。 */
|
||||
watch(
|
||||
@@ -365,353 +380,322 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<section class="workspace-overview-panel production-tool-section workspace-panel">
|
||||
<div class="overview-content workspace-section-stack">
|
||||
<h3 class="text-sm font-semibold">项目生产总览与批量操作</h3>
|
||||
<NAlert
|
||||
v-if="videoRunning"
|
||||
role="status"
|
||||
type="info"
|
||||
:show-icon="false"
|
||||
|
||||
>
|
||||
当前有 {{ videoRunning }} 个视频任务等待或生成中。系统会持续更新任务状态,同一镜头不会重复提交。
|
||||
</NAlert>
|
||||
<NAlert v-if="identityBlocked" type="info" :show-icon="false">
|
||||
当前有 {{ identityBlocked }} 项角色身份尚未准备完成。请先确认角色母版并完成身份锁定,再生成镜头首帧。
|
||||
<RouterLink
|
||||
:to="`/projects/${id}/subject-identity`"
|
||||
class="text-button ml-2"
|
||||
>前往主体身份 →</RouterLink
|
||||
></NAlert
|
||||
>
|
||||
<NAlert
|
||||
v-if="invalidGenerationSpecs"
|
||||
type="warning"
|
||||
:show-icon="false"
|
||||
|
||||
>
|
||||
当前有 {{ invalidGenerationSpecs }} 个镜头的设计信息还不完整。请先补齐镜头设计和即时视觉状态。
|
||||
<RouterLink :to="`/projects/${id}/storyboard`" class="text-button ml-2">
|
||||
前往分镜设计 →
|
||||
</RouterLink>
|
||||
</NAlert>
|
||||
<NAlert
|
||||
v-if="staleKeyframes"
|
||||
role="status"
|
||||
type="info"
|
||||
:show-icon="false"
|
||||
|
||||
>
|
||||
当前有
|
||||
{{ staleKeyframes }}
|
||||
个主首帧已过期。它们使用的主体参考资产已经变化,视频阶段会被阻止;可在下方逐镜重新生成,或使用“补齐
|
||||
/ 更新主首帧”批量处理。
|
||||
</NAlert>
|
||||
<NAlert
|
||||
v-if="staleVideos"
|
||||
role="status"
|
||||
type="info"
|
||||
:show-icon="false"
|
||||
|
||||
>
|
||||
当前有
|
||||
{{ staleVideos }}
|
||||
个主视频已过期。它们使用的主首帧或主体参考图已经变化;非覆盖模式批量生成时会只重建这些过期主视频。
|
||||
</NAlert>
|
||||
<ProductionReceipt v-if="session.receipt" :receipt="session.receipt" />
|
||||
<WorkflowExecutionPanel
|
||||
v-if="promptExecution.executionId.value"
|
||||
title="视频提示词任务"
|
||||
:execution="promptExecution.query.data.value"
|
||||
:loading="promptExecution.query.loading.value"
|
||||
:error="promptExecution.query.error.value"
|
||||
@refresh="promptExecution.query.refresh"
|
||||
@dismiss="promptExecution.dismiss"
|
||||
/>
|
||||
<WorkflowExecutionPanel
|
||||
v-if="videoExecution.executionId.value"
|
||||
title="视频质量任务"
|
||||
:execution="videoExecution.query.data.value"
|
||||
:loading="videoExecution.query.loading.value"
|
||||
:error="videoExecution.query.error.value"
|
||||
@refresh="videoExecution.query.refresh"
|
||||
@dismiss="videoExecution.dismiss"
|
||||
/>
|
||||
<div v-if="query.data.value" class="production-pipeline">
|
||||
<article
|
||||
v-for="stage in stages"
|
||||
:key="stage.key"
|
||||
class="production-pipeline-card"
|
||||
>
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div class="flex items-start gap-3">
|
||||
<span class="production-step"
|
||||
><component :is="stage.icon" :size="17"
|
||||
/></span>
|
||||
<div>
|
||||
<p class="eyebrow">STEP {{ stage.code }}</p>
|
||||
<h3 class="mt-2 text-sm font-semibold">
|
||||
{{ stage.title }}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<span class="font-mono text-xs text-muted"
|
||||
>{{ stage.done }} / {{ stage.data?.total ?? 0 }}</span
|
||||
>
|
||||
</div>
|
||||
<p class="min-h-10 text-xs leading-5 text-muted">
|
||||
{{ stage.description }}
|
||||
</p>
|
||||
<NProgress
|
||||
:aria-label="`${stage.title}完成数量`"
|
||||
type="line"
|
||||
:show-indicator="false"
|
||||
:height="4"
|
||||
:percentage="
|
||||
Math.min(
|
||||
100,
|
||||
Math.max(
|
||||
0,
|
||||
(stage.done /
|
||||
Math.max(
|
||||
1,
|
||||
Math.max(stage.data?.total ?? 0, 1)
|
||||
)) *
|
||||
100
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
></NProgress>
|
||||
<dl class="production-stats">
|
||||
<div>
|
||||
<dt>可执行</dt>
|
||||
<dd>{{ stage.data?.ready ?? 0 }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>已有结果</dt>
|
||||
<dd>{{ stage.data?.skipped ?? 0 }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>阻塞</dt>
|
||||
<dd>{{ stage.data?.blocked ?? 0 }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<p
|
||||
v-if="stage.key === 'keyframes' && staleKeyframes"
|
||||
class="text-[11px] leading-5"
|
||||
>
|
||||
已过期 {{ staleKeyframes }} · 会按当前主体参考资产重新生成
|
||||
</p>
|
||||
<p
|
||||
v-if="stage.key === 'videos' && staleVideos"
|
||||
class="text-[11px] leading-5"
|
||||
>
|
||||
主视频已过期 {{ staleVideos }} ·
|
||||
会按当前主首帧与参考资产重新生成
|
||||
</p>
|
||||
<p
|
||||
v-if="stage.key === 'keyframes' && identityBlocked"
|
||||
class="text-[11px] leading-5 text-danger"
|
||||
>
|
||||
身份缺失
|
||||
{{ query.data.value?.keyframes.missingIdentity ?? 0 }} ·
|
||||
母版缺失
|
||||
{{ query.data.value?.keyframes.missingIdentityAnchor ?? 0 }} ·
|
||||
未锁定
|
||||
{{ query.data.value?.keyframes.identityUnlocked ?? 0 }}
|
||||
</p>
|
||||
<ConfirmAction
|
||||
|
||||
:label="stage.action"
|
||||
:disabled="
|
||||
blocked ||
|
||||
!batchValid ||
|
||||
(stage.key === 'prompts' && !promptValid) ||
|
||||
(stage.key === 'keyframes' && !keyframeValid) ||
|
||||
(stage.key === 'videos' && !videoQualityValid) ||
|
||||
(stage.key === 'videos' && !selectedPlanCount) ||
|
||||
!(stage.data?.ready ?? 0)
|
||||
"
|
||||
acknowledgement
|
||||
:description="
|
||||
stage.key === 'videos'
|
||||
? staleVideos && !force
|
||||
? `只处理第 ${episodeNo} 集的${videoInputModeLabel},其中至多 ${videoLimit || '—'} 个过期镜头会启动严格质量流水线;通过后才接替旧主视频。`
|
||||
: `只处理第 ${episodeNo} 集的${videoInputModeLabel},本批至多 ${videoLimit || '—'} 镜。最多自动修复 ${videoRepairAttempts || '—'} 次,通过后才晋升主视频。`
|
||||
: stage.key === 'keyframes'
|
||||
? `处理缺失或过期主首帧。过期首帧成功后自动接替旧主图(覆盖模式也如此),其余已有主图只新增候选。本批上限:${keyframeLimit || '不限制'};尺寸:${keyframeWidth && keyframeHeight ? `${keyframeWidth} × ${keyframeHeight}` : '项目默认'}。`
|
||||
: `只处理第 ${episodeNo} 集中通过就绪检查的镜头,本批最多 ${promptLimit || '—'} 镜;覆盖模式会重写已有提示词。`
|
||||
"
|
||||
:primary="stage.key === 'videos'"
|
||||
@confirm="run(stage.key)"
|
||||
/>
|
||||
<AppForm
|
||||
v-if="stage.key === 'prompts'"
|
||||
:model="promptModel"
|
||||
:rules="promptRules"
|
||||
:disabled="operation.pending"
|
||||
validate-on-change
|
||||
class="grid gap-3"
|
||||
>
|
||||
<NFormItem path="promptLimit" label="本批镜头上限"
|
||||
><NInputNumber
|
||||
v-model:value="promptLimit"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
:input-props="{ 'aria-label': '视频提示词本批镜头上限' }"
|
||||
/></NFormItem>
|
||||
</AppForm>
|
||||
<AppForm
|
||||
v-if="stage.key === 'keyframes'"
|
||||
:model="keyframeModel"
|
||||
:rules="keyframeRules"
|
||||
:disabled="operation.pending"
|
||||
validate-on-change
|
||||
class="grid gap-3"
|
||||
>
|
||||
<NFormItem path="keyframeLimit" label="本批上限(可选)"
|
||||
><NInputNumber
|
||||
:input-props="{ 'aria-label': '本批上限(可选)' }"
|
||||
:value="keyframeLimit === '' ? null : keyframeLimit"
|
||||
@update:value="keyframeLimit = $event ?? ''"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
placeholder="留空不限制"
|
||||
/></NFormItem>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<NFormItem path="keyframeWidth" label="宽度(像素)"
|
||||
><NInputNumber
|
||||
:input-props="{ 'aria-label': '宽度(像素)' }"
|
||||
:value="keyframeWidth === '' ? null : keyframeWidth"
|
||||
@update:value="keyframeWidth = $event ?? ''"
|
||||
:min="1"
|
||||
:disabled="operation.pending"
|
||||
placeholder="默认" /></NFormItem
|
||||
><NFormItem path="keyframeHeight" label="高度(像素)"
|
||||
><NInputNumber
|
||||
:input-props="{ 'aria-label': '高度(像素)' }"
|
||||
:value="
|
||||
keyframeHeight === '' ? null : keyframeHeight
|
||||
"
|
||||
@update:value="keyframeHeight = $event ?? ''"
|
||||
:min="1"
|
||||
:disabled="operation.pending"
|
||||
placeholder="默认"
|
||||
/></NFormItem>
|
||||
</div>
|
||||
</AppForm>
|
||||
<AppForm
|
||||
v-if="stage.key === 'videos'"
|
||||
:model="videoModel"
|
||||
:rules="videoRules"
|
||||
:disabled="operation.pending"
|
||||
validate-on-change
|
||||
class="grid gap-3"
|
||||
>
|
||||
<div class="video-input-plan-summary" aria-label="视频输入规划">
|
||||
<div>
|
||||
<span>首帧模式</span>
|
||||
<strong>{{ inputPlan?.firstFrameCount ?? 0 }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>全模态参考</span>
|
||||
<strong>{{ inputPlan?.omniReferenceCount ?? 0 }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<NAlert
|
||||
v-if="query.data.value?.videoInputPlansError"
|
||||
type="warning"
|
||||
:show-icon="false"
|
||||
class="text-xs"
|
||||
>
|
||||
输入规划暂不可用,仍可按“全部推荐模式”提交;刷新后可重试规划。
|
||||
</NAlert>
|
||||
<NFormItem path="videoInputMode" label="输入规划范围">
|
||||
<NSelect
|
||||
v-model:value="videoInputMode"
|
||||
:disabled="operation.pending"
|
||||
:options="[
|
||||
{
|
||||
label: `全部推荐模式(${inputPlan?.readyCount ?? 0})`,
|
||||
value: 'all'
|
||||
},
|
||||
{
|
||||
label: `首帧模式(${inputPlan?.firstFrameCount ?? 0})`,
|
||||
value: 'first_frame',
|
||||
disabled: !inputPlan
|
||||
},
|
||||
{
|
||||
label: `全模态参考(${inputPlan?.omniReferenceCount ?? 0})`,
|
||||
value: 'omni_reference',
|
||||
disabled: !inputPlan
|
||||
}
|
||||
]"
|
||||
aria-label="视频输入规划范围"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem path="videoLimit" label="本批镜头上限"
|
||||
><NInputNumber
|
||||
v-model:value="videoLimit"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
:input-props="{ 'aria-label': '视频质量任务镜头上限' }"
|
||||
/></NFormItem>
|
||||
<NFormItem path="videoRepairAttempts" label="每镜最多自动修复"
|
||||
><NInputNumber
|
||||
v-model:value="videoRepairAttempts"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
:input-props="{ 'aria-label': '视频自动修复次数' }"
|
||||
/></NFormItem>
|
||||
</AppForm>
|
||||
</article>
|
||||
</div>
|
||||
<div v-if="query.data.value" class="workspace-panel production-video-status">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<NAlert v-if="videoRunning" role="status" type="info" :show-icon="false">
|
||||
当前有
|
||||
{{ videoRunning }}
|
||||
个视频任务等待或生成中。系统会持续更新任务状态,同一镜头不会重复提交。
|
||||
</NAlert>
|
||||
<NAlert v-if="identityBlocked" type="info" :show-icon="false">
|
||||
当前有
|
||||
{{ identityBlocked }}
|
||||
项角色身份尚未准备完成。请先确认角色母版并完成身份锁定,再生成镜头首帧。
|
||||
<RouterLink :to="`/projects/${id}/subject-identity`" class="text-button ml-2"
|
||||
>前往主体身份 →</RouterLink
|
||||
></NAlert
|
||||
>
|
||||
<NAlert v-if="invalidGenerationSpecs" type="warning" :show-icon="false">
|
||||
当前有
|
||||
{{ invalidGenerationSpecs }}
|
||||
个镜头的设计信息还不完整。请先补齐镜头设计和即时视觉状态。
|
||||
<RouterLink :to="`/projects/${id}/storyboard`" class="text-button ml-2">
|
||||
前往分镜设计 →
|
||||
</RouterLink>
|
||||
</NAlert>
|
||||
<NAlert v-if="staleKeyframes" role="status" type="info" :show-icon="false">
|
||||
当前有
|
||||
{{ staleKeyframes }}
|
||||
个主首帧已过期。它们使用的主体参考资产已经变化,视频阶段会被阻止;可在下方逐镜重新生成,或使用“补齐
|
||||
/ 更新主首帧”批量处理。
|
||||
</NAlert>
|
||||
<NAlert v-if="staleVideos" role="status" type="info" :show-icon="false">
|
||||
当前有
|
||||
{{ staleVideos }}
|
||||
个主视频已过期。它们使用的主首帧或主体参考图已经变化;非覆盖模式批量生成时会只重建这些过期主视频。
|
||||
</NAlert>
|
||||
<ProductionReceipt v-if="session.receipt" :receipt="session.receipt" />
|
||||
<WorkflowExecutionPanel
|
||||
v-if="promptExecution.executionId.value"
|
||||
title="视频提示词任务"
|
||||
:execution="promptExecution.query.data.value"
|
||||
:loading="promptExecution.query.loading.value"
|
||||
:error="promptExecution.query.error.value"
|
||||
@refresh="promptExecution.query.refresh"
|
||||
@dismiss="promptExecution.dismiss"
|
||||
/>
|
||||
<WorkflowExecutionPanel
|
||||
v-if="videoExecution.executionId.value"
|
||||
title="视频质量任务"
|
||||
:execution="videoExecution.query.data.value"
|
||||
:loading="videoExecution.query.loading.value"
|
||||
:error="videoExecution.query.error.value"
|
||||
@refresh="videoExecution.query.refresh"
|
||||
@dismiss="videoExecution.dismiss"
|
||||
/>
|
||||
<div v-if="query.data.value" class="production-pipeline">
|
||||
<article
|
||||
v-for="stage in stages"
|
||||
:key="stage.key"
|
||||
class="production-pipeline-card"
|
||||
>
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div class="flex items-start gap-3">
|
||||
<span class="production-step"
|
||||
><component :is="stage.icon" :size="17"
|
||||
/></span>
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold">视频任务状态</h3>
|
||||
<p class="mt-2 text-xs text-muted">
|
||||
状态统计取每个镜头最近一次任务,不等同于主视频数量。
|
||||
</p>
|
||||
<p class="eyebrow">STEP {{ stage.code }}</p>
|
||||
<h3 class="mt-2 text-sm font-semibold">
|
||||
{{ stage.title }}
|
||||
</h3>
|
||||
</div>
|
||||
<ConfirmAction
|
||||
label="重试失败视频"
|
||||
:disabled="
|
||||
blocked ||
|
||||
!batchValid ||
|
||||
!query.data.value.videoStatus.failed
|
||||
"
|
||||
acknowledgement
|
||||
description="只重新提交可以重试的失败视频;其他项目会跳过,并在结果中显示数量。"
|
||||
@confirm="run('retry-videos')"
|
||||
/>
|
||||
</div>
|
||||
<dl class="production-status-grid">
|
||||
<div>
|
||||
<dt>完成</dt>
|
||||
<dd>{{ query.data.value.videoStatus.completed }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>排队/生成</dt>
|
||||
<dd>{{ videoRunning }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>失败</dt>
|
||||
<dd>{{ query.data.value.videoStatus.failed }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>取消</dt>
|
||||
<dd>{{ query.data.value.videoStatus.cancelled }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>未开始</dt>
|
||||
<dd>{{ query.data.value.videoStatus.notStarted }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<span class="font-mono text-xs text-muted"
|
||||
>{{ stage.done }} / {{ stage.data?.total ?? 0 }}</span
|
||||
>
|
||||
</div>
|
||||
<p class="min-h-10 text-xs leading-5 text-muted">
|
||||
{{ stage.description }}
|
||||
</p>
|
||||
<NProgress
|
||||
:aria-label="`${stage.title}完成数量`"
|
||||
type="line"
|
||||
:show-indicator="false"
|
||||
:height="4"
|
||||
:percentage="
|
||||
Math.min(
|
||||
100,
|
||||
Math.max(
|
||||
0,
|
||||
(stage.done /
|
||||
Math.max(1, Math.max(stage.data?.total ?? 0, 1))) *
|
||||
100
|
||||
)
|
||||
)
|
||||
"
|
||||
></NProgress>
|
||||
<dl class="production-stats">
|
||||
<div>
|
||||
<dt>可执行</dt>
|
||||
<dd>{{ stage.data?.ready ?? 0 }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>已有结果</dt>
|
||||
<dd>{{ stage.data?.skipped ?? 0 }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>阻塞</dt>
|
||||
<dd>{{ stage.data?.blocked ?? 0 }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<p
|
||||
v-if="stage.key === 'keyframes' && staleKeyframes"
|
||||
class="text-[11px] leading-5"
|
||||
>
|
||||
已过期 {{ staleKeyframes }} · 会按当前主体参考资产重新生成
|
||||
</p>
|
||||
<p
|
||||
v-if="stage.key === 'videos' && staleVideos"
|
||||
class="text-[11px] leading-5"
|
||||
>
|
||||
主视频已过期 {{ staleVideos }} · 会按当前主首帧与参考资产重新生成
|
||||
</p>
|
||||
<p
|
||||
v-if="stage.key === 'keyframes' && identityBlocked"
|
||||
class="text-[11px] leading-5 text-danger"
|
||||
>
|
||||
身份缺失
|
||||
{{ query.data.value?.keyframes.missingIdentity ?? 0 }} · 母版缺失
|
||||
{{ query.data.value?.keyframes.missingIdentityAnchor ?? 0 }} · 未锁定
|
||||
{{ query.data.value?.keyframes.identityUnlocked ?? 0 }}
|
||||
</p>
|
||||
<ConfirmAction
|
||||
:label="stage.action"
|
||||
:disabled="
|
||||
blocked ||
|
||||
!batchValid ||
|
||||
(stage.key === 'prompts' && !promptValid) ||
|
||||
(stage.key === 'keyframes' && !keyframeValid) ||
|
||||
(stage.key === 'videos' && !videoQualityValid) ||
|
||||
(stage.key === 'videos' && !selectedPlanCount) ||
|
||||
!(stage.data?.ready ?? 0)
|
||||
"
|
||||
acknowledgement
|
||||
:description="
|
||||
stage.key === 'videos'
|
||||
? staleVideos && !force
|
||||
? `只处理第 ${episodeNo} 集的${videoInputModeLabel},其中至多 ${videoLimit || '—'} 个过期镜头会启动严格质量流水线;通过后才接替旧主视频。`
|
||||
: `只处理第 ${episodeNo} 集的${videoInputModeLabel},本批至多 ${videoLimit || '—'} 镜。最多自动修复 ${videoRepairAttempts || '—'} 次,通过后才晋升主视频。`
|
||||
: stage.key === 'keyframes'
|
||||
? `处理缺失或过期主首帧。过期首帧成功后自动接替旧主图(覆盖模式也如此),其余已有主图只新增候选。本批上限:${keyframeLimit || '不限制'};尺寸:${keyframeWidth && keyframeHeight ? `${keyframeWidth} × ${keyframeHeight}` : '项目默认'}。`
|
||||
: `只处理第 ${episodeNo} 集中通过就绪检查的镜头,本批最多 ${promptLimit || '—'} 镜;覆盖模式会重写已有提示词。`
|
||||
"
|
||||
:primary="stage.key === 'videos'"
|
||||
@confirm="run(stage.key)"
|
||||
/>
|
||||
<AppForm
|
||||
v-if="stage.key === 'prompts'"
|
||||
:model="promptModel"
|
||||
:rules="promptRules"
|
||||
:disabled="operation.pending"
|
||||
validate-on-change
|
||||
class="grid gap-3"
|
||||
>
|
||||
<NFormItem path="promptLimit" label="本批镜头上限"
|
||||
><NInputNumber
|
||||
v-model:value="promptLimit"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
:input-props="{ 'aria-label': '视频提示词本批镜头上限' }"
|
||||
/></NFormItem>
|
||||
</AppForm>
|
||||
<AppForm
|
||||
v-if="stage.key === 'keyframes'"
|
||||
:model="keyframeModel"
|
||||
:rules="keyframeRules"
|
||||
:disabled="operation.pending"
|
||||
validate-on-change
|
||||
class="grid gap-3"
|
||||
>
|
||||
<NFormItem path="keyframeLimit" label="本批上限(可选)"
|
||||
><NInputNumber
|
||||
:input-props="{ 'aria-label': '本批上限(可选)' }"
|
||||
:value="keyframeLimit === '' ? null : keyframeLimit"
|
||||
@update:value="keyframeLimit = $event ?? ''"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
placeholder="留空不限制"
|
||||
/></NFormItem>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<NFormItem path="keyframeWidth" label="宽度(像素)"
|
||||
><NInputNumber
|
||||
:input-props="{ 'aria-label': '宽度(像素)' }"
|
||||
:value="keyframeWidth === '' ? null : keyframeWidth"
|
||||
@update:value="keyframeWidth = $event ?? ''"
|
||||
:min="1"
|
||||
:disabled="operation.pending"
|
||||
placeholder="默认" /></NFormItem
|
||||
><NFormItem path="keyframeHeight" label="高度(像素)"
|
||||
><NInputNumber
|
||||
:input-props="{ 'aria-label': '高度(像素)' }"
|
||||
:value="keyframeHeight === '' ? null : keyframeHeight"
|
||||
@update:value="keyframeHeight = $event ?? ''"
|
||||
:min="1"
|
||||
:disabled="operation.pending"
|
||||
placeholder="默认"
|
||||
/></NFormItem>
|
||||
</div>
|
||||
</AppForm>
|
||||
<AppForm
|
||||
v-if="stage.key === 'videos'"
|
||||
:model="videoModel"
|
||||
:rules="videoRules"
|
||||
:disabled="operation.pending"
|
||||
validate-on-change
|
||||
class="grid gap-3"
|
||||
>
|
||||
<div class="video-input-plan-summary" aria-label="视频输入规划">
|
||||
<div>
|
||||
<span>首帧模式</span>
|
||||
<strong>{{ inputPlan?.firstFrameCount ?? 0 }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>全模态参考</span>
|
||||
<strong>{{ inputPlan?.omniReferenceCount ?? 0 }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<NAlert
|
||||
v-if="query.data.value?.videoInputPlansError"
|
||||
type="warning"
|
||||
:show-icon="false"
|
||||
class="text-xs"
|
||||
>
|
||||
输入规划暂不可用,仍可按“全部推荐模式”提交;刷新后可重试规划。
|
||||
</NAlert>
|
||||
<NFormItem path="videoInputMode" label="输入规划范围">
|
||||
<NSelect
|
||||
v-model:value="videoInputMode"
|
||||
:disabled="operation.pending"
|
||||
:options="[
|
||||
{
|
||||
label: `全部推荐模式(${inputPlan?.readyCount ?? 0})`,
|
||||
value: 'all'
|
||||
},
|
||||
{
|
||||
label: `首帧模式(${inputPlan?.firstFrameCount ?? 0})`,
|
||||
value: 'first_frame',
|
||||
disabled: !inputPlan
|
||||
},
|
||||
{
|
||||
label: `全模态参考(${inputPlan?.omniReferenceCount ?? 0})`,
|
||||
value: 'omni_reference',
|
||||
disabled: !inputPlan
|
||||
}
|
||||
]"
|
||||
aria-label="视频输入规划范围"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem path="videoLimit" label="本批镜头上限"
|
||||
><NInputNumber
|
||||
v-model:value="videoLimit"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
:input-props="{ 'aria-label': '视频质量任务镜头上限' }"
|
||||
/></NFormItem>
|
||||
<NFormItem path="videoRepairAttempts" label="每镜最多自动修复"
|
||||
><NInputNumber
|
||||
v-model:value="videoRepairAttempts"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
:disabled="operation.pending"
|
||||
:input-props="{ 'aria-label': '视频自动修复次数' }"
|
||||
/></NFormItem>
|
||||
</AppForm>
|
||||
</article>
|
||||
</div>
|
||||
<div v-if="query.data.value" class="workspace-panel production-video-status">
|
||||
<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>
|
||||
</div>
|
||||
<ConfirmAction
|
||||
label="重试失败视频"
|
||||
:disabled="
|
||||
blocked || !batchValid || !query.data.value.videoStatus.failed
|
||||
"
|
||||
acknowledgement
|
||||
description="只重新提交可以重试的失败视频;其他项目会跳过,并在结果中显示数量。"
|
||||
@confirm="run('retry-videos')"
|
||||
/>
|
||||
</div>
|
||||
<dl class="production-status-grid">
|
||||
<div>
|
||||
<dt>完成</dt>
|
||||
<dd>{{ query.data.value.videoStatus.completed }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>排队/生成</dt>
|
||||
<dd>{{ videoRunning }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>失败</dt>
|
||||
<dd>{{ query.data.value.videoStatus.failed }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>取消</dt>
|
||||
<dd>{{ query.data.value.videoStatus.cancelled }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>未开始</dt>
|
||||
<dd>{{ query.data.value.videoStatus.notStarted }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<EpisodeAssemblyPanel :project-id="id" />
|
||||
@@ -720,6 +704,30 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</WorkspaceTools>
|
||||
</div></div
|
||||
></template>
|
||||
<!-- 以下是关闭弹窗后仍可查看的首帧质量后台任务模块 -->
|
||||
<!-- 以下是普通首帧后台执行状态模块 -->
|
||||
<WorkflowExecutionPanel
|
||||
v-if="keyframeExecution.executionId.value"
|
||||
title="普通首帧生成"
|
||||
:execution="keyframeExecution.query.data.value"
|
||||
:loading="keyframeExecution.query.loading.value"
|
||||
:error="keyframeExecution.query.error.value"
|
||||
@refresh="keyframeExecution.query.refresh"
|
||||
@dismiss="keyframeExecution.dismiss"
|
||||
/>
|
||||
<WorkflowExecutionPanel
|
||||
v-if="keyframeQualityExecution.executionId.value"
|
||||
title="首帧质量后台任务"
|
||||
:execution="keyframeQualityExecution.query.data.value"
|
||||
:loading="keyframeQualityExecution.query.loading.value"
|
||||
:error="keyframeQualityExecution.query.error.value"
|
||||
@refresh="keyframeQualityExecution.query.refresh"
|
||||
@dismiss="keyframeQualityExecution.dismiss"
|
||||
/>
|
||||
<!-- 以下是重生成后正文缺省的真实数据说明模块 -->
|
||||
<NAlert v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||
</NAlert>
|
||||
<div v-if="preparationComplete" class="workspace-inline-status">
|
||||
<span v-if="finalVideosComplete">本项目镜头素材和视频成片已经准备完成。</span>
|
||||
<span v-else>镜头制作准备已经完成。视频生成费用较高,可按需要逐批提交视频任务。</span>
|
||||
@@ -852,12 +860,14 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot="shot"
|
||||
:episode-no="episodeNo"
|
||||
:prompt-readiness="promptItem"
|
||||
:keyframe-readiness="keyframeItem"
|
||||
:video-readiness="videoItem"
|
||||
:open-keyframe="openRequestedKeyframe"
|
||||
:disabled="blocked || !!linkedShotMissing"
|
||||
:disabled="blocked || keyframeQualityExecution.active.value || !!linkedShotMissing"
|
||||
@changed="refreshProject"
|
||||
@quality-started="trackKeyframeQuality"
|
||||
/>
|
||||
</NScrollbar>
|
||||
</article>
|
||||
@@ -879,6 +889,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
:disabled="blocked"
|
||||
@changed="refreshProject"
|
||||
@locate="locateQualityShot"
|
||||
@started="trackKeyframeQuality"
|
||||
/>
|
||||
</WorkspacePage>
|
||||
</template>
|
||||
|
||||
Reference in new issue
Block a user