feat(short-drama-agent-front): 补齐后端生产与质量功能

This commit is contained in:
GJ committed 2026-10-08 18:28:35 +08:00
1 parent 967c4ebea1
commit 470b52e26d
52 files changed
+3754 -1075

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
<script setup lang="ts">
import { NAlert, NButton } from 'naive-ui'
/** 只读诊断模块的展示参数。 */
interface Props {
/** 模块标题,同时用作无障碍名称。 */
title: string
/** 查询说明。 */
description?: string
/** 当前是否正在读取。 */
loading?: boolean
/** 当前查询错误。 */
error?: string
}
/** 多个历史和诊断入口共用折叠、刷新与错误展示。 */
defineProps<Props>()
/** 展开状态由调用方决定,只在展开后读取诊断。 */
const open = defineModel<boolean>('open', { default: false })
/** 显式刷新只发出读取事件,不产生任何生成或修复操作。 */
const emit = defineEmits<{ refresh: [] }>()
</script>
<template>
<!-- 以下是只读诊断的标题、展开与手动刷新模块 -->
<section class="workspace-panel text-xs leading-6" :aria-label="title">
<div class="flex flex-wrap items-center justify-between gap-3">
<strong>{{ title }}</strong>
<div class="flex items-center gap-3">
<NButton text size="small" :aria-label="`${open ? '收起' : '查看'}${title}`" @click="open = !open">
{{ open ? '收起' : '查看' }}
</NButton>
<NButton
v-if="open"
text
size="small"
:loading="loading"
:aria-label="`刷新${title}`"
@click="emit('refresh')"
>
刷新
</NButton>
</div>
</div>
<p v-if="description" class="mt-1 text-muted">{{ description }}</p>
<!-- 以下是读取状态、错误与实际诊断结果模块 -->
<div v-if="open" class="mt-3">
<NAlert v-if="error" type="error" :show-icon="false" role="alert">{{ error }}</NAlert>
<p v-if="loading" class="text-muted" role="status">正在读取后端记录…</p>
<slot v-else />
</div>
</section>
</template>