fix(short-drama-agent-front): 修复首帧当前质量展示
This commit is contained in:
1 parent
13efe5b786
commit
8674ba0c83
18 files changed
+679
-137
No files matched your search
@@ -19,29 +19,10 @@ const props = withDefaults(
|
||||
)
|
||||
/** 仅触发只读刷新。 */
|
||||
const emit = defineEmits<{ refresh: [] }>()
|
||||
/** 只有明确质量通过且未标记恢复才使用成功语义。 */
|
||||
const passed = computed(
|
||||
() =>
|
||||
props.execution.status === 'completed' &&
|
||||
props.execution.result?.passed === true &&
|
||||
props.execution.result.qualityDecision === 'passed' &&
|
||||
props.execution.result.recoveryRequired !== true
|
||||
)
|
||||
/** 执行完成后仍清晰保留真实质量结论。 */
|
||||
/** 执行记录仅表达处理状态,当前质量由候选的正式接口独立展示。 */
|
||||
const label = computed(() => {
|
||||
if (passed.value) return '审核质量通过'
|
||||
if (props.execution.status === 'failed') return '执行失败,质量未确认'
|
||||
if (props.execution.status === 'completed') {
|
||||
const quality = props.execution.result?.qualityDecision
|
||||
const labels: Record<string, string> = {
|
||||
failed: '质量未通过',
|
||||
needs_review: '质量待复核',
|
||||
stale: '审核来源已失效',
|
||||
blocked: '质量受阻',
|
||||
insufficient_evidence: '证据不足'
|
||||
}
|
||||
return `执行完成,${typeof quality === 'string' && labels[quality] ? labels[quality] : props.execution.result?.passed === false ? '质量未通过' : '质量待核对'}`
|
||||
}
|
||||
if (props.execution.status === 'failed') return '执行失败,质量请查看当前结论'
|
||||
if (props.execution.status === 'completed') return '执行完成,质量请查看当前结论'
|
||||
return props.execution.status === 'pending'
|
||||
? '等待审核'
|
||||
: props.execution.status === 'running'
|
||||
@@ -52,7 +33,7 @@ const label = computed(() => {
|
||||
|
||||
<template>
|
||||
<!-- 以下是正式执行与实际质量结论模块,不用满格绿色进度暗示通过 -->
|
||||
<section class="mt-4 space-y-2 text-sm" role="status" :class="passed ? 'bg-(--app-success-soft) p-3' : ''">
|
||||
<section class="mt-4 space-y-2 text-sm" role="status">
|
||||
<WorkspaceSectionHeading :title="title"
|
||||
><template #actions
|
||||
><NButton v-if="refreshable" :loading="loading" @click="emit('refresh')">刷新进度</NButton></template
|
||||
@@ -64,7 +45,9 @@ const label = computed(() => {
|
||||
<p class="wrap-anywhere text-xs text-muted">
|
||||
执行编号:{{ execution.id }} · {{ formatDate(execution.updatedAt) }}
|
||||
</p>
|
||||
<p v-if="typeof execution.result?.summary === 'string'">{{ userFacingText(execution.result.summary) }}</p>
|
||||
<p v-if="typeof execution.result?.summary === 'string'">
|
||||
历史执行摘要:{{ userFacingText(execution.result.summary) }}
|
||||
</p>
|
||||
<p v-if="execution.error">{{ userFacingText(execution.error) }}</p>
|
||||
</section>
|
||||
</template>
|
||||
Reference in new issue
Block a user