feat(short-drama-agent-front): 补齐后端生产与质量功能
This commit is contained in:
1 parent
967c4ebea1
commit
470b52e26d
52 files changed
+3754
-1075
No files matched your search
@@ -22,6 +22,29 @@ const statusType = computed(() =>
|
||||
)
|
||||
const finished = computed(() => ['completed', 'failed'].includes(props.execution?.status ?? ''))
|
||||
const videoQuality = computed(() => props.execution?.workflowName === 'video-quality')
|
||||
/** 首帧质量后台任务使用独立的通过与修复失败统计,不套用普通生图字段。 */
|
||||
const keyframeQuality = computed(() => props.execution?.workflowName === 'keyframe-quality')
|
||||
/** 只接受后端完整的质量计数,畸形或缺失结果不显示全成功。 */
|
||||
const keyframeCounts = computed(() => {
|
||||
const fields = ['targetCount', 'passed', 'repairFailed', 'failed'] as const
|
||||
if (
|
||||
!fields.every(
|
||||
field =>
|
||||
typeof result.value[field] === 'number' &&
|
||||
Number.isSafeInteger(result.value[field]) &&
|
||||
Number(result.value[field]) >= 0
|
||||
)
|
||||
)
|
||||
return null
|
||||
const counts = {
|
||||
targetCount: Number(result.value.targetCount),
|
||||
passed: Number(result.value.passed),
|
||||
repairFailed: Number(result.value.repairFailed),
|
||||
failed: Number(result.value.failed)
|
||||
}
|
||||
return counts.passed + counts.repairFailed + counts.failed === counts.targetCount ? counts : null
|
||||
})
|
||||
/** 范围描述保留指定镜头或剧集,不把小批量误显示为全项目。 */
|
||||
const scopeLabel = computed(() => {
|
||||
const metadata = props.execution?.metadata
|
||||
if (!metadata) return ''
|
||||
@@ -32,6 +55,7 @@ const scopeLabel = computed(() => {
|
||||
: metadata.inputModeFilter === 'omni_reference'
|
||||
? '全模态参考'
|
||||
: '全部推荐模式'
|
||||
if (keyframeQuality.value && typeof metadata.shotId === 'string') return `${episode} · 单镜头`
|
||||
return videoQuality.value ? `${episode} · ${mode}` : episode
|
||||
})
|
||||
const inputPlanCounts = computed(() => {
|
||||
@@ -78,8 +102,8 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
aria-label="隐藏制作任务记录"
|
||||
title="隐藏制作任务记录"
|
||||
@click="emit('dismiss')"
|
||||
><X :size="15" /></NButton
|
||||
>
|
||||
><X :size="15"
|
||||
/></NButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -101,12 +125,19 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
</p>
|
||||
<NAlert v-if="execution.status === 'running'" type="info" :show-icon="false" class="mt-3">
|
||||
{{
|
||||
videoQuality
|
||||
? '系统会继续生成、检查并按需修复。'
|
||||
: '系统会继续处理剩余内容并保存已完成结果。'
|
||||
videoQuality ? '系统会继续生成、检查并按需修复。' : '系统会继续处理剩余内容并保存已完成结果。'
|
||||
}}可以离开或刷新页面,返回后会继续显示本次任务进度,请勿重复提交。
|
||||
</NAlert>
|
||||
<NAlert v-else-if="execution.status === 'completed'" type="success" :show-icon="false" class="mt-3">
|
||||
<NAlert
|
||||
v-else-if="execution.status === 'completed'"
|
||||
:type="
|
||||
keyframeQuality && (!keyframeCounts || keyframeCounts.repairFailed + keyframeCounts.failed > 0)
|
||||
? 'warning'
|
||||
: 'success'
|
||||
"
|
||||
:show-icon="false"
|
||||
class="mt-3"
|
||||
>
|
||||
<p>本轮任务已结束,页面正在重新读取镜头资产状态。</p>
|
||||
<p v-if="videoQuality" class="mt-2 text-xs">
|
||||
目标 {{ result.targetCount ?? execution.total }} · 通过 {{ result.passed ?? 0 }} · 修复耗尽
|
||||
@@ -117,7 +148,14 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
输入规划:首帧模式 {{ inputPlanCounts.firstFrame }} · 全模态参考
|
||||
{{ inputPlanCounts.omniReference }}
|
||||
</p>
|
||||
<p v-else class="mt-2 text-xs">
|
||||
<p v-else-if="keyframeQuality" class="mt-2 text-xs">
|
||||
<template v-if="keyframeCounts"
|
||||
>目标 {{ keyframeCounts.targetCount }} · 通过 {{ keyframeCounts.passed }} · 修复未通过
|
||||
{{ keyframeCounts.repairFailed }} · 调用失败 {{ keyframeCounts.failed }}</template
|
||||
>
|
||||
<template v-else>后端首帧质量统计不完整,请查看任务详情并刷新核对。</template>
|
||||
</p>
|
||||
<p v-else-if="!videoQuality" class="mt-2 text-xs">
|
||||
共 {{ result.total ?? execution.total }} · 生成 {{ result.generated ?? execution.current }} · 跳过
|
||||
{{ result.skipped ?? 0 }} · 阻塞 {{ result.blocked ?? 0 }} · 失败 {{ result.failed ?? 0 }}
|
||||
</p>
|
||||
@@ -125,7 +163,7 @@ function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
<NAlert v-else-if="execution.status === 'failed'" type="error" :show-icon="false" class="mt-3">
|
||||
<p>{{ execution.error || '制作任务执行失败。' }}</p>
|
||||
<p class="mt-2 text-xs">
|
||||
请先刷新下方视频状态,确认已成功的镜头;处理报错原因后,只对仍处于“可执行”的镜头重新提交。
|
||||
请先刷新相关资产状态,确认已成功的镜头;处理报错原因后,只对仍处于“可执行”的镜头重新提交。
|
||||
</p>
|
||||
</NAlert>
|
||||
<details class="mt-3 text-[10px] text-muted">
|
||||
|
||||
Reference in new issue
Block a user