fix(short-drama-agent-front): 优化工作区提示与弹窗布局
This commit is contained in:
1 parent
5b134207b8
commit
72a86171dc
35 files changed
+586
-378
No files matched your search
@@ -4,7 +4,17 @@ import { NFormItem } from 'naive-ui'
|
||||
import { integerRule, sizeRules } from '../../lib/form-rules'
|
||||
import WorkspacePage from '../../components/ui/WorkspacePage.vue'
|
||||
import WorkspaceTools from '../../components/ui/WorkspaceTools.vue'
|
||||
import { NScrollbar, NAlert, NButton, NCheckbox, NInputNumber, NProgress, NSelect } from 'naive-ui'
|
||||
import {
|
||||
NScrollbar,
|
||||
NAlert,
|
||||
NButton,
|
||||
NCheckbox,
|
||||
NInputNumber,
|
||||
NProgress,
|
||||
NSelect,
|
||||
NCollapse,
|
||||
NCollapseItem
|
||||
} from 'naive-ui'
|
||||
import { computed, inject, ref, watch } from 'vue'
|
||||
import { ArrowLeft, CheckCircle2, CircleAlert, Film, Image, MessageSquareText } from '@lucide/vue'
|
||||
import { EmptyState, StatusBadge } from '../../components/ui'
|
||||
@@ -19,7 +29,6 @@ import StaleKeyframeNotice from './components/StaleKeyframeNotice.vue'
|
||||
import { routeLocationKey } from 'vue-router'
|
||||
import { queryText } from './asset-links'
|
||||
import QualityDialog from './components/QualityDialog.vue'
|
||||
import CreativeProfileSettings from '../generation-config/components/CreativeProfileSettings.vue'
|
||||
import EpisodeAssemblyPanel from './components/EpisodeAssemblyPanel.vue'
|
||||
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
|
||||
import { useWorkflowExecution } from '../workflows/execution'
|
||||
@@ -195,25 +204,6 @@ const invalidGenerationSpecs = computed(
|
||||
(query.data.value?.keyframes.invalidGenerationSpec ?? 0) +
|
||||
(query.data.value?.prompts.invalidGenerationSpec ?? 0)
|
||||
)
|
||||
const preparationComplete = computed(() => {
|
||||
const data = query.data.value
|
||||
if (!data) return false
|
||||
return (
|
||||
data.keyframes.total > 0 &&
|
||||
data.keyframes.skipped === data.keyframes.total &&
|
||||
data.prompts.total > 0 &&
|
||||
data.prompts.skipped === data.prompts.total &&
|
||||
!identityBlocked.value &&
|
||||
!invalidGenerationSpecs.value &&
|
||||
!staleKeyframes.value
|
||||
)
|
||||
})
|
||||
const finalVideosComplete = computed(() => {
|
||||
const data = query.data.value
|
||||
if (!data?.videos.total) return false
|
||||
return data.videos.skipped === data.videos.total && !staleVideos.value && !videoRunning.value
|
||||
})
|
||||
|
||||
/** 父页查询包含整个项目的就绪统计,单镜头变更后立即刷新。 */
|
||||
function refreshProject() {
|
||||
void query.refresh()
|
||||
@@ -240,9 +230,6 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
function profileSaved() {
|
||||
operation.value.error = ''
|
||||
}
|
||||
const batchModel = computed(() => ({ concurrency: concurrency.value }))
|
||||
const batchRules = { concurrency: integerRule('批量并发') }
|
||||
const keyframeModel = computed(() => ({
|
||||
@@ -345,11 +332,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</AppForm>
|
||||
</section>
|
||||
<div class="production-tool-stack workspace-section-stack">
|
||||
<CreativeProfileSettings
|
||||
:project-id="id"
|
||||
:disabled="operation.pending"
|
||||
@saved="profileSaved"
|
||||
/>
|
||||
<!-- 以下是生产范围说明与批量操作模块 -->
|
||||
<section class="production-tool-section workspace-panel">
|
||||
<h3 class="text-sm font-semibold">处理范围与覆盖规则</h3>
|
||||
<p class="mt-3 text-xs leading-6 text-muted">
|
||||
@@ -707,11 +690,6 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<NAlert v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||
</NAlert>
|
||||
<div v-if="preparationComplete" class="workspace-inline-status">
|
||||
<span v-if="finalVideosComplete">本项目镜头素材和视频成片已经准备完成。</span>
|
||||
<span v-else>镜头制作准备已经完成。视频生成费用较高,可按需要逐批提交视频任务。</span>
|
||||
<NButton v-if="!finalVideosComplete" text size="small" @click="toolsOpen = true">打开批量生产</NButton>
|
||||
</div>
|
||||
<NScrollbar v-if="query.error.value" class="workspace-feedback"
|
||||
><NAlert role="alert" type="error" :show-icon="false"
|
||||
>{{ query.error.value
|
||||
@@ -719,8 +697,9 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
></NScrollbar
|
||||
>
|
||||
<div v-if="staleKeyframes || staleVideos || identityBlocked" class="workspace-inline-status">
|
||||
<span>过期首帧 {{ staleKeyframes }} · 过期视频 {{ staleVideos }} · 身份前置问题 {{ identityBlocked }}</span>
|
||||
<NButton text size="small" @click="toolsOpen = true">查看处理方式</NButton>
|
||||
<span
|
||||
>首帧待更新 {{ staleKeyframes }} · 视频待更新 {{ staleVideos }} · 身份待确认 {{ identityBlocked }}</span
|
||||
>
|
||||
</div>
|
||||
<div v-if="shots.length" class="panel production-workspace workspace-surface">
|
||||
<nav class="production-shot-list directory-panel" aria-label="本集生产镜头">
|
||||
@@ -791,7 +770,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
>
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div>
|
||||
<p class="eyebrow">BEAT {{ shot.beatNo }} / SHOT {{ shot.shotNo }}</p>
|
||||
<p class="eyebrow">段落 {{ shot.beatNo }} · 镜头 {{ shot.shotNo }}</p>
|
||||
<h3 class="mt-2 text-lg font-semibold">{{ shot.title }}</h3>
|
||||
</div>
|
||||
<StatusBadge
|
||||
@@ -801,7 +780,6 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
/>
|
||||
</div>
|
||||
<p v-if="shot.description" class="mt-3 text-sm leading-7">{{ shot.description }}</p>
|
||||
<p class="mt-3 break-all font-mono text-[10px] text-muted">Shot ID · {{ shot.shotId }}</p>
|
||||
<NAlert
|
||||
v-if="videoStatusItem?.status === 'failed'"
|
||||
type="error"
|
||||
@@ -814,17 +792,20 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</p>
|
||||
<p v-else-if="videoStatusItem.retryable === true" class="mt-2">此任务可以重试。</p>
|
||||
</NAlert>
|
||||
<StaleKeyframeNotice
|
||||
v-if="selectedKeyframeStale"
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot-id="shot.shotId"
|
||||
:issues="selectedIssues"
|
||||
:inconsistent="
|
||||
keyframeItem?.primaryKeyframeStale === false &&
|
||||
selectedIssues.some(issue => issue.code === 'stale_keyframe')
|
||||
"
|
||||
/>
|
||||
<NCollapse v-if="selectedKeyframeStale" class="mt-3">
|
||||
<NCollapseItem title="首帧需要更新 · 查看相关素材" name="stale-keyframe">
|
||||
<StaleKeyframeNotice
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot-id="shot.shotId"
|
||||
:issues="selectedIssues"
|
||||
:inconsistent="
|
||||
keyframeItem?.primaryKeyframeStale === false &&
|
||||
selectedIssues.some(issue => issue.code === 'stale_keyframe')
|
||||
"
|
||||
/>
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
<NAlert
|
||||
v-if="videoItem?.primaryVideoStale"
|
||||
role="status"
|
||||
@@ -860,7 +841,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
<EmptyState
|
||||
v-else-if="query.data.value"
|
||||
title="本集还没有正式镜头"
|
||||
description="先完成剧本拆解、导演设计与正式镜头持久化,再进入镜头生产。"
|
||||
description="先完成剧本拆解和分镜设计,再进入镜头生产。"
|
||||
>
|
||||
<RouterLink :to="`/projects/${id}/storyboard`" class="button button-secondary">前往分镜设计</RouterLink>
|
||||
</EmptyState>
|
||||
@@ -987,7 +968,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
}
|
||||
}
|
||||
.workspace-inline-status {
|
||||
@apply flex items-center flex-wrap justify-between gap-y-2 gap-x-4 py-[7px] px-3 shrink-0 rounded-none bg-(--app-subtle) text-xs;
|
||||
@apply flex items-center flex-wrap justify-between gap-y-2 gap-x-4 py-[10px] px-3 shrink-0 rounded-none bg-(--app-subtle) text-xs;
|
||||
}
|
||||
.production-workspace {
|
||||
@apply flex-1 min-h-0 items-stretch overflow-hidden;
|
||||
|
||||
Reference in new issue
Block a user