feat: 同步精简接口并统一表单校验

This commit is contained in:
GJ
2026-09-10 22:34:47 +08:00
parent 82d7bde631
commit 2eea0ea72e
66 changed files with 1611 additions and 1100 deletions
+7 -18
View File
@@ -11,7 +11,7 @@ import { workflowCheckpoints } from '../workflows/selectors'
import { getOperation, runOperation } from '../workflows/operations'
import HistoryPanel from '../workflows/HistoryPanel.vue'
import ConfirmAction from '../workflows/ConfirmAction.vue'
import { downloadText, formatDate } from '../../lib/format'
import { downloadText } from '../../lib/format'
import EpisodeReader from './EpisodeReader.vue'
/** 剧本创作工作区,正式数据库内容为准,checkpoint 只补充计划与恢复信息。 */
@@ -44,7 +44,7 @@ const stages = computed(() => [
{ label: '角色设定', done: !!project.value?.characters.length },
{ label: '世界观', done: !!project.value?.world },
{ label: '编写剧集', done: !!total.value && episodes.value.length >= total.value },
{ label: '审核与改写', done: project.value?.reviews[0]?.passed === true },
{ label: '审核与改写', done: state.value?.reviewPassed === true },
{ label: '完成', done: complete.value }
])
@@ -212,24 +212,13 @@ function exportScript() {
<EmptyState v-else title="尚无世界观" description="世界观会在角色设定之后生成。" />
</div>
<div v-if="tab === 'review'" class="p-6 lg:p-8">
<div v-if="project?.reviews.length" class="space-y-5">
<article v-for="review in project.reviews" :key="review.id" class="pb-5">
<div class="mb-3 flex justify-between gap-3">
<span
class="text-sm font-medium"
:class="review.passed ? 'text-success' : 'text-danger'"
>{{ review.passed ? '审核通过' : '需要修改' }}</span
><time class="text-xs text-muted">{{ formatDate(review.createdAt) }}</time>
</div>
<p class="whitespace-pre-wrap text-sm leading-7">
{{ review.message || '本次审核未附加说明。' }}
</p>
</article>
</div>
<p v-if="typeof state?.reviewPassed === 'boolean'" class="text-sm">
{{ state.reviewPassed ? '最近工作流审核通过' : '最近工作流审核未通过' }}
</p>
<EmptyState
v-else
title="还没有审核记录"
description="剧集生成完成后,工作流会进行内容审核与必要的改写。"
title="暂无可用审核结果"
description="项目详情不再提供审核记录;可在执行记录中查看工作流状态。"
/><NCollapse v-if="state?.rewriteSuggestion" class="mt-5 text-sm"
><NCollapseItem name="details"
><template #header>查看改写建议原文</template>