feat: 同步质量校验修复并精简工作台操作

This commit is contained in:
GouJ
2026-09-03 19:38:57 +08:00
parent 771b66cafc
commit 13bb6dc83b
47 changed files with 2244 additions and 260 deletions
+12 -6
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import WorkspacePage from '../../components/ui/WorkspacePage.vue'
import DetailDisclosure from '../../components/ui/DetailDisclosure.vue'
import { NAlert, NButton } from 'naive-ui'
import { LoaderCircle, LockKeyhole, LockKeyholeOpen, Palette, RefreshCw, TriangleAlert } from '@lucide/vue'
import { computed, ref } from 'vue'
@@ -105,7 +106,6 @@ function removeImage(image: VisualStyleImage) {
><div class="flex flex-wrap items-end justify-between gap-4">
<div>
<h2 class="text-lg font-semibold">项目视觉风格</h2>
<p class="mt-2 text-sm text-muted">确定项目统一的视觉语言再为人物场景和道具建立稳定身份</p>
</div>
<RouterLink :to="`/projects/${projectId}/subject-identity`" class="text-button"
>下一步主体身份 </RouterLink
@@ -128,9 +128,15 @@ function removeImage(image: VisualStyleImage) {
description="调用文本模型生成整体及分类风格。重新生成会覆盖已保存的文本与硬约束;旧身份、旧图片和已有提示词不会自动更新。"
@confirm="generate"
/>
<NButton :loading="query.loading.value" @click="query.refresh"
><template #icon><RefreshCw :size="16" /></template>刷新风格</NButton
>
<NButton
:loading="query.loading.value"
@click="query.refresh"
quaternary
class="icon-button"
aria-label="刷新风格"
title="刷新风格"
><template #icon><RefreshCw :size="16" /></template
></NButton>
</div>
</div>
<NAlert v-if="query.error.value" role="alert" type="error" :show-icon="false" class="mb-4"
@@ -139,9 +145,9 @@ function removeImage(image: VisualStyleImage) {
<p v-if="dirty" class="mb-4 text-xs text-muted">
有未保存修改AI 重生成暂不可用自动刷新不会覆盖编辑内容离开页面不会自动保存
</p>
<NAlert type="info" :show-icon="false" class="mb-5 text-xs">
<DetailDisclosure title="风格生成规则" class="mb-5">
AI
生成时若项目和世界观没有明确其它人物背景人物风格默认采用中国人物选角基线人工填写的人物背景和角色事实优先修改风格只影响之后的生成旧资产不会自动更新 </NAlert
生成时若项目和世界观没有明确其它人物背景人物风格默认采用中国人物选角基线人工填写的人物背景和角色事实优先修改风格只影响之后的生成旧资产不会自动更新 </DetailDisclosure
><StyleEditor
v-if="query.data.value"
:key="editorRevision"
@@ -1,4 +1,5 @@
<script setup lang="ts">
import DetailDisclosure from '../../../components/ui/DetailDisclosure.vue'
import { NButton, NCheckbox, NInput, NTag } from 'naive-ui'
import { computed, reactive, ref, watch } from 'vue'
import type { SaveVisualStyleInput, VisualStyle } from '../types'
@@ -84,51 +85,53 @@ function save() {
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
<div class="grid gap-5 lg:grid-cols-3">
<label
><span class="field-label">人物风格与选角背景</span
<DetailDisclosure title="分类风格与硬约束"
><div class="grid gap-5 lg:grid-cols-3">
<label
><span class="field-label">人物风格与选角背景</span
><NInput
:disabled="disabled"
placeholder="人物质感、妆造与默认选角背景;留空时 AI 默认采用中国人物基线"
class="min-h-32"
v-model:value="form.characterPrompt"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
<label
><span class="field-label">场景风格补充</span
><NInput
:disabled="disabled"
class="min-h-32"
v-model:value="form.scenePrompt"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
<label
><span class="field-label">道具风格补充</span
><NInput
:disabled="disabled"
class="min-h-32"
v-model:value="form.propPrompt"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
</div>
<label class="mt-4 block"
><span class="field-label">硬约束 · JSON 字符串数组</span
><NInput
:disabled="disabled"
placeholder="人物质感、妆造与默认选角背景;留空时 AI 默认采用中国人物基线"
class="min-h-32"
v-model:value="form.characterPrompt"
spellcheck="false"
:input-props="{ id: 'style-constraints' }"
class="min-h-24 font-mono text-xs"
v-model:value="form.constraints"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
<label
><span class="field-label">场景风格补充</span
><NInput
:disabled="disabled"
class="min-h-32"
v-model:value="form.scenePrompt"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
<label
><span class="field-label">道具风格补充</span
><NInput
:disabled="disabled"
class="min-h-32"
v-model:value="form.propPrompt"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
</div>
<label class="block"
><span class="field-label">硬约束 · JSON 字符串数组</span
><NInput
:disabled="disabled"
spellcheck="false"
:input-props="{ id: 'style-constraints' }"
class="min-h-24 font-mono text-xs"
v-model:value="form.constraints"
type="textarea"
:autosize="{ minRows: 3, maxRows: 12 }"
></NInput>
</label>
</DetailDisclosure>
<p v-if="constraintsError" class="text-xs text-danger" role="alert">{{ constraintsError }}</p>
<NCheckbox
:disabled="disabled"