feat(short-drama-agent-front): 接入素材预览审核并完善创作流程
This commit is contained in:
1 parent
f8b0fbb8ca
commit
dc8bb17a23
66 files changed
+2864
-632
No files matched your search
@@ -77,7 +77,7 @@ const operation = computed(() => getOperation(id.value))
|
||||
const createDramaExecution = useWorkflowExecution(id, 'create-drama', { discover: true })
|
||||
/** 项目内跨页面继续观察首帧后台任务,维持活动锁并在真实终态后释放。 */
|
||||
useWorkflowExecution(id, 'keyframe-quality')
|
||||
/** 既有生成入口在跨页面时继续观察,保持项目活动锁。 */
|
||||
/** 派生设计从服务端发现新任务;其它既有入口继续观察已知任务,保持项目活动锁。 */
|
||||
for (const workflowName of [
|
||||
'storyboard-direction',
|
||||
'storyboard-visual-state',
|
||||
@@ -85,7 +85,9 @@ for (const workflowName of [
|
||||
'keyframe-generation',
|
||||
'video-quality'
|
||||
]) {
|
||||
useWorkflowExecution(id, workflowName)
|
||||
useWorkflowExecution(id, workflowName, {
|
||||
discover: ['storyboard-direction', 'storyboard-visual-state'].includes(workflowName)
|
||||
})
|
||||
}
|
||||
/** 即使直接刷新到生产页,也按真实重生成任务恢复旧剧情快照的失效标记。 */
|
||||
const breakdownExecution = useWorkflowExecution(id, 'breakdown', { discover: true })
|
||||
|
||||
@@ -39,6 +39,7 @@ const durationOptions = [
|
||||
{ label: '固定集数与总时长', value: 'fixed_episode_count' },
|
||||
{ label: '根据单集时长推导集数', value: 'flexible_episode_count' }
|
||||
]
|
||||
/** 根据目标总时长和单集范围推导可行集数,无法满足范围时返回空值。 */
|
||||
const estimatedCount = computed(() => {
|
||||
if (form.durationMode !== 'flexible_episode_count' || form.minSeconds <= 0 || form.maxSeconds < form.minSeconds)
|
||||
return null
|
||||
@@ -49,6 +50,17 @@ const estimatedCount = computed(() => {
|
||||
const midpoint = (form.minSeconds + form.maxSeconds) / 2
|
||||
return Math.max(minimum, Math.min(maximum, Math.round(total / midpoint)))
|
||||
})
|
||||
/** 生成前展示当前模式的集数与时长摘要,便于核对创作规模。 */
|
||||
const durationSummary = computed(() => {
|
||||
if (form.durationMode === 'auto') return `计划 ${form.episodeCount} 集,时长由故事内容规划。`
|
||||
const count = form.durationMode === 'fixed_episode_count' ? form.episodeCount : estimatedCount.value
|
||||
if (!count || form.totalMinutes <= 0) return '调整时长与集数后,可在这里查看创作规模。'
|
||||
const averageSeconds = Math.round((form.totalMinutes * 60) / count)
|
||||
if (form.durationMode === 'fixed_episode_count') {
|
||||
return `计划 ${count} 集,总时长 ${form.totalMinutes} 分钟,平均每集约 ${averageSeconds} 秒。`
|
||||
}
|
||||
return `预计 ${count} 集,总时长 ${form.totalMinutes} 分钟,平均每集约 ${averageSeconds} 秒。`
|
||||
})
|
||||
/** 只发送当前模式所需字段,避免弹性模式携带顶层 episodeCount。 */
|
||||
function durationBudget(): DramaDurationBudget {
|
||||
if (form.durationMode === 'auto') return { mode: 'auto', episodeCount: form.episodeCount }
|
||||
@@ -220,6 +232,8 @@ const rules = computed(() => ({
|
||||
:step="1"
|
||||
></NInputNumber
|
||||
></NFormItem>
|
||||
<!-- 以下是生成前的集数与时长核对摘要模块 -->
|
||||
<p class="text-sm text-muted" role="status" aria-live="polite">{{ durationSummary }}</p>
|
||||
</div>
|
||||
<FeedbackMessage v-if="feedback" :message="feedback" />
|
||||
</AppForm>
|
||||
|
||||
@@ -121,13 +121,14 @@ export interface DramaState {
|
||||
|
||||
/** 项目制作导航使用的服务端统一阶段状态。 */
|
||||
export interface ProjectStageReadiness {
|
||||
projectId: string
|
||||
script: { ready: boolean; reason: string | null }
|
||||
breakdown: { ready: boolean; reason: string | null }
|
||||
visualStyle: { ready: boolean; reason: string | null }
|
||||
identity: { ready: boolean; reason: string | null }
|
||||
subjectAssets: { ready: boolean; reason: string | null }
|
||||
storyboard: { ready: boolean; reason: string | null }
|
||||
/** 正式项目编号。 */ projectId: string
|
||||
/** 剧本审核和保存状态。 */ script: { ready: boolean; reason: string | null }
|
||||
/** 正式分镜完整审核,供镜头设计和制作使用。 */ breakdown: { ready: boolean; reason: string | null }
|
||||
/** 来源、结构和动作自动检查通过,可先准备风格和主体素材。 */ preparation: { ready: boolean; reason: string | null }
|
||||
/** 项目视觉风格是否已保存。 */ visualStyle: { ready: boolean; reason: string | null }
|
||||
/** 角色身份是否已准备。 */ identity: { ready: boolean; reason: string | null }
|
||||
/** 主体素材是否已准备。 */ subjectAssets: { ready: boolean; reason: string | null }
|
||||
/** 镜头设计是否已准备。 */ storyboard: { ready: boolean; reason: string | null }
|
||||
}
|
||||
|
||||
/** 单集分镜时长偏差审计结果。 */
|
||||
|
||||
@@ -25,33 +25,23 @@ export function useProjectStageAccess(projectId: Ref<string>, readiness: Ref<Pro
|
||||
nextLabel: '前往剧本创作'
|
||||
},
|
||||
'visual-style': {
|
||||
...accessState(state?.breakdown.ready, state?.breakdown.reason, '请先完成剧本拆解'),
|
||||
...accessState(state?.preparation?.ready, state?.preparation?.reason, '请先完成剧本拆解'),
|
||||
nextPath: 'breakdown',
|
||||
nextLabel: '前往剧本拆解'
|
||||
},
|
||||
'subject-identity': {
|
||||
enabled: Boolean(state?.breakdown.ready && state?.visualStyle.ready),
|
||||
reason: state?.breakdown.reason || state?.visualStyle.reason || '请先准备视觉风格',
|
||||
nextPath: state?.breakdown.ready ? 'visual-style' : 'breakdown',
|
||||
nextLabel: state?.breakdown.ready ? '前往视觉风格' : '前往剧本拆解'
|
||||
enabled: Boolean(state?.preparation?.ready && state?.visualStyle.ready),
|
||||
reason: state?.preparation?.reason || state?.visualStyle.reason || '请先准备视觉风格',
|
||||
nextPath: state?.preparation?.ready ? 'visual-style' : 'breakdown',
|
||||
nextLabel: state?.preparation?.ready ? '前往视觉风格' : '前往剧本拆解'
|
||||
},
|
||||
'subject-images': {
|
||||
enabled: Boolean(state?.breakdown.ready && state?.visualStyle.ready && state?.identity.ready),
|
||||
reason:
|
||||
state?.breakdown.reason ||
|
||||
state?.visualStyle.reason ||
|
||||
state?.identity.reason ||
|
||||
'请先完成主体身份准备',
|
||||
nextPath: state?.visualStyle.ready
|
||||
? 'subject-identity'
|
||||
: state?.breakdown.ready
|
||||
? 'visual-style'
|
||||
: 'breakdown',
|
||||
nextLabel: state?.visualStyle.ready
|
||||
? '前往主体身份'
|
||||
: state?.breakdown.ready
|
||||
? '前往视觉风格'
|
||||
: '前往剧本拆解'
|
||||
// 此页同时准备单个素材的Prompt与规格;全项目身份未齐备不阻断只读检查和逐项准备。
|
||||
// 付费生成仍由本素材的实际预览、身份/规格与版本门禁决定。
|
||||
enabled: Boolean(state?.preparation?.ready && state?.visualStyle.ready),
|
||||
reason: state?.preparation?.reason || state?.visualStyle.reason || '请先准备视觉风格',
|
||||
nextPath: state?.preparation?.ready ? 'visual-style' : 'breakdown',
|
||||
nextLabel: state?.preparation?.ready ? '前往视觉风格' : '前往剧本拆解'
|
||||
},
|
||||
storyboard: {
|
||||
enabled: Boolean(state?.breakdown.ready && state?.subjectAssets.ready),
|
||||
|
||||
Reference in new issue
Block a user