feat(short-drama-agent-front): 接入首帧授权与连续性审核

This commit is contained in:
GJ committed 2026-11-07 12:23:19 +08:00
1 parent dbf97e6f98
commit 518b630a46
35 files changed
+3070 -97

No files matched your search

@@ -0,0 +1,51 @@
<script setup lang="ts">
import { computed } from 'vue'
import { NButton } from 'naive-ui'
import WorkspaceSectionHeading from '../../../components/ui/WorkspaceSectionHeading.vue'
import { executionStageLabel } from '../../workflows/execution'
import type { WorkflowExecution } from '../../workflows/execution.types'
import { userFacingText } from '../../../lib/user-facing-text'
import { formatDate } from '../../../lib/format'
/** 单次视觉审核执行状态,完成和质量通过分别表达。 */
const props = defineProps<{
/** 正式执行记录。 */ execution: WorkflowExecution
/** 只读刷新状态。 */ loading: boolean
}>()
/** 仅触发只读刷新。 */
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')
return props.execution.result?.passed === false ? '执行完成,质量未通过' : '执行完成,质量待核对'
return props.execution.status === 'pending' ? '等待审核' : '审核进行中'
})
</script>
<template>
<!-- 以下是正式执行与实际质量结论模块,不用满格绿色进度暗示通过 -->
<section class="mt-4 space-y-2 text-sm" role="status" :class="passed ? 'bg-(--app-success-soft) p-3' : ''">
<WorkspaceSectionHeading title="当前审核执行"
><template #actions
><NButton :loading="loading" @click="emit('refresh')">刷新进度</NButton></template
></WorkspaceSectionHeading
>
<p>{{ label }} · {{ executionStageLabel(execution.stage) }}</p>
<p v-if="execution.total > 0">已处理步骤:{{ execution.current }} / {{ execution.total }}</p>
<p v-else>尚无可确认的步骤进度。</p>
<p class="wrap-anywhere text-xs text-muted">
执行编号:{{ execution.id }} · {{ formatDate(execution.updatedAt) }}
</p>
<p v-if="execution.error">{{ userFacingText(execution.error) }}</p>
</section>
</template>