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,7 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import ContextNotice from '../../components/ui/ContextNotice.vue'
|
||||
|
||||
import { computed } from 'vue'
|
||||
import { NAlert, NButton, NProgress, NTag } from 'naive-ui'
|
||||
import { X } from '@lucide/vue'
|
||||
import { NButton, NProgress, NTag } from 'naive-ui'
|
||||
import { LoaderCircle, X } from '@lucide/vue'
|
||||
import { formatDate } from '../../lib/format'
|
||||
import { executionPercentage, executionStageLabel } from './execution'
|
||||
import type { WorkflowExecution } from './execution.types'
|
||||
@@ -39,6 +41,8 @@ const scriptCreation = computed(() => props.execution?.workflowName === 'create-
|
||||
const videoQuality = computed(() => props.execution?.workflowName === 'video-quality')
|
||||
/** 首帧质量后台任务使用独立的通过与修复失败统计,不套用普通生图字段。 */
|
||||
const keyframeQuality = computed(() => props.execution?.workflowName === 'keyframe-quality')
|
||||
/** 首帧编辑复用质量工作流,最终回执不属于批量质量统计。 */
|
||||
const keyframeEdit = computed(() => props.execution?.metadata?.action === 'edit-keyframe')
|
||||
/** 只接受后端完整的质量计数,畸形或缺失结果不显示全成功。 */
|
||||
const keyframeCounts = computed(() => {
|
||||
const fields = ['targetCount', 'passed', 'repairFailed', 'failed'] as const
|
||||
@@ -94,6 +98,7 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
<div>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<h3 class="text-sm font-semibold">{{ title }}</h3>
|
||||
<LoaderCircle v-if="!finished" :size="14" class="animate-spin text-muted" aria-hidden="true" />
|
||||
<NTag v-if="execution" size="small" :type="statusType" :bordered="false">{{ statusLabel }}</NTag>
|
||||
</div>
|
||||
<p v-if="execution" class="mt-2 text-xs text-muted">
|
||||
@@ -132,17 +137,29 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
· 当前镜头 <code>{{ execution.currentResourceId }}</code></template
|
||||
>
|
||||
</p>
|
||||
<NAlert v-if="execution.status === 'running' && showStatusHint" type="info" :show-icon="false" class="mt-3">
|
||||
<ContextNotice
|
||||
v-if="execution.status === 'running' && showStatusHint"
|
||||
type="info"
|
||||
:show-icon="false"
|
||||
class="mt-3"
|
||||
>
|
||||
{{
|
||||
videoQuality ? '系统会继续生成、检查并按需修复。' : '系统会继续处理剩余内容并保存已完成结果。'
|
||||
}}可以离开或刷新页面,返回后会继续显示本次任务进度,请勿重复提交。
|
||||
</NAlert>
|
||||
<NAlert
|
||||
</ContextNotice>
|
||||
<ContextNotice
|
||||
v-else-if="execution.status === 'completed' && showStatusHint"
|
||||
:type="
|
||||
keyframeQuality && (!keyframeCounts || keyframeCounts.repairFailed + keyframeCounts.failed > 0)
|
||||
? 'warning'
|
||||
: 'success'
|
||||
keyframeEdit
|
||||
? result.passed === true
|
||||
? 'success'
|
||||
: result.validationSkipped === true
|
||||
? 'info'
|
||||
: 'warning'
|
||||
: keyframeQuality &&
|
||||
(!keyframeCounts || keyframeCounts.repairFailed + keyframeCounts.failed > 0)
|
||||
? 'warning'
|
||||
: 'success'
|
||||
"
|
||||
:show-icon="false"
|
||||
class="mt-3"
|
||||
@@ -150,8 +167,8 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
<p>
|
||||
{{
|
||||
scriptCreation
|
||||
? '剧本创作任务已结束,页面正在重新读取剧本内容。'
|
||||
: '本轮任务已结束,页面正在重新读取镜头资产状态。'
|
||||
? '剧本创作任务已结束,可查看最新剧本内容。'
|
||||
: '本轮任务已结束,可查看最新镜头资产状态。'
|
||||
}}
|
||||
</p>
|
||||
<p v-if="videoQuality" class="mt-2 text-xs">
|
||||
@@ -163,6 +180,16 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
输入规划:首帧模式 {{ inputPlanCounts.firstFrame }} · 全模态参考
|
||||
{{ inputPlanCounts.omniReference }}
|
||||
</p>
|
||||
<p v-else-if="keyframeEdit" class="mt-2 text-xs">
|
||||
{{
|
||||
result.validationSkipped === true
|
||||
? '编辑候选已生成,尚未进行质量校验。'
|
||||
: result.passed === true
|
||||
? '编辑结果质量通过。'
|
||||
: '编辑结果未通过质量校验。'
|
||||
}}
|
||||
{{ result.primaryChanged === true ? '已更新主首帧。' : '主首帧未替换。' }}
|
||||
</p>
|
||||
<p v-else-if="keyframeQuality" class="mt-2 text-xs">
|
||||
<template v-if="keyframeCounts"
|
||||
>目标 {{ keyframeCounts.targetCount }} · 通过 {{ keyframeCounts.passed }} · 修复未通过
|
||||
@@ -174,8 +201,8 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
共 {{ result.total ?? execution.total }} · 生成 {{ result.generated ?? execution.current }} · 跳过
|
||||
{{ result.skipped ?? 0 }} · 阻塞 {{ result.blocked ?? 0 }} · 失败 {{ result.failed ?? 0 }}
|
||||
</p>
|
||||
</NAlert>
|
||||
<NAlert v-else-if="execution.status === 'failed'" type="error" :show-icon="false" class="mt-3">
|
||||
</ContextNotice>
|
||||
<ContextNotice v-else-if="execution.status === 'failed'" type="error" :show-icon="false" class="mt-3">
|
||||
<p>{{ execution.error || '制作任务执行失败。' }}</p>
|
||||
<p class="mt-2 text-xs">
|
||||
{{
|
||||
@@ -184,15 +211,15 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
: '请先刷新相关资产状态,确认已成功的镜头;处理报错原因后,只对仍处于“可执行”的镜头重新提交。'
|
||||
}}
|
||||
</p>
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<details class="mt-3 text-[10px] text-muted">
|
||||
<summary class="cursor-pointer">任务详情</summary>
|
||||
<p class="mt-2 break-all font-mono">任务编号 · {{ execution.id }}</p>
|
||||
</details>
|
||||
</template>
|
||||
<NAlert v-if="error" type="error" :show-icon="false" class="mt-3">
|
||||
<ContextNotice v-if="error" type="error" :show-icon="false" class="mt-3">
|
||||
{{ error }}。任务可能仍在运行,请先重新读取状态;不要直接重复提交。
|
||||
<NButton text class="ml-3" :loading="loading" @click="emit('refresh')">重试读取</NButton>
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
</section>
|
||||
</template>
|
||||
Reference in new issue
Block a user