diff --git a/src/features/production/ProductionPage.vue b/src/features/production/ProductionPage.vue
index ece28e4..a99840f 100644
--- a/src/features/production/ProductionPage.vue
+++ b/src/features/production/ProductionPage.vue
@@ -32,6 +32,7 @@ import QualityDialog from './components/QualityDialog.vue'
import DetailDisclosure from '../../components/ui/DetailDisclosure.vue'
import CreativeProfileSettings from '../generation-config/components/CreativeProfileSettings.vue'
import EpisodeAssemblyPanel from './components/EpisodeAssemblyPanel.vue'
+import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
const qualityOpen = ref(false)
/** 镜头生产页将项目批处理与单镜头资产管理放在同一条可核验链路中。 */
@@ -55,13 +56,17 @@ const {
keyframeLimit,
keyframeWidth,
keyframeHeight,
+ promptLimit,
videoLimit,
videoRepairAttempts,
keyframeValid,
+ promptValid,
videoQualityValid,
batchValid,
blocked,
- run
+ run,
+ promptExecution,
+ videoExecution
} = useProduction()
const route = inject(routeLocationKey, undefined)
/** 从素材页返回时恢复到指定剧集与正式镜头,不按重复的 Shot 编号定位。 */
@@ -84,6 +89,19 @@ const openRequestedKeyframe = computed(
() => queryText(route?.query.action) === 'keyframe' && queryText(route?.query.shotId) === shot.value?.shotId
)
const staleVideos = computed(() => query.data.value?.videos.stalePrimaryVideo ?? 0)
+const episodePromptReadiness = computed(() => {
+ const source = query.data.value?.prompts
+ if (!source) return undefined
+ const items = source.items.filter(item => item.episodeNo === episodeNo.value)
+ return {
+ ...source,
+ items,
+ total: items.length,
+ ready: items.filter(item => item.status === 'ready').length,
+ skipped: items.filter(item => item.status === 'skipped').length,
+ blocked: items.filter(item => item.status === 'blocked').length
+ }
+})
const stages = computed(() => {
const data = query.data.value
return [
@@ -93,8 +111,8 @@ const stages = computed(() => {
title: '视频提示词',
description: '校验 GenerationSpec 与主体参考图后,由模型生成视频运动描述。',
icon: MessageSquareText,
- data: data?.prompts,
- done: data?.prompts.skipped ?? 0,
+ data: episodePromptReadiness.value,
+ done: episodePromptReadiness.value?.skipped ?? 0,
action: force.value ? '重生成全部提示词' : '补齐视频提示词'
},
{
@@ -190,12 +208,14 @@ const keyframeModel = computed(() => ({
keyframeWidth: keyframeWidth.value,
keyframeHeight: keyframeHeight.value
}))
+const promptModel = computed(() => ({ promptLimit: promptLimit.value }))
const dimensionRules = sizeRules(() => ({ width: keyframeWidth.value, height: keyframeHeight.value }))
const keyframeRules = {
keyframeLimit: integerRule('本批上限', 1, true),
keyframeWidth: dimensionRules.width,
keyframeHeight: dimensionRules.height
}
+const promptRules = { promptLimit: integerRule('本批镜头上限') }
const videoModel = computed(() => ({ videoLimit: videoLimit.value, videoRepairAttempts: videoRepairAttempts.value }))
const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairAttempts: integerRule('每镜最多自动修复') }
@@ -340,6 +360,24 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
个主视频已过期。它们使用的主首帧或主体参考图已经变化;非覆盖模式批量生成时会只重建这些过期主视频。
+
+
+
+
+
+ request(`${projectPath(projectId)}/video-prompts/generate/start`, {
+ method: 'POST',
+ body: input
+ }),
keyframeReadiness: (projectId: string, force: boolean, signal?: AbortSignal) =>
request(`${projectPath(projectId)}/keyframes/readiness?force=${force}`, { signal }),
generateKeyframes: (projectId: string, input: GenerateKeyframesInput) =>
@@ -95,8 +103,17 @@ export const productionApi = {
body: input,
timeoutMs: 0
}),
+ /** 后台启动项目级视频质量任务;后续状态通过 WorkflowExecution 查询。 */
+ startQualityVideoExecution: (projectId: string, input: GenerateQualityVideosInput) =>
+ request(`${projectPath(projectId)}/videos/generate-quality/start`, {
+ method: 'POST',
+ body: input
+ }),
projectVideoStatus: (projectId: string, signal?: AbortSignal) =>
request(`${projectPath(projectId)}/videos/status`, { signal }),
+ /** 读取单镜头已持久化的质量链状态,不触发新的视觉校验。 */
+ videoQualityStatus: (shotId: string, signal?: AbortSignal) =>
+ request(`${shotPath(shotId)}/videos/quality-status`, { signal }),
retryVideos: (projectId: string, concurrency: number) =>
request(`${projectPath(projectId)}/videos/retry-failed`, {
method: 'POST',
diff --git a/src/features/production/components/ShotProductionAssets.vue b/src/features/production/components/ShotProductionAssets.vue
index d6ee2c8..34f92b9 100644
--- a/src/features/production/components/ShotProductionAssets.vue
+++ b/src/features/production/components/ShotProductionAssets.vue
@@ -13,7 +13,14 @@ import { storyboardApi } from '../../storyboard/api'
import ConfirmAction from '../../workflows/ConfirmAction.vue'
import { getOperation, runOperation } from '../../workflows/operations'
import { productionApi } from '../api'
-import { isActiveVideo, issueLabel, primaryKeyframe, primaryVideo, productionStatusLabel } from '../model'
+import {
+ isActiveVideo,
+ issueLabel,
+ primaryKeyframe,
+ primaryVideo,
+ productionStatusLabel,
+ videoQualityStatusLabel
+} from '../model'
import type {
GenerateKeyframeInput,
KeyframeReadinessItem,
@@ -47,18 +54,24 @@ const key = computed(() => props.shot.shotId)
const query = usePolling(
key,
async (shotId, signal) => {
- const [keyframes, videos] = await Promise.all([
+ const [keyframes, videos, qualityState] = await Promise.all([
productionApi.listKeyframes(shotId, signal),
- productionApi.listVideos(shotId, signal)
+ productionApi.listVideos(shotId, signal),
+ productionApi
+ .videoQualityStatus(shotId, signal)
+ .then(data => ({ data, error: '' }))
+ .catch(cause => ({ data: null, error: errorMessage(cause) }))
])
if (keyframes.some(item => item.shotId !== shotId) || videos.some(item => item.shotId !== shotId))
throw new Error('资产记录与当前镜头不匹配,请刷新后重试。')
- return { keyframes, videos }
+ const qualityStatus = qualityState.data?.shotId === shotId ? qualityState.data : null
+ return { keyframes, videos, qualityStatus, qualityStatusError: qualityState.error }
},
false
)
const keyframes = computed(() => query.data.value?.keyframes ?? [])
const videos = computed(() => query.data.value?.videos ?? [])
+const videoQualityStatus = computed(() => query.data.value?.qualityStatus ?? null)
const currentKeyframe = computed(() => primaryKeyframe(keyframes.value))
const currentVideo = computed(() => primaryVideo(videos.value))
const activeVideo = computed(() => videos.value.find(isActiveVideo))
@@ -358,6 +371,9 @@ async function inspectSpecs() {
>
当前主首帧在本次质量检查中未通过,已阻止继续生成视频。请从候选中选择质量通过的图片。
+
+ 视频质量链状态暂时无法读取;视频资产仍可查看。请稍后刷新。
+
管理候选({{ keyframeCandidates.length }})
@@ -389,6 +405,26 @@ async function inspectSpecs() {
{{ issueLabel(issue.code) }}:{{ issue.reason }}
+
+ {{ videoQualityStatusLabel(videoQualityStatus.status) }}
+
+ · 修复 {{ videoQualityStatus.repairAttempt }} / {{ videoQualityStatus.maxRepairAttempts }}
+
+
+ 。请检查候选视频和校验结果,调整提示词或参考资产后再重新生成。
+
+