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,11 +1,15 @@
|
||||
<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'
|
||||
import WorkspacePage from '../../components/ui/WorkspacePage.vue'
|
||||
import ActionMenu from '../../components/ui/ActionMenu.vue'
|
||||
import WorkspaceTools from '../../components/ui/WorkspaceTools.vue'
|
||||
import { NScrollbar, NAlert, NButton, NCheckbox, NInputNumber, NProgress, NSelect, NTab, NTabs } from 'naive-ui'
|
||||
import { NScrollbar, NButton, NCheckbox, NInputNumber, NProgress, NSelect, NTab, NTabs } from 'naive-ui'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { ArrowLeft } from '@lucide/vue'
|
||||
import { EmptyState } from '../../components/ui'
|
||||
@@ -13,6 +17,11 @@ import { downloadText } from '../../lib/format'
|
||||
import ConfirmAction from '../workflows/ConfirmAction.vue'
|
||||
import GenerationReceipt from './components/GenerationReceipt.vue'
|
||||
import ShotDesign from './components/ShotDesign.vue'
|
||||
import MotionPlanPanel from './components/MotionPlanPanel.vue'
|
||||
import MotionAuditPanel from './components/MotionAuditPanel.vue'
|
||||
import SpatialBindingsPanel from './components/SpatialBindingsPanel.vue'
|
||||
import type { MotionPlanAudit } from './motion.types'
|
||||
import { useActionMessage } from '../../components/ui/useActionMessage'
|
||||
import ShotTools from './components/ShotTools.vue'
|
||||
import BeatShotDirectory from './components/BeatShotDirectory.vue'
|
||||
import SubjectCoverageAudit from './components/SubjectCoverageAudit.vue'
|
||||
@@ -22,6 +31,22 @@ import { useStoryboard } from './useStoryboard'
|
||||
import { storyboardApi, type StoryboardDurationAudit } from './api'
|
||||
|
||||
const detailTab = ref('design')
|
||||
/** 动作审计只能定位当前项目正式列表中的镜头。 */
|
||||
const feedback = useActionMessage()
|
||||
/**
|
||||
* 按后端正式镜头坐标定位动作预警。
|
||||
* @param item 后端返回的真实镜头及剧集
|
||||
*/
|
||||
function locateMotion(item: MotionPlanAudit['items'][number]) {
|
||||
if (!episodeOptions.value.some(episode => episode.episodeNo === item.episodeNo)) {
|
||||
feedback?.warning('审计中的剧集已不在当前项目列表,请刷新分镜。')
|
||||
return
|
||||
}
|
||||
selectedEpisode.value = item.episodeNo
|
||||
selectedShot.value = item.shotId
|
||||
detailTab.value = 'motion'
|
||||
toolsOpen.value = false
|
||||
}
|
||||
|
||||
/** 分镜工作区按单集查看正式数据,生成配置与镜头检查分开。 */
|
||||
const {
|
||||
@@ -167,10 +192,10 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<template>
|
||||
<WorkspacePage split compact mobile-scroll class="storyboard-workspace-page compact-shot-workspace">
|
||||
<template #notice>
|
||||
<NAlert v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||
<ContextNotice v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||
</NAlert>
|
||||
<NAlert v-if="currentEpisodeDurationIssues.length" type="warning" :show-icon="false">
|
||||
</ContextNotice>
|
||||
<ContextNotice v-if="currentEpisodeDurationIssues.length" type="warning" :show-icon="false">
|
||||
<div class="text-sm font-medium">
|
||||
本集有 {{ currentEpisodeDurationIssues.length }} 条分镜时长建议(不阻断生成)
|
||||
</div>
|
||||
@@ -178,7 +203,7 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
Beat {{ issue.beatNo }}<span v-if="issue.shotNo"> · Shot {{ issue.shotNo }}</span
|
||||
>:{{ issue.message }}
|
||||
</div>
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<span v-if="durationAuditError" class="text-xs text-muted">{{ durationAuditError }}</span>
|
||||
</template>
|
||||
<template #header
|
||||
@@ -213,6 +238,8 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
</div>
|
||||
|
||||
<WorkspaceTools
|
||||
:pending="operation.pending"
|
||||
:pending-label="operation.label"
|
||||
v-model:open="toolsOpen"
|
||||
title="分镜生成配置与回执"
|
||||
label="生成与恢复"
|
||||
@@ -290,9 +317,10 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<div class="overview-content workspace-section-stack">
|
||||
<!-- 以下是零费用主体引用覆盖检查模块 -->
|
||||
<SubjectCoverageAudit :project-id="id" @locate="locateCoverageIssue" />
|
||||
<NAlert v-if="auditLocationError" type="warning" :show-icon="false">{{
|
||||
<MotionAuditPanel :project-id="id" @locate="locateMotion" />
|
||||
<ContextNotice v-if="auditLocationError" type="warning" :show-icon="false">{{
|
||||
auditLocationError
|
||||
}}</NAlert>
|
||||
}}</ContextNotice>
|
||||
<h3 class="mb-3 text-sm font-semibold">生成与恢复</h3>
|
||||
<div class="generation-row">
|
||||
<div>
|
||||
@@ -302,15 +330,21 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
<p class="mt-2 text-xs leading-6 text-muted">
|
||||
只重新拆解当前选择的第
|
||||
{{ episodeNo }}
|
||||
集,其它剧集不受影响。新镜头会替换旧镜头,并清空本集已有的导演设计、即时状态、首帧与视频结果。
|
||||
集,其他剧集不受影响。新镜头会替换旧镜头,并清空本集已有的导演设计、即时状态、首帧与视频结果。
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<ConfirmAction
|
||||
:loading="
|
||||
isOperationRunning(operation, `生成第 ${episodeNo} 集镜头`) ||
|
||||
(!!executions[0]?.observer.active.value &&
|
||||
executions[0]?.observer.query.data.value?.metadata?.episodeNo ===
|
||||
episodeNo)
|
||||
"
|
||||
:label="`重生成第 ${episodeNo} 集镜头`"
|
||||
:disabled="!allowed['shots-current']"
|
||||
acknowledgement
|
||||
:description="`将删除并重建第 ${episodeNo} 集的正式镜头。该集已有导演设计、即时状态、首帧、提示词和视频结果会随旧镜头一并失效,且无法撤销;其它剧集保持不变。`"
|
||||
:description="`将删除并重建第 ${episodeNo} 集的正式镜头。该集已有导演设计、即时状态、首帧、提示词和视频结果会随旧镜头一并失效,且无法撤销;其他剧集保持不变。`"
|
||||
@confirm="run('shots-current')"
|
||||
/>
|
||||
</div>
|
||||
@@ -329,6 +363,10 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<ConfirmAction
|
||||
:loading="
|
||||
isOperationRunning(operation, '生成项目导演设计') ||
|
||||
!!executions[1]?.observer.active.value
|
||||
"
|
||||
:label="force ? '重生成全部导演设计' : '补齐项目导演设计'"
|
||||
:disabled="!allowed['direction-all']"
|
||||
acknowledgement
|
||||
@@ -352,6 +390,10 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<ConfirmAction
|
||||
:loading="
|
||||
isOperationRunning(operation, '生成项目即时状态') ||
|
||||
!!executions[2]?.observer.active.value
|
||||
"
|
||||
:label="force ? '重生成全部即时状态' : '补齐项目即时状态'"
|
||||
:disabled="!allowed['visual-all']"
|
||||
acknowledgement
|
||||
@@ -377,6 +419,10 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
>。
|
||||
</p>
|
||||
<ConfirmAction
|
||||
:loading="
|
||||
isOperationRunning(operation, '生成项目视频提示词') ||
|
||||
!!executions[3]?.observer.active.value
|
||||
"
|
||||
:label="force ? '重生成全部视频提示词' : '补齐项目视频提示词'"
|
||||
:disabled="!allowed.prompts"
|
||||
acknowledgement
|
||||
@@ -420,7 +466,7 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
"
|
||||
class="workspace-feedback"
|
||||
>
|
||||
<NAlert v-if="query.error.value" role="alert" type="error" :show-icon="false" class="mt-4"
|
||||
<ContextNotice v-if="query.error.value" role="alert" type="error" :show-icon="false" class="mt-4"
|
||||
>{{ query.error.value }} 当前保留上次成功读取的数据,暂停生成操作。<NButton
|
||||
@click="query.refresh"
|
||||
text
|
||||
@@ -428,34 +474,34 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
class="ml-3"
|
||||
>
|
||||
重试查询
|
||||
</NButton></NAlert
|
||||
><NAlert
|
||||
</NButton></ContextNotice
|
||||
><ContextNotice
|
||||
v-if="data && data.directions.shotCount && !productionReady"
|
||||
type="warning"
|
||||
:show-icon="false"
|
||||
class="mt-4"
|
||||
>
|
||||
<strong>Production 前置设计未完成。</strong>
|
||||
<strong>镜头生产前置设计未完成。</strong>
|
||||
当前导演设计 {{ data.directions.directionCount }}/{{ data.directions.shotCount }},即时视觉状态
|
||||
{{ data.visualStates.visualStateCount }}/{{
|
||||
data.visualStates.shotCount
|
||||
}}。请先补齐后再进入镜头生产,避免 后续镜头制作无法开始。 </NAlert
|
||||
><NAlert
|
||||
}}。请先补齐后再进入镜头生产,避免 后续镜头制作受阻。 </ContextNotice
|
||||
><ContextNotice
|
||||
v-if="!prerequisites.directionEpisode || !prerequisites.visualEpisode"
|
||||
type="info"
|
||||
:show-icon="false"
|
||||
class="mt-4"
|
||||
>
|
||||
最新 Breakdown
|
||||
缺少本集生成所需的镜头、主体或形态数据。已保存设计仍可查看;请先在拆解页完成或恢复相应阶段。 </NAlert
|
||||
><NAlert
|
||||
最新剧本拆解
|
||||
缺少本集生成所需的镜头、主体或形态数据。已保存设计仍可查看;请先在拆解页完成或恢复相应阶段。 </ContextNotice
|
||||
><ContextNotice
|
||||
v-else-if="data && !directionComplete && data.directions.shotCount"
|
||||
type="info"
|
||||
:show-icon="false"
|
||||
class="mt-4"
|
||||
>
|
||||
本集导演设计尚未补齐,请先完成第 01 步,再生成本集即时状态。
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
</NScrollbar>
|
||||
<div v-if="!data && query.loading.value" class="panel p-8 text-sm text-muted" role="status">
|
||||
正在读取正式分镜数据……
|
||||
@@ -503,8 +549,23 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
</header>
|
||||
<div>
|
||||
<NTabs v-model:value="detailTab" type="line" size="small" aria-label="镜头详情"
|
||||
><NTab name="design">设计与状态</NTab><NTab name="tools">参考图与生成规格</NTab></NTabs
|
||||
><NTab name="design">设计与状态</NTab><NTab name="tools">参考图与提示词</NTab
|
||||
><NTab name="motion">动作与视线</NTab></NTabs
|
||||
>
|
||||
<div v-if="detailTab === 'motion'" class="pt-5 space-y-6">
|
||||
<MotionPlanPanel
|
||||
:key="shot.shotId"
|
||||
:shot-id="shot.shotId"
|
||||
:revision="session.prompts[shot.shotId]?.updatedAt"
|
||||
/>
|
||||
<SpatialBindingsPanel
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot-id="shot.shotId"
|
||||
:disabled="blocked"
|
||||
@changed="query.refresh"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="detailTab === 'design'" class="pt-6"><ShotDesign :shot="shot" /></div>
|
||||
<div v-if="detailTab === 'tools'" class="pt-6">
|
||||
<ShotTools
|
||||
|
||||
Reference in new issue
Block a user