feat: 同步动作与首帧编辑能力并统一工作区反馈
接入动作时间轴、密度审计、人工视线目标和后台首帧编辑;独立读取已保存提示词,并在首帧晋升前重新核对持久化质量状态。 统一 NMessage 结果反馈、局部 loading 和业务说明间距,保留真实长任务进度与部分失败语义。 验证:pnpm check(49 个文件、393 项测试)、pnpm build;当前环境无法完成 localhost 浏览器验收及真实后端联调。
This commit is contained in:
1 parent
83482a70c5
commit
7a60db3ced
76 files changed
+2485
-457
No files matched your search
@@ -1,4 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { isOperationRunning } from '../workflows/operations'
|
||||
|
||||
import ContextNotice from '../../components/ui/ContextNotice.vue'
|
||||
|
||||
import AppForm from '../../components/ui/AppForm.vue'
|
||||
import { NFormItem } from 'naive-ui'
|
||||
import { integerRule } from '../../lib/form-rules'
|
||||
@@ -7,7 +11,6 @@ import WorkspacePage from '../../components/ui/WorkspacePage.vue'
|
||||
import WorkspaceTools from '../../components/ui/WorkspaceTools.vue'
|
||||
import {
|
||||
NScrollbar,
|
||||
NAlert,
|
||||
NButton,
|
||||
NCheckbox,
|
||||
NCollapse,
|
||||
@@ -411,12 +414,11 @@ function runNextAction() {
|
||||
<SubjectIdentitySkeleton v-if="initialLoading" />
|
||||
<WorkspacePage v-else split compact mobile-scroll class="identity-workspace-page">
|
||||
<template #notice>
|
||||
<NAlert v-if="subjectImagesAccess.enabled" type="success" :show-icon="false">
|
||||
所有需要确认的角色身份已经准备好,可以继续制作主体形态图片。
|
||||
<RouterLink :to="`/projects/${projectId}/subject-images`" class="text-button ml-2"
|
||||
<div v-if="subjectImagesAccess.enabled" class="flex justify-end text-xs">
|
||||
<RouterLink :to="`/projects/${projectId}/subject-images`" class="text-button"
|
||||
>继续形态图片 →</RouterLink
|
||||
>
|
||||
</NAlert>
|
||||
</div>
|
||||
</template>
|
||||
<template #header>
|
||||
<!-- 以下是类型筛选、主体数量与操作入口 -->
|
||||
@@ -436,6 +438,8 @@ function runNextAction() {
|
||||
<span class="toolbar-summary">共 {{ subjects.length }} 个主体</span>
|
||||
<div class="toolbar-actions">
|
||||
<WorkspaceTools
|
||||
:pending="operation.pending"
|
||||
:pending-label="operation.label"
|
||||
v-model:open="toolsOpen"
|
||||
title="角色选角总览与批量操作"
|
||||
:has-receipt="!!session.receipt"
|
||||
@@ -452,16 +456,16 @@ function runNextAction() {
|
||||
<div class="workspace-overview-panel">
|
||||
<div class="overview-content workspace-section-stack dialog-flat-stack">
|
||||
<h3 class="text-sm font-semibold">角色选角总览与批量操作</h3>
|
||||
<NAlert type="info" :show-icon="false" class="text-xs">
|
||||
<ContextNotice type="info" :show-icon="false" class="text-xs">
|
||||
人物需要依次完成身份描述、选角候选、确认角色母版并锁定,之后才能用于镜头制作。未明确人物背景时,AI
|
||||
默认以中国人物作为选角基线;项目和角色的明确事实始终优先。场景和道具使用稳定身份母版流程。
|
||||
</NAlert>
|
||||
<NAlert v-if="styleQuery.data.value && !hasStyle" type="info" :show-icon="false">
|
||||
</ContextNotice>
|
||||
<ContextNotice v-if="styleQuery.data.value && !hasStyle" type="info" :show-icon="false">
|
||||
先创建项目视觉风格,才能 AI 生成身份或身份图片。<RouterLink
|
||||
:to="`/projects/${projectId}/visual-style`"
|
||||
class="text-button ml-2"
|
||||
>设置视觉风格 →</RouterLink
|
||||
></NAlert
|
||||
></ContextNotice
|
||||
>
|
||||
<section v-if="casting" class="workspace-panel" aria-label="角色选角流程">
|
||||
<div class="flex flex-wrap items-start justify-between gap-4">
|
||||
@@ -535,6 +539,7 @@ function runNextAction() {
|
||||
>覆盖未锁定身份文本
|
||||
</NCheckbox>
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, '批量生成角色身份文本')"
|
||||
:label="force ? '重生成角色身份文本' : '补齐角色身份文本'"
|
||||
:disabled="
|
||||
blocked ||
|
||||
@@ -549,6 +554,7 @@ function runNextAction() {
|
||||
@confirm="generateProject(true)"
|
||||
/>
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, '批量生成角色选角候选')"
|
||||
label="AI 批量生成角色候选图"
|
||||
:disabled="
|
||||
castingBlocked ||
|
||||
@@ -591,6 +597,7 @@ function runNextAction() {
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, '批量生成场景身份母版')"
|
||||
label="生成场景母版"
|
||||
:disabled="
|
||||
blocked ||
|
||||
@@ -605,6 +612,7 @@ function runNextAction() {
|
||||
@confirm="generateStableAnchors('scene')"
|
||||
/>
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, '批量生成道具身份母版')"
|
||||
label="生成道具母版"
|
||||
:disabled="
|
||||
blocked || !hasStyle || !batchValid || dirty || !subjects.length
|
||||
@@ -680,7 +688,7 @@ function runNextAction() {
|
||||
{{ session.receipt.result.generated }} · 失败
|
||||
{{ session.receipt.result.failed }}
|
||||
</p>
|
||||
<NAlert
|
||||
<ContextNotice
|
||||
v-if="session.receipt.result.failed"
|
||||
role="alert"
|
||||
type="error"
|
||||
@@ -688,7 +696,7 @@ function runNextAction() {
|
||||
class="mt-3"
|
||||
>
|
||||
本次存在部分失败,成功结果不会回滚。请检查逐角色原因后再重试。
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<ul class="mt-3 space-y-2 text-xs text-danger">
|
||||
<li v-for="failure in session.receipt.result.failures" :key="failure.subjectId">
|
||||
{{ failure.subjectRef }} · {{ failure.subjectId }}:{{ failure.error }}
|
||||
@@ -707,7 +715,7 @@ function runNextAction() {
|
||||
<NScrollbar
|
||||
class="workspace-feedback"
|
||||
v-if="catalog.error.value || styleQuery.error.value || castingQuery.error.value"
|
||||
><NAlert role="alert" type="error" :show-icon="false"
|
||||
><ContextNotice role="alert" type="error" :show-icon="false"
|
||||
>{{ catalog.error.value || styleQuery.error.value || castingQuery.error.value }}
|
||||
当前相关操作已暂停,请刷新核对后端。
|
||||
<NButton
|
||||
@@ -718,9 +726,9 @@ function runNextAction() {
|
||||
@click="catalog.refresh"
|
||||
>重试读取目录</NButton
|
||||
>
|
||||
</NAlert></NScrollbar
|
||||
</ContextNotice></NScrollbar
|
||||
>
|
||||
<NAlert
|
||||
<ContextNotice
|
||||
v-if="profileQuery.data.value && !hasCreativeProfile"
|
||||
type="warning"
|
||||
:show-icon="false"
|
||||
@@ -730,7 +738,7 @@ function runNextAction() {
|
||||
<span><strong>需要先配置项目生成模型</strong>,否则身份图和选角候选无法生成。</span>
|
||||
<NButton type="primary" @click="openProfileSettings">立即配置</NButton>
|
||||
</div>
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<div v-if="subjects.length" class="identity-workspace-region">
|
||||
<!-- 以下是与分镜一致的融合工作区模块,目录与详情共用外层背景。 -->
|
||||
<div class="panel workspace-surface directory-workspace identity-workspace">
|
||||
@@ -795,12 +803,12 @@ function runNextAction() {
|
||||
class="panel-scroll"
|
||||
content-class="directory-workspace-content identity-detail-content"
|
||||
>
|
||||
<NAlert v-if="pendingSelection" type="info" :show-icon="false" class="mb-4"
|
||||
<ContextNotice v-if="pendingSelection" type="info" :show-icon="false" class="mb-4"
|
||||
><p class="text-xs">当前主体有未保存修改,切换会丢弃草稿。</p>
|
||||
<div class="mt-3 flex gap-3">
|
||||
<NButton @click="discardAndSelect">放弃草稿并切换</NButton
|
||||
><NButton @click="pendingSelection = ''" text size="small">继续编辑</NButton>
|
||||
</div></NAlert
|
||||
</div></ContextNotice
|
||||
>
|
||||
<section v-if="subject" ref="identityContentRoot" class="identity-subject-content">
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
@@ -813,9 +821,14 @@ function runNextAction() {
|
||||
刷新身份
|
||||
</NButton>
|
||||
</div>
|
||||
<NAlert v-if="detail.error.value" role="alert" type="error" :show-icon="false" class="mt-4"
|
||||
<ContextNotice
|
||||
v-if="detail.error.value"
|
||||
role="alert"
|
||||
type="error"
|
||||
:show-icon="false"
|
||||
class="mt-4"
|
||||
>{{ detail.error.value }} 查询失败时不允许生成或覆盖。
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<!-- 以下是切换主体时的局部骨架模块,保留真实主体名称与目录 -->
|
||||
<IdentityDetailSkeleton v-if="detailInitialLoading" class="mt-5" />
|
||||
<template v-if="detail.data.value">
|
||||
@@ -860,6 +873,7 @@ function runNextAction() {
|
||||
请先保存身份修改,再使用 AI 或生成图片。
|
||||
</p>
|
||||
<IdentityEditor
|
||||
:saving="isOperationRunning(operation, '保存主体身份')"
|
||||
:key="`${selectedId}:${editorRevision}`"
|
||||
:identity="identity"
|
||||
:module="subject.module"
|
||||
@@ -870,6 +884,7 @@ function runNextAction() {
|
||||
<!-- 以下是唯一的单主体 AI 文本生成入口,覆盖已有文本时沿用确认弹窗 -->
|
||||
<template #generate>
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, 'AI 生成主体身份')"
|
||||
v-if="identity?.description?.trim() || identity?.generationPrompt?.trim()"
|
||||
label="AI 生成主体身份"
|
||||
description="AI 将重新生成当前主体的身份描述和核心提示词,并覆盖已保存的文本;已有图片不会自动更新。"
|
||||
|
||||
Reference in new issue
Block a user