fix(short-drama-agent-front): 优化工作区提示与弹窗布局
This commit is contained in:
1 parent
5b134207b8
commit
72a86171dc
35 files changed
+586
-378
No files matched your search
@@ -4,7 +4,17 @@ 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,
|
||||
NCollapse,
|
||||
NCollapseItem
|
||||
} from 'naive-ui'
|
||||
import { computed, inject, ref, watch } from 'vue'
|
||||
import { ArrowLeft, CheckCircle2, CircleAlert, Film, Image, MessageSquareText } from '@lucide/vue'
|
||||
import { EmptyState, StatusBadge } from '../../components/ui'
|
||||
@@ -19,7 +29,6 @@ import StaleKeyframeNotice from './components/StaleKeyframeNotice.vue'
|
||||
import { routeLocationKey } from 'vue-router'
|
||||
import { queryText } from './asset-links'
|
||||
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'
|
||||
@@ -195,25 +204,6 @@ const invalidGenerationSpecs = computed(
|
||||
(query.data.value?.keyframes.invalidGenerationSpec ?? 0) +
|
||||
(query.data.value?.prompts.invalidGenerationSpec ?? 0)
|
||||
)
|
||||
const preparationComplete = computed(() => {
|
||||
const data = query.data.value
|
||||
if (!data) return false
|
||||
return (
|
||||
data.keyframes.total > 0 &&
|
||||
data.keyframes.skipped === data.keyframes.total &&
|
||||
data.prompts.total > 0 &&
|
||||
data.prompts.skipped === data.prompts.total &&
|
||||
!identityBlocked.value &&
|
||||
!invalidGenerationSpecs.value &&
|
||||
!staleKeyframes.value
|
||||
)
|
||||
})
|
||||
const finalVideosComplete = computed(() => {
|
||||
const data = query.data.value
|
||||
if (!data?.videos.total) return false
|
||||
return data.videos.skipped === data.videos.total && !staleVideos.value && !videoRunning.value
|
||||
})
|
||||
|
||||
/** 父页查询包含整个项目的就绪统计,单镜头变更后立即刷新。 */
|
||||
function refreshProject() {
|
||||
void query.refresh()
|
||||
@@ -240,9 +230,6 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
function profileSaved() {
|
||||
operation.value.error = ''
|
||||
}
|
||||
const batchModel = computed(() => ({ concurrency: concurrency.value }))
|
||||
const batchRules = { concurrency: integerRule('批量并发') }
|
||||
const keyframeModel = computed(() => ({
|
||||
@@ -345,11 +332,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</AppForm>
|
||||
</section>
|
||||
<div class="production-tool-stack workspace-section-stack">
|
||||
<CreativeProfileSettings
|
||||
:project-id="id"
|
||||
:disabled="operation.pending"
|
||||
@saved="profileSaved"
|
||||
/>
|
||||
<!-- 以下是生产范围说明与批量操作模块 -->
|
||||
<section class="production-tool-section workspace-panel">
|
||||
<h3 class="text-sm font-semibold">处理范围与覆盖规则</h3>
|
||||
<p class="mt-3 text-xs leading-6 text-muted">
|
||||
@@ -707,11 +690,6 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<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>
|
||||
<NButton v-if="!finalVideosComplete" text size="small" @click="toolsOpen = true">打开批量生产</NButton>
|
||||
</div>
|
||||
<NScrollbar v-if="query.error.value" class="workspace-feedback"
|
||||
><NAlert role="alert" type="error" :show-icon="false"
|
||||
>{{ query.error.value
|
||||
@@ -719,8 +697,9 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
></NScrollbar
|
||||
>
|
||||
<div v-if="staleKeyframes || staleVideos || identityBlocked" class="workspace-inline-status">
|
||||
<span>过期首帧 {{ staleKeyframes }} · 过期视频 {{ staleVideos }} · 身份前置问题 {{ identityBlocked }}</span>
|
||||
<NButton text size="small" @click="toolsOpen = true">查看处理方式</NButton>
|
||||
<span
|
||||
>首帧待更新 {{ staleKeyframes }} · 视频待更新 {{ staleVideos }} · 身份待确认 {{ identityBlocked }}</span
|
||||
>
|
||||
</div>
|
||||
<div v-if="shots.length" class="panel production-workspace workspace-surface">
|
||||
<nav class="production-shot-list directory-panel" aria-label="本集生产镜头">
|
||||
@@ -791,7 +770,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
>
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div>
|
||||
<p class="eyebrow">BEAT {{ shot.beatNo }} / SHOT {{ shot.shotNo }}</p>
|
||||
<p class="eyebrow">段落 {{ shot.beatNo }} · 镜头 {{ shot.shotNo }}</p>
|
||||
<h3 class="mt-2 text-lg font-semibold">{{ shot.title }}</h3>
|
||||
</div>
|
||||
<StatusBadge
|
||||
@@ -801,7 +780,6 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
/>
|
||||
</div>
|
||||
<p v-if="shot.description" class="mt-3 text-sm leading-7">{{ shot.description }}</p>
|
||||
<p class="mt-3 break-all font-mono text-[10px] text-muted">Shot ID · {{ shot.shotId }}</p>
|
||||
<NAlert
|
||||
v-if="videoStatusItem?.status === 'failed'"
|
||||
type="error"
|
||||
@@ -814,17 +792,20 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</p>
|
||||
<p v-else-if="videoStatusItem.retryable === true" class="mt-2">此任务可以重试。</p>
|
||||
</NAlert>
|
||||
<StaleKeyframeNotice
|
||||
v-if="selectedKeyframeStale"
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot-id="shot.shotId"
|
||||
:issues="selectedIssues"
|
||||
:inconsistent="
|
||||
keyframeItem?.primaryKeyframeStale === false &&
|
||||
selectedIssues.some(issue => issue.code === 'stale_keyframe')
|
||||
"
|
||||
/>
|
||||
<NCollapse v-if="selectedKeyframeStale" class="mt-3">
|
||||
<NCollapseItem title="首帧需要更新 · 查看相关素材" name="stale-keyframe">
|
||||
<StaleKeyframeNotice
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot-id="shot.shotId"
|
||||
:issues="selectedIssues"
|
||||
:inconsistent="
|
||||
keyframeItem?.primaryKeyframeStale === false &&
|
||||
selectedIssues.some(issue => issue.code === 'stale_keyframe')
|
||||
"
|
||||
/>
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
<NAlert
|
||||
v-if="videoItem?.primaryVideoStale"
|
||||
role="status"
|
||||
@@ -860,7 +841,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<EmptyState
|
||||
v-else-if="query.data.value"
|
||||
title="本集还没有正式镜头"
|
||||
description="先完成剧本拆解、导演设计与正式镜头持久化,再进入镜头生产。"
|
||||
description="先完成剧本拆解和分镜设计,再进入镜头生产。"
|
||||
>
|
||||
<RouterLink :to="`/projects/${id}/storyboard`" class="button button-secondary">前往分镜设计</RouterLink>
|
||||
</EmptyState>
|
||||
@@ -987,7 +968,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
}
|
||||
}
|
||||
.workspace-inline-status {
|
||||
@apply flex items-center flex-wrap justify-between gap-y-2 gap-x-4 py-[7px] px-3 shrink-0 rounded-none bg-(--app-subtle) text-xs;
|
||||
@apply flex items-center flex-wrap justify-between gap-y-2 gap-x-4 py-[10px] px-3 shrink-0 rounded-none bg-(--app-subtle) text-xs;
|
||||
}
|
||||
.production-workspace {
|
||||
@apply flex-1 min-h-0 items-stretch overflow-hidden;
|
||||
|
||||
@@ -78,10 +78,10 @@ const confirmationDescription = computed(
|
||||
Prompt,但会在视频生成前正常停止,不向视频 Provider 提交任务。
|
||||
</p>
|
||||
<!-- 以下是生产范围配置模块,修改任一参数后须重新预检。 -->
|
||||
<div class="surface-inset mt-3 p-3">
|
||||
<div class="surface-inset mt-4 p-4">
|
||||
<NCheckbox v-model:checked="safeMode">测试安全模式(不生成视频)</NCheckbox>
|
||||
<!-- 以下是本轮断点与生成上限模块。 -->
|
||||
<div class="mt-3 grid grid-cols-2 gap-3 text-xs">
|
||||
<div class="advanced-production-fields">
|
||||
<label
|
||||
>起始阶段<NSelect
|
||||
v-model:value="startFrom"
|
||||
@@ -228,3 +228,16 @@ const confirmationDescription = computed(
|
||||
</NCollapseItem></NCollapse
|
||||
>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@reference "../../../styles/styles.css";
|
||||
|
||||
/* 串联生产表单统一标签间距与行列间距,窄屏改为单列。 */
|
||||
.advanced-production-fields {
|
||||
@apply mt-4 grid grid-cols-1 gap-x-5 gap-y-4 text-xs sm:grid-cols-2;
|
||||
}
|
||||
|
||||
.advanced-production-fields > label {
|
||||
@apply flex min-w-0 flex-col gap-2;
|
||||
}
|
||||
</style>
|
||||
@@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import IssueHint from '../../../components/ui/IssueHint.vue'
|
||||
import { productionMessage } from '../production-messages'
|
||||
import { computed } from 'vue'
|
||||
import { BadgeCheck } from '@lucide/vue'
|
||||
import { NAlert, NButton, NTag } from 'naive-ui'
|
||||
@@ -47,11 +49,11 @@ const canSelect = computed(
|
||||
<NTag v-else-if="validationPassed === false" size="small" type="error" :bordered="false"
|
||||
>质量未通过</NTag
|
||||
>
|
||||
<NTag v-if="item.source === 'provider_variant'" size="small" :bordered="false">模型输入变体</NTag>
|
||||
<NTag v-if="item.source === 'provider_variant'" size="small" :bordered="false">视频参考图</NTag>
|
||||
<NTag v-if="item.isPrimary && stale" size="small" :bordered="false">已过期</NTag>
|
||||
<span class="text-[10px] text-muted">{{ item.width || '—' }} × {{ item.height || '—' }}</span>
|
||||
</div>
|
||||
<p v-if="item.error" class="mt-2 line-clamp-3 text-xs text-danger">{{ item.error }}</p>
|
||||
<IssueHint v-if="item.error" :messages="[productionMessage(item.error)]" type="error" />
|
||||
<p class="mt-2 text-[10px] text-muted">{{ formatDate(item.createdAt) }}</p>
|
||||
<div v-if="item.status === 'completed' && item.imageUrl" class="mt-2 flex flex-wrap items-center gap-3">
|
||||
<NButton text size="small" @click="emit('quality')">
|
||||
|
||||
@@ -40,7 +40,7 @@ const records = computed(() =>
|
||||
<ReadonlyInspection
|
||||
v-model:open="open"
|
||||
title="首帧校验历史"
|
||||
description="读取已有记录不产生费用;历史通过不会自动晋升,也不保证当前素材仍然一致。"
|
||||
description="查看记录不收费;设置主首帧前仍需完成本次检查。"
|
||||
:loading="query.loading.value"
|
||||
:error="query.error.value"
|
||||
@refresh="query.refresh"
|
||||
|
||||
@@ -54,7 +54,7 @@ async function inspect() {
|
||||
</script>
|
||||
<template>
|
||||
<section class="mt-4 text-xs">
|
||||
<NButton size="small" :loading="loading" :disabled="loading" @click="inspect">查看后端模型能力</NButton>
|
||||
<NButton size="small" :loading="loading" :disabled="loading" @click="inspect">查看模型限制</NButton>
|
||||
<NAlert v-if="error" type="error" :show-icon="false" class="mt-3">{{ error }}</NAlert>
|
||||
<template v-if="providers">
|
||||
<p v-if="!providers.some(item => item.active)" class="mt-2 text-danger">
|
||||
|
||||
@@ -50,10 +50,8 @@ async function inspect() {
|
||||
|
||||
<template>
|
||||
<section class="surface-inset mt-4 p-4" aria-label="视频模型最终输入检查">
|
||||
<h4 class="text-sm font-medium">按模型检查实际输入</h4>
|
||||
<p class="mt-2 text-xs text-muted">
|
||||
填写后端使用的视频模型标识,检查实际首帧与授权素材。只读查询,不产生生成费用。
|
||||
</p>
|
||||
<h4 class="text-sm font-medium">检查视频素材</h4>
|
||||
<p class="mt-2 text-xs text-muted">输入模型名称,检查素材是否满足要求。查看不收费。</p>
|
||||
<div class="mt-3 flex flex-wrap gap-2">
|
||||
<NInput
|
||||
v-model:value="provider"
|
||||
|
||||
@@ -366,9 +366,6 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
: '仅校验,不修改主资产。'
|
||||
}}</template>
|
||||
</NAlert>
|
||||
<NCheckbox v-model:checked="acknowledged" :disabled="pending" class="mt-4"
|
||||
>我已确认费用、处理范围,且同项目没有其他生成任务。</NCheckbox
|
||||
>
|
||||
</AppForm>
|
||||
<p v-if="pending" role="status" class="mt-3 text-xs text-muted">{{ operation.label }}进行中,请勿重复提交。</p>
|
||||
<NAlert v-if="session.error" role="alert" type="error" :show-icon="false" class="mt-4">{{
|
||||
@@ -403,15 +400,23 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
<p v-if="target?.kind !== 'batch'" class="mt-3 text-xs text-muted">
|
||||
本会话回执可导出;首帧已有校验可在历史中只读查看,后台质量任务刷新后继续恢复。
|
||||
</p>
|
||||
<!-- 以下是底栏左侧费用确认与右侧操作按钮模块 -->
|
||||
<template #footer>
|
||||
<NButton @click="open = false">关闭</NButton>
|
||||
<NButton
|
||||
type="primary"
|
||||
:loading="pending"
|
||||
:disabled="blocked || !acknowledged || !repairAvailable"
|
||||
@click="formRef?.validate(submit)"
|
||||
>{{ label }}</NButton
|
||||
>
|
||||
<div class="quality-dialog-footer">
|
||||
<NCheckbox v-model:checked="acknowledged" :disabled="pending" class="quality-dialog-acknowledgement"
|
||||
>我已确认费用、处理范围,且同项目没有其他生成任务。</NCheckbox
|
||||
>
|
||||
<div class="quality-dialog-actions">
|
||||
<NButton @click="open = false">关闭</NButton>
|
||||
<NButton
|
||||
type="primary"
|
||||
:loading="pending"
|
||||
:disabled="blocked || !acknowledged || !repairAvailable"
|
||||
@click="formRef?.validate(submit)"
|
||||
>{{ label }}</NButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</AppDialog>
|
||||
</template>
|
||||
@@ -422,4 +427,19 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
.quality-fields {
|
||||
@apply grid grid-cols-[repeat(auto-fit,_minmax(min(100%,_180px),_1fr))] items-start gap-4;
|
||||
}
|
||||
|
||||
/* 确认项固定在底栏左侧,操作按钮在右侧;窄屏允许分行。 */
|
||||
.app-dialog .dialog-footer:has(> .quality-dialog-footer) {
|
||||
@apply w-full;
|
||||
}
|
||||
.quality-dialog-footer {
|
||||
@apply flex w-full flex-wrap items-center justify-between gap-4;
|
||||
}
|
||||
.quality-dialog-acknowledgement {
|
||||
@apply min-w-0 flex-1;
|
||||
flex-basis: 360px;
|
||||
}
|
||||
.quality-dialog-actions {
|
||||
@apply ml-auto flex shrink-0 items-center gap-2;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import IssueHint from '../../../components/ui/IssueHint.vue'
|
||||
import { useActionMessage } from '../../../components/ui/useActionMessage'
|
||||
import ProviderInputInspector from './ProviderInputInspector.vue'
|
||||
import { NAlert, NButton, NCollapse, NCollapseItem, NSelect, NTag } from 'naive-ui'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { computed, onScopeDispose, ref, watch } from 'vue'
|
||||
import { ExternalLink, ImagePlus, RefreshCw } from '@lucide/vue'
|
||||
import { AssetImage, StatusBadge } from '../../../components/ui'
|
||||
import { usePolling } from '../../../composables/usePolling'
|
||||
@@ -13,14 +15,8 @@ import { storyboardApi } from '../../storyboard/api'
|
||||
import ConfirmAction from '../../workflows/ConfirmAction.vue'
|
||||
import { runOperation } from '../../workflows/operations'
|
||||
import { productionApi } from '../api'
|
||||
import {
|
||||
isActiveVideo,
|
||||
issueLabel,
|
||||
primaryKeyframe,
|
||||
primaryVideo,
|
||||
productionStatusLabel,
|
||||
videoQualityStatusLabel
|
||||
} from '../model'
|
||||
import { isActiveVideo, primaryKeyframe, primaryVideo, productionStatusLabel, videoQualityStatusLabel } from '../model'
|
||||
import { productionIssueText, productionMessage } from '../production-messages'
|
||||
import type {
|
||||
GenerateKeyframeInput,
|
||||
KeyframeReadinessItem,
|
||||
@@ -48,6 +44,14 @@ import type {
|
||||
} from '../../generation-config/types'
|
||||
import GenerationModelControls from '../../generation-config/components/GenerationModelControls.vue'
|
||||
|
||||
/** 当前页面操作反馈使用消息提示,不长期占据正文。 */
|
||||
const actionMessage = useActionMessage()
|
||||
/** 离开镜头后忽略迟到的手动读取反馈。 */
|
||||
let disposed = false
|
||||
onScopeDispose(() => {
|
||||
disposed = true
|
||||
})
|
||||
|
||||
/** 单镜头生产面板只负责正式资产,不修改上游导演设计与即时状态。 */
|
||||
const props = defineProps<{
|
||||
/** 当前正式项目 ID。 */
|
||||
@@ -123,6 +127,10 @@ const promptQuery = usePolling(key, (shotId, signal) => storyboardApi.videoPromp
|
||||
const savedPrompt = computed(() => (promptQuery.data.value?.shotId === key.value ? promptQuery.data.value : null))
|
||||
/** 当前视频生成规格的首帧和主体参考图,独立查询避免影响资产列表。 */
|
||||
const videoInputQuery = usePolling(key, (shotId, signal) => productionApi.videoGenerationSpec(shotId, signal), false)
|
||||
/** 素材查询问题与就绪检查使用同一中文说明,避免重复展示后端术语。 */
|
||||
const videoInputError = computed(() => productionMessage(videoInputQuery.error.value))
|
||||
/** 视频准备问题按实际含义去重,保留所有不同的处理建议。 */
|
||||
const videoIssueMessages = computed(() => [...new Set((props.videoReadiness?.issues ?? []).map(productionIssueText))])
|
||||
const currentVideoInput = computed(() =>
|
||||
videoInputQuery.data.value?.shotId === key.value ? videoInputQuery.data.value : null
|
||||
)
|
||||
@@ -263,6 +271,17 @@ async function refreshAll() {
|
||||
emit('changed')
|
||||
}
|
||||
|
||||
/** 手动更新素材时才反馈查询结果,切换镜头后不显示旧目标提示。 */
|
||||
async function refreshVideoInput() {
|
||||
if (videoInputQuery.loading.value) return
|
||||
const target = `${props.projectId}:${props.shot.shotId}`
|
||||
await videoInputQuery.refresh()
|
||||
if (disposed || target !== `${props.projectId}:${props.shot.shotId}`) return
|
||||
if (videoInputQuery.error.value)
|
||||
actionMessage?.warning(productionMessage(videoInputQuery.error.value), { duration: 7000, closable: true })
|
||||
else actionMessage?.success('视频素材已更新。', { duration: 3000 })
|
||||
}
|
||||
|
||||
/** 单镜头提示词根据现有状态决定是否 force 覆盖。 */
|
||||
async function generatePrompt() {
|
||||
if (!canGeneratePrompt.value) return
|
||||
@@ -413,11 +432,7 @@ async function inspectSpecs() {
|
||||
:label="productionStatusLabel(promptReadiness.status)"
|
||||
/>
|
||||
</div>
|
||||
<ul v-if="promptReadiness?.issues.length" class="mt-3 space-y-2 text-xs text-danger">
|
||||
<li v-for="issue in promptReadiness.issues" :key="issue.code">
|
||||
{{ issueLabel(issue.code) }}:{{ issue.reason }}
|
||||
</li>
|
||||
</ul>
|
||||
<IssueHint :messages="(promptReadiness?.issues ?? []).map(productionIssueText)" />
|
||||
<div v-if="savedPrompt?.videoPrompt" class="surface-inset mt-4 p-4" aria-label="本镜视频提示词">
|
||||
<p class="text-xs font-medium">本镜视频提示词</p>
|
||||
<p class="mt-3 whitespace-pre-wrap break-words text-sm leading-6">{{ savedPrompt.videoPrompt }}</p>
|
||||
@@ -465,14 +480,7 @@ async function inspectSpecs() {
|
||||
:label="keyframeStale ? '主首帧已过期' : productionStatusLabel(keyframeReadiness.status)"
|
||||
/>
|
||||
</div>
|
||||
<NAlert v-if="keyframeStale" role="status" type="info" :show-icon="false" class="mt-3 text-xs">
|
||||
当前主首帧使用的主体参考资产已经变化,旧图仍保留但不会继续进入视频生成。请重新生成主首帧。
|
||||
</NAlert>
|
||||
<ul v-if="keyframeReadiness?.issues.length" class="mt-3 space-y-2 text-xs text-danger">
|
||||
<li v-for="issue in keyframeReadiness.issues" :key="issue.code">
|
||||
{{ issueLabel(issue.code) }}:{{ issue.reason }}
|
||||
</li>
|
||||
</ul>
|
||||
<IssueHint :messages="(keyframeReadiness?.issues ?? []).map(productionIssueText)" />
|
||||
<div v-if="currentKeyframe" class="keyframe-grid mt-4">
|
||||
<KeyframeCard
|
||||
:item="currentKeyframe"
|
||||
@@ -533,29 +541,18 @@ async function inspectSpecs() {
|
||||
</div>
|
||||
<div v-if="videoInputPlan" class="mt-3 flex flex-wrap items-center gap-2 text-xs">
|
||||
<NTag size="small" :bordered="false" type="info">
|
||||
{{ videoInputPlan.inputMode === 'omni_reference' ? '全模态参考' : '首帧模式' }}
|
||||
{{ videoInputPlan.inputMode === 'omni_reference' ? '使用多张参考图' : '使用首帧' }}
|
||||
</NTag>
|
||||
<span class="text-muted">{{ videoInputPlan.reasons.join(';') }}</span>
|
||||
<span class="text-muted">{{ videoInputPlan.reasons.map(productionMessage).join(';') }}</span>
|
||||
</div>
|
||||
<NAlert v-else-if="query.data.value?.inputPlanError" type="warning" :show-icon="false" class="mt-3 text-xs">
|
||||
当前镜头输入规划暂不可用;请先处理视频就绪问题后刷新。
|
||||
</NAlert>
|
||||
<NAlert v-if="videoStale" role="status" type="info" :show-icon="false" class="mt-3 text-xs">
|
||||
当前主视频使用的主首帧或主体参考图已经变化。旧视频仍保留;重新生成完成后,新视频会自动接替过期主视频。
|
||||
</NAlert>
|
||||
<ul v-if="videoReadiness?.issues.length" class="mt-3 space-y-2 text-xs text-danger">
|
||||
<li v-for="issue in videoReadiness.issues" :key="issue.code">
|
||||
{{ issueLabel(issue.code) }}:{{ issue.reason }}
|
||||
</li>
|
||||
</ul>
|
||||
<IssueHint :messages="videoIssueMessages" />
|
||||
<section class="surface-inset mt-4 p-4" aria-label="当前视频生成素材引用">
|
||||
<div class="flex flex-wrap items-center justify-between gap-2">
|
||||
<h6 class="text-xs font-medium">当前视频生成素材引用</h6>
|
||||
<h6 class="text-xs font-medium">视频使用的素材</h6>
|
||||
<span v-if="currentVideoInput" class="text-[11px] text-muted">
|
||||
主首帧 1 张 · 主体参考图 {{ currentVideoInput.references.length }} 张
|
||||
首帧 1 张 · 参考图 {{ currentVideoInput.references.length }} 张
|
||||
</span>
|
||||
</div>
|
||||
<p class="mt-2 text-xs text-muted">以下是当前镜头的生成输入;已生成的视频可能使用更早的素材。</p>
|
||||
<div v-if="currentVideoInput" class="video-input-grid mt-4">
|
||||
<article class="video-input-card">
|
||||
<div class="video-input-image">
|
||||
@@ -604,38 +601,38 @@ async function inspectSpecs() {
|
||||
正在读取视频生成素材…
|
||||
</p>
|
||||
<div v-else class="mt-4 text-xs text-muted">
|
||||
<p>当前生成规格尚未就绪,请检查视频提示词、主首帧与主体参考图。</p>
|
||||
<p v-if="videoInputQuery.error.value" class="mt-2 break-words">{{ videoInputQuery.error.value }}</p>
|
||||
<NButton
|
||||
v-if="videoInputQuery.error.value"
|
||||
text
|
||||
size="small"
|
||||
class="mt-2"
|
||||
@click="videoInputQuery.refresh"
|
||||
>重新读取</NButton
|
||||
>
|
||||
<p>视频素材还未准备好,请先检查视频提示词、首帧和参考图。</p>
|
||||
<IssueHint v-if="!videoIssueMessages.length" :messages="videoInputError ? [videoInputError] : []" />
|
||||
<!-- 以下是重新获取素材的操作模块,与上下正文保持间距 -->
|
||||
<div v-if="videoInputQuery.error.value" class="mt-3 flex pb-1">
|
||||
<NButton text size="small" :loading="videoInputQuery.loading.value" @click="refreshVideoInput"
|
||||
>重新获取</NButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<NAlert
|
||||
<div
|
||||
v-if="videoQualityStatus && videoQualityStatus.status !== 'not_started'"
|
||||
:type="
|
||||
videoQualityStatus.status === 'passed'
|
||||
? 'success'
|
||||
: videoQualityStatus.status === 'exhausted'
|
||||
? 'error'
|
||||
: 'info'
|
||||
"
|
||||
:show-icon="false"
|
||||
class="mt-3 text-xs"
|
||||
class="mt-3 flex items-center gap-2"
|
||||
>
|
||||
{{ videoQualityStatusLabel(videoQualityStatus.status) }}
|
||||
<template v-if="videoQualityStatus.maxRepairAttempts !== null">
|
||||
· 修复 {{ videoQualityStatus.repairAttempt }} / {{ videoQualityStatus.maxRepairAttempts }}
|
||||
</template>
|
||||
<template v-if="videoQualityStatus.status === 'exhausted'">
|
||||
。请检查候选视频和校验结果,调整提示词或参考资产后再重新生成。
|
||||
</template>
|
||||
</NAlert>
|
||||
<NTag
|
||||
size="small"
|
||||
:type="
|
||||
videoQualityStatus.status === 'passed'
|
||||
? 'success'
|
||||
: videoQualityStatus.status === 'exhausted'
|
||||
? 'error'
|
||||
: 'info'
|
||||
"
|
||||
:bordered="false"
|
||||
>
|
||||
{{
|
||||
videoQualityStatus.status === 'passed'
|
||||
? '视频检查通过'
|
||||
: videoQualityStatusLabel(videoQualityStatus.status)
|
||||
}}
|
||||
</NTag>
|
||||
</div>
|
||||
<!-- 以下是当前镜头只读视频质量详情与失败归因模块 -->
|
||||
<VideoQualityDiagnostics :key="shot.shotId" :shot-id="shot.shotId" class="mt-3" />
|
||||
<div v-if="videos.length" class="video-grid mt-4">
|
||||
@@ -739,22 +736,22 @@ async function inspectSpecs() {
|
||||
@update:options="videoGenerationOptions = $event"
|
||||
/>
|
||||
<div class="generation-input-mode">
|
||||
<p class="generation-input-mode-label">输入模式</p>
|
||||
<p class="generation-input-mode-label">生成方式</p>
|
||||
<NSelect
|
||||
:value="videoInputModeOverride"
|
||||
:disabled="assetBlocked"
|
||||
:options="[
|
||||
{
|
||||
label: `自动(推荐:${videoInputPlan?.inputMode === 'omni_reference' ? '全模态参考' : '首帧模式'})`,
|
||||
label: `自动(推荐:${videoInputPlan?.inputMode === 'omni_reference' ? '多张参考图' : '首帧'})`,
|
||||
value: 'auto'
|
||||
},
|
||||
{ label: '首帧模式', value: 'first_frame' },
|
||||
{ label: '全模态参考', value: 'omni_reference' }
|
||||
{ label: '多张参考图', value: 'omni_reference' }
|
||||
]"
|
||||
@update:value="videoInputModeOverride = $event"
|
||||
/>
|
||||
<p class="mt-1.5 text-[11px] leading-5 text-muted">
|
||||
自动模式遵循后端 Planner;手动选择只影响当前镜头本次生成。
|
||||
自动选择合适的生成方式;手动选择只影响本次生成。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -785,17 +782,17 @@ async function inspectSpecs() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AppDialog v-model:open="specsOpen" title="生成规格与模型限制" description="只读检查,不调用生成模型。" wide>
|
||||
<AppDialog v-model:open="specsOpen" title="生成设置与模型限制" description="查看不收费。" wide>
|
||||
<NAlert v-if="specError" role="alert" type="error" :show-icon="false" class="mt-4">{{ specError }}</NAlert>
|
||||
<p v-if="inspecting" role="status" class="mt-4 text-xs text-muted">正在读取生成规格…</p>
|
||||
<ModelCapabilities :shot-id="shot.shotId" />
|
||||
<ProviderInputInspector :shot-id="shot.shotId" />
|
||||
<NCollapse v-if="keyframeSpec || videoSpec" class="mt-5 pt-4 text-xs" :default-expanded-names="['details']"
|
||||
<NCollapse v-if="keyframeSpec || videoSpec" class="mt-5 pt-4 text-xs"
|
||||
><NCollapseItem name="details"
|
||||
><template #header>本镜确定性生成规格</template>
|
||||
><template #header>查看生成描述</template>
|
||||
<div class="mt-4 grid gap-5 lg:grid-cols-2">
|
||||
<div v-if="keyframeSpec">
|
||||
<h5 class="font-medium">首帧 Prompt · {{ keyframeSpec.references.length }} 张参考图</h5>
|
||||
<h5 class="font-medium">首帧描述 · {{ keyframeSpec.references.length }} 张参考图</h5>
|
||||
<p class="mt-3 whitespace-pre-wrap leading-6 text-muted">{{ keyframeSpec.prompt }}</p>
|
||||
<ul v-if="keyframeSpec.references.length" class="mt-3 space-y-1 text-[11px] text-muted">
|
||||
<li
|
||||
@@ -803,27 +800,15 @@ async function inspectSpecs() {
|
||||
:key="`${reference.role}:${reference.imageId}`"
|
||||
>
|
||||
{{ reference.subjectRef }} ·
|
||||
{{ reference.role === 'identity-anchor' ? '演员身份母版' : '形态主图' }} ·
|
||||
<code>{{ reference.imageId }}</code>
|
||||
{{ reference.role === 'identity-anchor' ? '演员身份母版' : '形态主图' }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="videoSpec">
|
||||
<h5 class="font-medium">视频 Prompt · {{ videoSpec.durationSeconds }}s</h5>
|
||||
<h5 class="font-medium">视频描述 · {{ videoSpec.durationSeconds }} 秒</h5>
|
||||
<p class="mt-3 whitespace-pre-wrap leading-6 text-muted">{{ videoSpec.videoPrompt }}</p>
|
||||
<p v-if="videoSpec.negativePrompt" class="mt-3 whitespace-pre-wrap leading-6 text-muted">
|
||||
Negative prompt: {{ videoSpec.negativePrompt }}
|
||||
</p>
|
||||
<p class="mt-3 break-all font-mono text-[10px] text-muted">
|
||||
业务主首帧 ID · {{ videoSpec.keyframe.id }}
|
||||
</p>
|
||||
<p v-if="videoSpec.providerInputKeyframe" class="mt-2 break-all text-[10px] text-muted">
|
||||
通用规格首帧 ID(未指定模型) · {{ videoSpec.providerInputKeyframe.id }}
|
||||
{{
|
||||
videoSpec.providerInputKeyframe.source === 'provider_variant'
|
||||
? '(专用变体)'
|
||||
: '(业务主首帧)'
|
||||
}}
|
||||
不希望出现的内容: {{ videoSpec.negativePrompt }}
|
||||
</p>
|
||||
</div>
|
||||
</div></NCollapseItem
|
||||
@@ -844,7 +829,11 @@ async function inspectSpecs() {
|
||||
description="先完成质量检查;只有本会话校验通过的候选才能设为主首帧。"
|
||||
wide
|
||||
>
|
||||
<div v-if="keyframeCandidates.length" class="keyframe-grid mt-4">
|
||||
<!-- 以下是自适应等宽候选图网格模块,完整行与弹窗正文两侧对齐 -->
|
||||
<div
|
||||
v-if="keyframeCandidates.length"
|
||||
class="mt-4 grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-3 max-[760px]:grid-cols-2"
|
||||
>
|
||||
<KeyframeCard
|
||||
v-for="item in keyframeCandidates"
|
||||
:key="item.id"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { productionIssueText } from '../production-messages'
|
||||
import { computed } from 'vue'
|
||||
import { NAlert, NButton } from 'naive-ui'
|
||||
import { referenceLocation, referenceTargets } from '../asset-links'
|
||||
@@ -12,8 +13,9 @@ const references = useShotReferences(
|
||||
computed(() => props.shotId)
|
||||
)
|
||||
const targets = computed(() => referenceTargets(references.data.value, props.issues))
|
||||
/** 以普通用户可以理解的原因说明当前首帧需要更新。 */
|
||||
const reasons = computed(() => [
|
||||
...new Set(props.issues.filter(issue => issue.code === 'stale_keyframe').map(issue => issue.reason))
|
||||
...new Set(props.issues.filter(issue => issue.code === 'stale_keyframe').map(productionIssueText))
|
||||
])
|
||||
const precise = computed(() =>
|
||||
props.issues.some(issue => issue.code === 'stale_keyframe' && issue.missingSubjects?.length)
|
||||
@@ -27,15 +29,11 @@ const precise = computed(() =>
|
||||
class="mt-4 text-xs"
|
||||
:title="inconsistent ? '主首帧状态待核对' : '主首帧已过期'"
|
||||
>
|
||||
<p v-if="inconsistent">
|
||||
首帧检查未标记过期,但视频检查报告参考资产已变化。两项后端检查结果不一致,请先核对下列素材与身份母版,不建议直接重复生图;视频仍会按后端检查阻止提交。
|
||||
</p>
|
||||
<p v-else>
|
||||
当前参考资产与生成该首帧时不一致,旧首帧需重建。素材本身不一定过期,请先核对关联素材;确认有效后返回本镜头重新生成主首帧。
|
||||
</p>
|
||||
<p v-if="inconsistent">首帧与视频准备状态不一致,请先核对相关素材,再决定是否更新首帧。</p>
|
||||
<p v-else>请先核对相关参考图,再重新生成并检查首帧。</p>
|
||||
<p v-for="reason in reasons" :key="reason" class="mt-2">{{ reason }}</p>
|
||||
<p class="mt-3 font-medium">
|
||||
{{ precise ? '定位后端标记的变更主体' : '核对本镜头关联素材(后端未返回具体变更项)' }}
|
||||
{{ precise ? '需要核对的素材' : '本镜头的相关素材' }}
|
||||
</p>
|
||||
<div class="mt-2 flex flex-wrap items-center gap-3">
|
||||
<RouterLink
|
||||
|
||||
@@ -54,7 +54,7 @@ function rollbackLabel(target: VideoQualityRollbackTarget) {
|
||||
<ReadonlyInspection
|
||||
v-model:open="open"
|
||||
title="视频质量详情"
|
||||
description="读取已有校验链和失败归因,不重新校验或生成视频。"
|
||||
description="查看检查结果和修改建议,不收费。"
|
||||
:loading="query.loading.value"
|
||||
:error="query.error.value"
|
||||
@refresh="query.refresh"
|
||||
|
||||
@@ -39,7 +39,11 @@ export function isActiveVideo(item: ShotVideo): boolean {
|
||||
return ['pending', 'queued', 'running'].includes(item.status)
|
||||
}
|
||||
|
||||
/** 就绪问题转为用户可直接理解的短标签;页面不暴露服务端实现术语。 */
|
||||
/**
|
||||
* 就绪问题转为可直接理解的中文短标签,未知问题仍显示明确提示。
|
||||
* @param code 后端就绪问题码
|
||||
* @returns 页面显示的中文问题标签
|
||||
*/
|
||||
export function issueLabel(code: ProductionIssueCode): string {
|
||||
const labels: Record<ProductionIssueCode, string> = {
|
||||
invalid_generation_spec: '生成规格不完整',
|
||||
@@ -53,9 +57,10 @@ export function issueLabel(code: ProductionIssueCode): string {
|
||||
stale_prompt: '视频提示词需要更新',
|
||||
provider_input_recovery: '视频模型输入需要处理',
|
||||
missing_keyframe: '缺少主首帧',
|
||||
stale_keyframe: '主首帧已过期'
|
||||
stale_keyframe: '主首帧已过期',
|
||||
failed_keyframe_quality: '首帧画面检查未通过'
|
||||
}
|
||||
return labels[code]
|
||||
return labels[code] ?? '生成条件需要完善'
|
||||
}
|
||||
|
||||
/** 生产状态中文标签,未知值由状态组件回退显示原文。 */
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import { issueLabel } from './model'
|
||||
import type { ProductionIssue } from './types'
|
||||
|
||||
/**
|
||||
* 把后端生产原因转换为普通用户可读的中文提示。
|
||||
* @param message 后端原始说明或错误信息
|
||||
* @returns 页面展示的中文说明
|
||||
*/
|
||||
export function productionMessage(message: string): string {
|
||||
const text = message.trim()
|
||||
if (!text) return ''
|
||||
if (
|
||||
/(?:Primary Keyframe|主首帧|首帧)/i.test(text) &&
|
||||
/(?:视觉|画面)(?:质量)?(?:校验|检查).*?(?:未通过|失败)/.test(text)
|
||||
)
|
||||
return '首帧画面检查未通过,请重新生成或修复首帧。'
|
||||
if (/(?:Video Prompt|视频提示词).*未绑定.*(?:Primary Keyframe|首帧)/i.test(text))
|
||||
return '视频提示词与当前首帧不一致,请重新生成视频提示词。'
|
||||
if (/空间目标绑定.*(?:变化|变更|调整)/.test(text)) return '镜头画面设置已调整,请重新生成并检查首帧。'
|
||||
if (/缺少.*(?:Primary Keyframe|主首帧)/i.test(text)) return '还没有可用首帧,请先生成并确认首帧。'
|
||||
if (/(?:Primary Keyframe|主首帧).*(?:过期|旧版|参考资产.*变化)/i.test(text))
|
||||
return '当前首帧需要更新,请重新生成并检查首帧。'
|
||||
if (/fetch failed|failed to fetch|network error/i.test(text)) return '暂时无法连接服务,请稍后重新获取。'
|
||||
const translated = text
|
||||
.replace(/Storyboard Shot/gi, '镜头')
|
||||
.replace(/Primary Keyframe/gi, '首帧')
|
||||
.replace(/Video Prompt/gi, '视频提示词')
|
||||
.replace(/Motion Plan/gi, '动作设计')
|
||||
.replace(/Identity Anchor/gi, '身份母版')
|
||||
.replace(/SubjectForm/gi, '主体形态')
|
||||
.replace(/Provider/gi, '生成模型')
|
||||
.replace(/\bShot\b/gi, '镜头')
|
||||
.replace(/服务器内部错误[::]?\s*/g, '')
|
||||
.replace(/\s*[::]?\s*\bc[a-z0-9]{20,}\b/g, '')
|
||||
.trim()
|
||||
return /[\u4e00-\u9fff]/.test(translated) ? translated : '暂时无法读取生成信息,请稍后重新获取。'
|
||||
}
|
||||
|
||||
/**
|
||||
* 将就绪检查问题转换为页面说明,不改变原始问题数据。
|
||||
* @param issue 后端结构化就绪问题
|
||||
* @returns 页面展示的原因与处理建议
|
||||
*/
|
||||
export function productionIssueText(issue: ProductionIssue): string {
|
||||
if (issue.code === 'failed_keyframe_quality') return '首帧画面检查未通过,请重新生成或修复首帧。'
|
||||
return productionMessage(issue.reason) || issueLabel(issue.code)
|
||||
}
|
||||
@@ -17,6 +17,8 @@ export type ProductionIssueCode =
|
||||
| 'provider_input_recovery'
|
||||
| 'missing_keyframe'
|
||||
| 'stale_keyframe'
|
||||
/** 当前主首帧最新画面检查未通过。 */
|
||||
| 'failed_keyframe_quality'
|
||||
|
||||
/** 就绪检查中的具体阻塞原因;部分参考图问题会附带主体引用。 */
|
||||
export interface ProductionIssue {
|
||||
|
||||
@@ -44,7 +44,7 @@ export async function checkPipeline(projectId: string, scope: ProductionStartInp
|
||||
const issues: string[] = []
|
||||
if (plan.entryReadiness && !plan.entryReadiness.ready)
|
||||
issues.push(plan.entryReadiness.reason || '项目尚未满足生产入口条件。')
|
||||
if (!profile) issues.push('尚未配置项目画布与生成模型,请先在批量生产工具中保存配置。')
|
||||
if (!profile) issues.push('尚未配置项目画布与生成模型,请先在右上角“项目配置”中保存配置。')
|
||||
const shotIds = new Set(plan.details.keyframes.map(item => item.shotId))
|
||||
if (
|
||||
shotIds.size !== plan.keyframes.total ||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, onScopeDispose, provide, ref, watch, watchEffect } from 'vue'
|
||||
import { computed, h, inject, onScopeDispose, provide, ref, watch, watchEffect } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { NScrollbar, NAlert, NButton, NPageHeader, NSpin, NEllipsis } from 'naive-ui'
|
||||
import { EmptyState } from '../../components/ui'
|
||||
@@ -9,6 +9,8 @@ import { projectAccessKey, projectSectionFromPath, type ProjectAccess } from './
|
||||
import { useProjectStageAccess } from './useProjectStageAccess'
|
||||
import { useWorkflowExecution } from '../workflows/execution'
|
||||
import { clearEpisodeSourceInvalidations, invalidateEpisodeSource } from '../storyboard/model'
|
||||
import { useActionMessage } from '../../components/ui/useActionMessage'
|
||||
import { productionMessage } from '../production/production-messages'
|
||||
import ProjectSettingsDialog from '../generation-config/components/ProjectSettingsDialog.vue'
|
||||
import { projectGenerationRevisionKey } from '../generation-config/context'
|
||||
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
|
||||
@@ -140,6 +142,48 @@ const operationGuide = computed<OperationGuide | null>(() => {
|
||||
return { title: '操作未完成', description: error }
|
||||
})
|
||||
|
||||
/** 镜头工作区的操作结果只在用户发起操作后显示,不在进入页面时重放旧提示。 */
|
||||
const actionMessage = useActionMessage()
|
||||
/** 分镜和生产页保留必要进度,操作成功或失败改用临时消息。 */
|
||||
const quietFeedback = computed(() => currentSection.value === 'production' || currentSection.value === 'storyboard')
|
||||
/** 只通知仍在当前项目的真实新结果,不把任务提交当作素材生成完成。 */
|
||||
watch(
|
||||
() => [id.value, operation.value.error, operation.value.notice] as const,
|
||||
([projectId, error, notice], [previousProject, previousError, previousNotice]) => {
|
||||
if (!quietFeedback.value || projectId !== previousProject) return
|
||||
if (error && error !== previousError) {
|
||||
const guide = operationGuide.value
|
||||
const content = productionMessage(error)
|
||||
actionMessage?.error(
|
||||
() =>
|
||||
h('div', { class: 'flex max-w-[min(600px,calc(100vw-48px))] flex-wrap items-center gap-3' }, [
|
||||
h('span', content),
|
||||
guide?.action
|
||||
? h(
|
||||
NButton,
|
||||
{
|
||||
text: true,
|
||||
size: 'small',
|
||||
onClick: () => {
|
||||
if (id.value === projectId && operation.value.error === error)
|
||||
resolveOperationError()
|
||||
}
|
||||
},
|
||||
() => guide.action
|
||||
)
|
||||
: null
|
||||
]),
|
||||
{ duration: 8000, closable: true }
|
||||
)
|
||||
} else if (notice && notice !== previousNotice) {
|
||||
if (/生成|提交/.test(operation.value.label))
|
||||
actionMessage?.info('任务已提交,完成后会显示结果。', { duration: 4000 })
|
||||
else actionMessage?.success('操作已完成。', { duration: 3000 })
|
||||
}
|
||||
},
|
||||
{ flush: 'post' }
|
||||
)
|
||||
|
||||
/** 已知前置条件直接送达对应工作区;保留当前页面,修复后可继续原操作。 */
|
||||
function resolveOperationError() {
|
||||
const target = operationGuide.value?.target
|
||||
@@ -191,7 +235,7 @@ onScopeDispose(() => {
|
||||
</NPageHeader>
|
||||
</header>
|
||||
<NScrollbar
|
||||
v-if="context.error.value || operation.pending || operation.error || operation.notice"
|
||||
v-if="context.error.value || operation.pending || (!quietFeedback && (operation.error || operation.notice))"
|
||||
class="project-notices"
|
||||
content-class="project-notices-content"
|
||||
>
|
||||
@@ -204,7 +248,7 @@ onScopeDispose(() => {
|
||||
<NAlert v-if="operation.pending" :show-icon="false" role="status"
|
||||
>{{ operation.label || '后台制作任务执行中' }}。可切换页面查看结果,请勿重复提交。</NAlert
|
||||
>
|
||||
<NAlert v-if="operationGuide" type="error" :show-icon="false" class="operation-guide">
|
||||
<NAlert v-if="operationGuide && !quietFeedback" type="error" :show-icon="false" class="operation-guide">
|
||||
<div class="operation-guide-content">
|
||||
<div>
|
||||
<strong>{{ operationGuide.title }}</strong>
|
||||
@@ -215,7 +259,9 @@ onScopeDispose(() => {
|
||||
}}</NButton>
|
||||
</div>
|
||||
</NAlert>
|
||||
<NAlert v-if="operation.notice" :show-icon="false" role="status">{{ operation.notice }}</NAlert>
|
||||
<NAlert v-if="operation.notice && !quietFeedback" :show-icon="false" role="status">{{
|
||||
operation.notice
|
||||
}}</NAlert>
|
||||
</NScrollbar>
|
||||
<WorkflowExecutionPanel
|
||||
v-if="isCreation && createDramaExecution.executionId.value"
|
||||
|
||||
@@ -19,11 +19,8 @@ import SubjectCoverageAudit from './components/SubjectCoverageAudit.vue'
|
||||
import type { SubjectCoverageIssue } from './coverage.types'
|
||||
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
|
||||
import { useStoryboard } from './useStoryboard'
|
||||
import { useProjectContext } from '../projects/context'
|
||||
|
||||
const detailTab = ref('design')
|
||||
const projectContext = useProjectContext()
|
||||
const stageComplete = computed(() => projectContext.stageReadiness.value?.storyboard.ready === true)
|
||||
|
||||
/** 分镜工作区按单集查看正式数据,生成配置与镜头检查分开。 */
|
||||
const {
|
||||
@@ -59,7 +56,7 @@ const coverage = computed(() => [
|
||||
total: data.value?.directions.shotCount ?? 0
|
||||
},
|
||||
{
|
||||
title: '即时状态',
|
||||
title: '画面状态',
|
||||
count: data.value?.visualStates.visualStateCount ?? 0,
|
||||
total: data.value?.visualStates.shotCount ?? 0
|
||||
}
|
||||
@@ -148,10 +145,6 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<NAlert v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||
</NAlert>
|
||||
<NAlert v-if="stageComplete" type="success" :show-icon="false">
|
||||
分镜设计已经准备完成,可以继续生成首帧、视频提示词和视频。
|
||||
<RouterLink :to="`/projects/${id}/production`" class="text-button ml-2">继续镜头生产 →</RouterLink>
|
||||
</NAlert>
|
||||
</template>
|
||||
<template #header
|
||||
><div class="workspace-toolbar">
|
||||
@@ -438,7 +431,7 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<h3>
|
||||
镜头目录 <span>{{ shots.length }} 镜</span>
|
||||
</h3>
|
||||
<span>按 Beat 排列</span>
|
||||
<span>按段落排列</span>
|
||||
</div>
|
||||
<NScrollbar
|
||||
class="panel-scroll directory-scroll"
|
||||
@@ -462,7 +455,7 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<NScrollbar v-if="shot" class="panel-scroll" content-class="p-5 lg:p-7">
|
||||
<header class="mb-6">
|
||||
<p class="eyebrow">
|
||||
BEAT {{ shot.beatNo }} / SHOT {{ shot.shotNo }}
|
||||
段落 {{ shot.beatNo }} · 镜头 {{ shot.shotNo }}
|
||||
<span v-if="shot.durationSeconds" class="ml-3">{{ shot.durationSeconds }}s</span>
|
||||
</p>
|
||||
<h3 class="mt-2 text-lg font-semibold">{{ shot.title }}</h3>
|
||||
@@ -472,10 +465,6 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<p v-if="shot.visualFocus" class="mt-2 text-xs leading-6 text-muted">
|
||||
视觉重点:{{ shot.visualFocus }}
|
||||
</p>
|
||||
<p class="mt-3 break-all font-mono text-[10px] text-muted">Shot ID · {{ shot.shotId }}</p>
|
||||
<p v-if="!episodeSourceUnavailable" class="mt-1 text-[10px] text-muted">
|
||||
标题与剧情描述取自最近可用 Breakdown 快照;以下设计与状态取自数据库。
|
||||
</p>
|
||||
</header>
|
||||
<div>
|
||||
<NTabs v-model:value="detailTab" type="line" size="small" aria-label="镜头详情"
|
||||
@@ -504,7 +493,7 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<EmptyState
|
||||
v-else-if="data"
|
||||
title="本集还没有正式分镜"
|
||||
description="先完成剧本拆解与分镜持久化,再回来生成导演设计和即时状态。"
|
||||
description="先完成剧本拆解,再回来完善镜头设计和画面状态。"
|
||||
><RouterLink :to="`/projects/${id}/breakdown`" class="button button-secondary mt-4"
|
||||
>前往拆解</RouterLink
|
||||
></EmptyState
|
||||
|
||||
@@ -32,7 +32,7 @@ const groups = computed(() => {
|
||||
:aria-labelledby="`${directoryId}-beat-${group.beatNo}`"
|
||||
>
|
||||
<h4 :id="`${directoryId}-beat-${group.beatNo}`" class="directory-group-heading">
|
||||
<span>BEAT {{ String(group.beatNo).padStart(2, '0') }}</span>
|
||||
<span>段落 {{ String(group.beatNo).padStart(2, '0') }}</span>
|
||||
<span class="directory-group-count">{{ group.shots.length }} 镜</span>
|
||||
</h4>
|
||||
<div class="beat-directory-items">
|
||||
@@ -41,13 +41,13 @@ const groups = computed(() => {
|
||||
:key="shot.shotId"
|
||||
:active="activeId === shot.shotId"
|
||||
:class="itemClass"
|
||||
:aria-label="`BEAT ${group.beatNo} · 镜头 ${shot.shotNo} · ${shot.title}`"
|
||||
:aria-label="`段落 ${group.beatNo} · 镜头 ${shot.shotNo} · ${shot.title}`"
|
||||
@click="emit('select', shot.shotId)"
|
||||
>
|
||||
{{ shot.title }}
|
||||
<template #eyebrow>
|
||||
<!-- 窄屏目录变为横向条目时补回归属,桌面不重复显示分组编号。 -->
|
||||
<span class="directory-mobile-beat">BEAT {{ String(group.beatNo).padStart(2, '0') }} / </span>
|
||||
<span class="directory-mobile-beat">段落 {{ String(group.beatNo).padStart(2, '0') }} / </span>
|
||||
<span class="directory-shot-number">镜头 {{ String(shot.shotNo).padStart(2, '0') }}</span>
|
||||
</template>
|
||||
<template #meta><slot name="meta" :shot="shot" /></template>
|
||||
|
||||
@@ -10,9 +10,7 @@ defineProps<{ shot: DesignedShot }>()
|
||||
<template>
|
||||
<div class="space-y-7">
|
||||
<section>
|
||||
<h3 class="mb-4 text-sm font-semibold">
|
||||
导演摄影设计 <span class="ml-2 font-mono text-[10px] font-normal text-muted">Direction</span>
|
||||
</h3>
|
||||
<h3 class="mb-4 text-sm font-semibold">导演摄影设计</h3>
|
||||
<template v-if="shot.direction"
|
||||
><div class="mb-5 flex flex-wrap gap-2">
|
||||
<NTag
|
||||
@@ -41,9 +39,7 @@ defineProps<{ shot: DesignedShot }>()
|
||||
<p v-else class="text-sm text-muted">此镜头尚无已保存的导演设计。</p>
|
||||
</section>
|
||||
<section class="pt-6">
|
||||
<h3 class="mb-4 text-sm font-semibold">
|
||||
即时视觉状态 <span class="ml-2 font-mono text-[10px] font-normal text-muted">VisualState</span>
|
||||
</h3>
|
||||
<h3 class="mb-4 text-sm font-semibold">画面状态</h3>
|
||||
<template v-if="shot.visualState"
|
||||
><dl class="detail-grid">
|
||||
<dt>时间</dt>
|
||||
@@ -82,9 +78,7 @@ defineProps<{ shot: DesignedShot }>()
|
||||
</dl>
|
||||
</article></template
|
||||
>
|
||||
<p v-else class="text-sm leading-6 text-muted">
|
||||
此镜头尚无已保存的即时状态。先补齐本集导演设计,再生成 VisualState。
|
||||
</p>
|
||||
<p v-else class="text-sm leading-6 text-muted">此镜头还没有画面状态,请先完成镜头设计。</p>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
@@ -31,7 +31,6 @@ import IdentityGallery from './components/IdentityGallery.vue'
|
||||
import IdentityImageDialog from './components/IdentityImageDialog.vue'
|
||||
import CastingCandidateDialog from './components/CastingCandidateDialog.vue'
|
||||
import IdentityThumbnail from './components/IdentityThumbnail.vue'
|
||||
import CreativeProfileSettings from '../generation-config/components/CreativeProfileSettings.vue'
|
||||
import type { IdentitySubject } from './types'
|
||||
|
||||
/** 主体身份工作区按正式主体聚合,不把同一主体的多个 Form 当成不同身份。 */
|
||||
@@ -290,11 +289,6 @@ function runNextAction() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async function profileSaved() {
|
||||
operation.value.error = ''
|
||||
await profileQuery.refresh()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -329,11 +323,7 @@ async function profileSaved() {
|
||||
title="角色选角总览与批量操作"
|
||||
:has-receipt="!!session.receipt"
|
||||
>
|
||||
<CreativeProfileSettings
|
||||
:project-id="projectId"
|
||||
:disabled="operation.pending"
|
||||
@saved="profileSaved"
|
||||
/>
|
||||
<!-- 以下是主体身份说明与选角批量操作模块 -->
|
||||
<div class="identity-tools-intro flex flex-wrap items-end justify-between gap-4">
|
||||
<div>
|
||||
<h2 class="text-lg font-semibold">主体身份</h2>
|
||||
|
||||
@@ -92,9 +92,11 @@ const rules = {}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 以下是宽版形态图片生成弹窗模块,长提示词与模型参数保留完整空间 -->
|
||||
<AppDialog
|
||||
v-model:open="open"
|
||||
title="生成形态图片"
|
||||
wide
|
||||
:description="`${form?.subject.name || ''} · ${form?.name || ''}`"
|
||||
>
|
||||
<AppForm
|
||||
|
||||
@@ -21,12 +21,16 @@ export type OperationRecovery = {
|
||||
/** 按项目而非 graph 上锁,防止改写剧本与拆解同时提交。 */
|
||||
const operations = reactive<Record<string, Operation>>({})
|
||||
|
||||
/** 取得项目操作状态,不向浏览器持久化虚假的后台运行状态。 */
|
||||
/**
|
||||
* 取得项目响应式操作状态,首次创建也返回代理,使操作反馈及时更新。
|
||||
* @param projectId 当前项目编号
|
||||
* @returns 当前项目响应式操作状态
|
||||
*/
|
||||
export function getOperation(projectId: string): Operation {
|
||||
if (operations[projectId]) return operations[projectId]
|
||||
/** 当前 HTTP 操作锁与持久化后台活动锁合并,后台结束前不能重复启动付费操作。 */
|
||||
let requestPending = false
|
||||
return (operations[projectId] = {
|
||||
operations[projectId] = {
|
||||
/** 当前项目是否有短请求或后台任务仍在执行。 */
|
||||
get pending() {
|
||||
return requestPending || hasActiveWorkflowExecution(projectId)
|
||||
@@ -39,7 +43,8 @@ export function getOperation(projectId: string): Operation {
|
||||
error: '',
|
||||
notice: '',
|
||||
recovery: null
|
||||
})
|
||||
}
|
||||
return operations[projectId]
|
||||
}
|
||||
|
||||
/** 只提交一次;断网不自动重试,后台是否已执行由刷新后的 checkpoint 确认。 */
|
||||
|
||||
Reference in new issue
Block a user