refactor: 制作任务状态改为用户友好文案

This commit is contained in:
GouJ committed 2026-09-26 20:56:55 +08:00
1 parent 291c731678
commit ffa8c4be52
1 file changed
+10 -10
@@ -8,7 +8,7 @@ import type { WorkflowExecution } from './execution.types'
const props = withDefaults(
defineProps<{ title?: string; execution: WorkflowExecution | null; loading: boolean; error: string }>(),
{ title: '后台任务' }
{ title: '制作任务' }
)
const emit = defineEmits<{ refresh: []; dismiss: [] }>()
const percentage = computed(() => executionPercentage(props.execution?.current ?? 0, props.execution?.total ?? 0))
@@ -67,16 +67,16 @@ function isInputMode(value: unknown, inputMode: string): boolean {
class="icon-button"
quaternary
:loading="loading"
aria-label="刷新后台任务状态"
title="刷新后台任务状态"
aria-label="刷新制作任务状态"
title="刷新制作任务状态"
@click="emit('refresh')"
><RefreshCw :size="15" /></NButton
><NButton
v-if="finished || error"
class="icon-button"
quaternary
aria-label="隐藏后台任务记录"
title="隐藏后台任务记录"
aria-label="隐藏制作任务记录"
title="隐藏制作任务记录"
@click="emit('dismiss')"
><X :size="15" /></NButton
>
@@ -94,7 +94,7 @@ function isInputMode(value: unknown, inputMode: string): boolean {
/>
<p class="mt-3 text-xs">
<template v-if="execution.total > 0">已处理 {{ execution.current }} / {{ execution.total }}</template>
<template v-else>后端正在确定本次任务范围</template>
<template v-else>正在准备本次任务</template>
<template v-if="execution.currentResourceId">
· 当前镜头 <code>{{ execution.currentResourceId }}</code></template
>
@@ -102,8 +102,8 @@ function isInputMode(value: unknown, inputMode: string): boolean {
<NAlert v-if="execution.status === 'running'" type="info" :show-icon="false" class="mt-3">
{{
videoQuality
? '后端会继续生成、校验并按需修复。'
: '后端会继续处理剩余镜头并保存已完成的提示词。'
? '系统会继续生成、检查并按需修复。'
: '系统会继续处理剩余内容并保存已完成结果。'
}}可以离开或刷新页面,返回后会继续显示本次任务进度,请勿重复提交。
</NAlert>
<NAlert v-else-if="execution.status === 'completed'" type="success" :show-icon="false" class="mt-3">
@@ -123,7 +123,7 @@ function isInputMode(value: unknown, inputMode: string): boolean {
</p>
</NAlert>
<NAlert v-else-if="execution.status === 'failed'" type="error" :show-icon="false" class="mt-3">
<p>{{ execution.error || '后台任务执行失败。' }}</p>
<p>{{ execution.error || '制作任务执行失败。' }}</p>
<p class="mt-2 text-xs">
请先刷新下方视频状态,确认已成功的镜头;处理报错原因后,只对仍处于“可执行”的镜头重新提交。
</p>
@@ -131,7 +131,7 @@ function isInputMode(value: unknown, inputMode: string): boolean {
<p class="mt-3 break-all font-mono text-[10px] text-muted">执行 ID · {{ execution.id }}</p>
</template>
<NAlert v-if="error" type="error" :show-icon="false" class="mt-3">
{{ error }}。任务可能仍在后端运行,请先点击刷新;不要直接重复提交。
{{ error }}。任务可能仍在运行,请先点击刷新;不要直接重复提交。
</NAlert>
</section>
</template>