feat: 接入视频输入规划与任务筛选
This commit is contained in:
1 parent
9747a8f0ab
commit
2c3e72ae9a
7 files changed
+264
-96
No files matched your search
@@ -22,6 +22,31 @@ const statusType = computed(() =>
|
||||
)
|
||||
const finished = computed(() => ['completed', 'failed'].includes(props.execution?.status ?? ''))
|
||||
const videoQuality = computed(() => props.execution?.workflowName === 'video-quality')
|
||||
const scopeLabel = computed(() => {
|
||||
const metadata = props.execution?.metadata
|
||||
if (!metadata) return ''
|
||||
const episode = typeof metadata.episodeNo === 'number' ? `第 ${metadata.episodeNo} 集` : '全项目'
|
||||
const mode =
|
||||
metadata.inputModeFilter === 'first_frame'
|
||||
? '首帧模式'
|
||||
: metadata.inputModeFilter === 'omni_reference'
|
||||
? '全模态参考'
|
||||
: '全部推荐模式'
|
||||
return videoQuality.value ? `${episode} · ${mode}` : episode
|
||||
})
|
||||
const inputPlanCounts = computed(() => {
|
||||
const plans = result.value.inputPlans
|
||||
if (!Array.isArray(plans)) return null
|
||||
return {
|
||||
firstFrame: plans.filter(plan => isInputMode(plan, 'first_frame')).length,
|
||||
omniReference: plans.filter(plan => isInputMode(plan, 'omni_reference')).length
|
||||
}
|
||||
})
|
||||
|
||||
/** 对持久化 JSON 做最小结构校验,避免模板依赖不可信结果字段。 */
|
||||
function isInputMode(value: unknown, inputMode: string): boolean {
|
||||
return !!value && typeof value === 'object' && 'inputMode' in value && value.inputMode === inputMode
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -35,6 +60,7 @@ const videoQuality = computed(() => props.execution?.workflowName === 'video-qua
|
||||
<p v-if="execution" class="mt-2 text-xs text-muted">
|
||||
{{ executionStageLabel(execution.stage) }} · 更新于 {{ formatDate(execution.updatedAt) }}
|
||||
</p>
|
||||
<p v-if="scopeLabel" class="mt-1 text-xs text-muted">范围:{{ scopeLabel }}</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<NButton
|
||||
@@ -87,6 +113,10 @@ const videoQuality = computed(() => props.execution?.workflowName === 'video-qua
|
||||
{{ result.exhausted ?? 0 }} · 模型失败 {{ result.providerFailed ?? 0 }} · 提交失败
|
||||
{{ result.submissionFailed ?? 0 }}
|
||||
</p>
|
||||
<p v-if="videoQuality && inputPlanCounts" class="mt-2 text-xs">
|
||||
输入规划:首帧模式 {{ inputPlanCounts.firstFrame }} · 全模态参考
|
||||
{{ inputPlanCounts.omniReference }}
|
||||
</p>
|
||||
<p v-else class="mt-2 text-xs">
|
||||
共 {{ result.total ?? execution.total }} · 生成 {{ result.generated ?? execution.current }} · 跳过
|
||||
{{ result.skipped ?? 0 }} · 阻塞 {{ result.blocked ?? 0 }} · 失败 {{ result.failed ?? 0 }}
|
||||
|
||||
Reference in new issue
Block a user