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'
|
||||
@@ -6,10 +10,20 @@ import WorkspacePage from '../../components/ui/WorkspacePage.vue'
|
||||
import ActionMenu from '../../components/ui/ActionMenu.vue'
|
||||
import DetailDisclosure from '../../components/ui/DetailDisclosure.vue'
|
||||
import WorkspaceTools from '../../components/ui/WorkspaceTools.vue'
|
||||
import { NAlert, NButton, NCheckbox, NInput, NInputNumber, NPopover, NScrollbar, NSelect, NTag } from 'naive-ui'
|
||||
import { NButton, NCheckbox, NInput, NInputNumber, NPopover, NScrollbar, NSelect, NTag } from 'naive-ui'
|
||||
import { computed, onScopeDispose, ref, watch, type Directive } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { Search, Download, ImagePlus, ArrowLeft, ArrowRight, LayoutGrid, Columns3, Settings2 } from '@lucide/vue'
|
||||
import {
|
||||
Search,
|
||||
Download,
|
||||
ImagePlus,
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
LayoutGrid,
|
||||
Columns3,
|
||||
LoaderCircle,
|
||||
Settings2
|
||||
} from '@lucide/vue'
|
||||
import { AssetImage, EmptyState, StatusBadge } from '../../components/ui'
|
||||
import { downloadText } from '../../lib/format'
|
||||
import ConfirmAction from '../workflows/ConfirmAction.vue'
|
||||
@@ -296,15 +310,16 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
<template>
|
||||
<WorkspacePage compact mobile-scroll class="gallery-workspace-page">
|
||||
<template #notice>
|
||||
<NAlert v-if="stageComplete" type="success" :show-icon="false">
|
||||
当前制作需要的主体参考图已经准备好,可以继续进行分镜设计。
|
||||
<RouterLink :to="`/projects/${id}/storyboard`" class="text-button ml-2">继续分镜设计 →</RouterLink>
|
||||
</NAlert>
|
||||
<div v-if="stageComplete" class="flex justify-end text-xs">
|
||||
<RouterLink :to="`/projects/${id}/storyboard`" class="text-button">继续分镜设计 →</RouterLink>
|
||||
</div>
|
||||
</template>
|
||||
<template #default>
|
||||
<!-- 批量设置使用弹窗,入口跟随图库筛选区。 -->
|
||||
<WorkspaceTools
|
||||
triggerless
|
||||
:pending="operation.pending"
|
||||
:pending-label="operation.label"
|
||||
v-model:open="toolsOpen"
|
||||
title="形态生图配置与回执"
|
||||
label="批量生图"
|
||||
@@ -327,6 +342,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
></DetailDisclosure
|
||||
>
|
||||
<FormPromptBatch
|
||||
:generating="isOperationRunning(operation, '批量生成形态正式提示词')"
|
||||
:forms="forms"
|
||||
:disabled="blocked"
|
||||
:pending="operation.pending"
|
||||
@@ -396,6 +412,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
>已有主图也新增候选图
|
||||
</NCheckbox>
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, '批量生成项目形态图片')"
|
||||
:label="force ? '为全项目新增候选图' : '补齐项目主参考图'"
|
||||
:disabled="blocked || running || !batchValid || !forms.length"
|
||||
acknowledgement
|
||||
@@ -427,7 +444,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
· 待后续处理 {{ session.receipt.result.remaining }}</span
|
||||
>
|
||||
</p>
|
||||
<NAlert
|
||||
<ContextNotice
|
||||
v-if="session.receipt.result.failed"
|
||||
role="alert"
|
||||
type="error"
|
||||
@@ -435,7 +452,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
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.subjectFormId">
|
||||
<code>{{ failure.subjectFormId }}</code
|
||||
@@ -448,7 +465,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
</section>
|
||||
</WorkspaceTools>
|
||||
<!-- 关联说明、筛选和图片共用正文滚动区,避免镜头切换时两块滚动区域高度不同步。 -->
|
||||
<NAlert
|
||||
<ContextNotice
|
||||
v-if="impact.stale.value.length"
|
||||
type="warning"
|
||||
:show-icon="false"
|
||||
@@ -503,10 +520,10 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
</li>
|
||||
</ul>
|
||||
</NScrollbar>
|
||||
</NAlert>
|
||||
<NAlert v-if="impact.query.error.value" type="warning" :show-icon="false" class="mt-3"
|
||||
</ContextNotice>
|
||||
<ContextNotice v-if="impact.query.error.value" type="warning" :show-icon="false" class="mt-3"
|
||||
>镜头影响检查失败,暂时无法确认有无过期首帧:{{ impact.query.error.value }}
|
||||
<NButton text size="small" @click="impact.query.refresh">重试检查</NButton></NAlert
|
||||
<NButton text size="small" @click="impact.query.refresh">重试检查</NButton></ContextNotice
|
||||
>
|
||||
<div class="gallery-sticky-controls">
|
||||
<div class="form-image-filter-region">
|
||||
@@ -631,7 +648,12 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
:aria-expanded="toolsOpen"
|
||||
@click="toolsOpen = true"
|
||||
>
|
||||
<template #icon><Settings2 :size="16" /></template>
|
||||
<template #icon
|
||||
><LoaderCircle
|
||||
v-if="operation.pending"
|
||||
:size="16"
|
||||
class="animate-spin" /><Settings2 v-else :size="16"
|
||||
/></template>
|
||||
</NButton>
|
||||
</template>
|
||||
{{
|
||||
@@ -682,7 +704,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<NAlert
|
||||
<ContextNotice
|
||||
v-if="targetFormId"
|
||||
:type="targetForm ? 'info' : 'warning'"
|
||||
:show-icon="false"
|
||||
@@ -698,18 +720,13 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
query.loading.value ? '正在定位素材…' : '指定形态不存在或已被移除,请从本镜头当前关联素材重新选择。'
|
||||
}}</template>
|
||||
<NButton text size="small" @click="resetFilters">清除定位</NButton>
|
||||
</NAlert>
|
||||
<NAlert v-if="operation.notice" role="status" type="success" :show-icon="false" class="mt-4">
|
||||
{{ operation.notice }}
|
||||
</NAlert>
|
||||
<NAlert v-if="operation.error" role="alert" type="error" :show-icon="false" class="mt-4">
|
||||
{{ operation.error }}
|
||||
</NAlert>
|
||||
<NAlert v-if="query.error.value" role="alert" type="error" :show-icon="false" class="mt-4"
|
||||
>{{ query.error.value }}<span v-if="forms.length"> 当前展示上次读取的数据。</span></NAlert
|
||||
><NAlert v-if="running" role="status" type="info" :show-icon="false" class="mt-4">
|
||||
</ContextNotice>
|
||||
|
||||
<ContextNotice v-if="query.error.value" role="alert" type="error" :show-icon="false" class="mt-4"
|
||||
>{{ query.error.value }}<span v-if="forms.length"> 当前展示上次读取的数据。</span></ContextNotice
|
||||
><ContextNotice v-if="running" role="status" type="info" :show-icon="false" class="mt-4">
|
||||
数据库中有形态图片正在后台生成。对应形态会暂停重复提交,其它形态仍可继续生成;项目批量生图需等待当前任务完成。
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<p v-if="!query.data.value && query.loading.value" class="py-10 text-sm text-muted" role="status">
|
||||
正在读取形态和已有图片…
|
||||
</p>
|
||||
@@ -772,7 +789,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
>
|
||||
<span class="text-[10px] text-muted">{{ form.images.length }} 条记录</span>
|
||||
</div>
|
||||
<NAlert
|
||||
<ContextNotice
|
||||
v-if="
|
||||
sourceShot?.primaryKeyframeStale &&
|
||||
impact.relatedForms.value.has(form.id) &&
|
||||
@@ -792,7 +809,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
<RouterLink v-if="sourceLocation" :to="sourceLocation" class="text-button mt-2"
|
||||
>返回该镜头处理 →</RouterLink
|
||||
>
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<p v-if="form.images[0]?.status === 'failed'" class="mt-2 line-clamp-2 text-xs text-danger">
|
||||
{{ form.images[0].error }}
|
||||
</p>
|
||||
|
||||
Reference in new issue
Block a user