fix(short-drama-agent-front): 优化拆解引导与质量规则配置
This commit is contained in:
1 parent
c6ef595a8e
commit
2db8549818
13 files changed
+626
-225
No files matched your search
@@ -18,6 +18,7 @@ import { productionMessage } from '../production/production-messages'
|
||||
import StoryboardPreparation from '../storyboard-preparation/StoryboardPreparation.vue'
|
||||
import ProjectSettingsDialog from '../generation-config/components/ProjectSettingsDialog.vue'
|
||||
import { projectGenerationRevisionKey, projectSettingsOpenKey } from '../generation-config/context'
|
||||
import type { ProjectSettingsTab } from '../generation-config/context'
|
||||
import CreateDramaSkeleton from '../create-drama/CreateDramaSkeleton.vue'
|
||||
import BreakdownSkeleton from '../breakdown/BreakdownSkeleton.vue'
|
||||
import VisualStyleSkeleton from '../visual-style/VisualStyleSkeleton.vue'
|
||||
@@ -39,8 +40,14 @@ const generationRevision = ref(0)
|
||||
provide(projectGenerationRevisionKey, generationRevision)
|
||||
/** 项目标题栏共用配置弹窗开关。 */
|
||||
const settingsOpen = ref(false)
|
||||
/** 打开标题栏已有的项目配置抽屉,保留当前镜头与工作区。 */
|
||||
function openProjectSettings() {
|
||||
/** 本次项目配置打开的指定分类,不改变当前工作区路由。 */
|
||||
const settingsTab = ref<ProjectSettingsTab>('generation')
|
||||
/**
|
||||
* 打开标题栏已有配置抽屉,保留当前镜头与工作区。
|
||||
* @param tab 本次需要定位的配置分类
|
||||
*/
|
||||
function openProjectSettings(tab: ProjectSettingsTab = 'generation') {
|
||||
settingsTab.value = tab
|
||||
settingsOpen.value = true
|
||||
}
|
||||
provide(projectSettingsOpenKey, openProjectSettings)
|
||||
@@ -48,7 +55,7 @@ provide(projectSettingsOpenKey, openProjectSettings)
|
||||
watch(
|
||||
() => route.query.configure,
|
||||
value => {
|
||||
if (value === 'profile') settingsOpen.value = true
|
||||
if (value === 'profile') openProjectSettings()
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
@@ -292,7 +299,7 @@ onScopeDispose(() => {
|
||||
size="small"
|
||||
aria-label="项目配置"
|
||||
:disabled="!context.project.value"
|
||||
@click="settingsOpen = true"
|
||||
@click="openProjectSettings()"
|
||||
><template #icon><Settings2 :size="15" aria-hidden="true" /></template
|
||||
><span class="project-config-label">项目配置</span></NButton
|
||||
>
|
||||
@@ -315,9 +322,11 @@ onScopeDispose(() => {
|
||||
:key="id"
|
||||
v-if="context.project.value?.id === id"
|
||||
v-model:open="settingsOpen"
|
||||
:initial-tab="settingsTab"
|
||||
:project-id="id"
|
||||
:disabled="operation.pending"
|
||||
@saved="projectSettingsSaved"
|
||||
@quality-saved="context.refresh()"
|
||||
/>
|
||||
<div class="project-view">
|
||||
<RouterView v-if="context.project.value?.id === id && currentAccess?.enabled" :key="id" />
|
||||
|
||||
Reference in new issue
Block a user