perf(short-drama-agent-front): 优化制作工作台交互与移动端布局
This commit is contained in:
1 parent
b5eaed3981
commit
54a381ebd3
37 files changed
+1217
-426
No files matched your search
@@ -24,6 +24,7 @@ import { productionStatusLabel } from './model'
|
||||
import { useProduction } from './useProduction'
|
||||
import ProductionReceipt from './components/ProductionReceipt.vue'
|
||||
import ShotProductionAssets from './components/ShotProductionAssets.vue'
|
||||
import ActionMenu from '../../components/ui/ActionMenu.vue'
|
||||
import AdvancedProduction from './components/AdvancedProduction.vue'
|
||||
import StaleKeyframeNotice from './components/StaleKeyframeNotice.vue'
|
||||
import { routeLocationKey } from 'vue-router'
|
||||
@@ -70,6 +71,14 @@ const {
|
||||
promptExecution,
|
||||
videoExecution
|
||||
} = useProduction()
|
||||
/** 当前镜头资产组件引用,标题菜单仅操作此镜头的只读检查弹窗。 */
|
||||
const shotAssetsRef = ref<InstanceType<typeof ShotProductionAssets> | null>(null)
|
||||
/** 标题状态只描述最近视频任务,不能表示质量通过或当前主视频仍可用。 */
|
||||
const latestVideoTaskLabel = computed(() =>
|
||||
videoStatusItem.value?.status === 'completed'
|
||||
? '最近视频任务:生成完成'
|
||||
: `最近视频任务:${productionStatusLabel(videoStatusItem.value?.status ?? 'not_started')}`
|
||||
)
|
||||
/** 首帧质量任务在关闭弹窗后仍可观察,刷新页面后恢复持久化句柄。 */
|
||||
const keyframeQualityExecution = useWorkflowExecution(id, 'keyframe-quality')
|
||||
|
||||
@@ -254,7 +263,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WorkspacePage split compact class="production-workspace-page"
|
||||
<WorkspacePage split compact mobile-scroll class="production-workspace-page compact-shot-workspace"
|
||||
><template #header
|
||||
><div class="workspace-toolbar">
|
||||
<div class="toolbar-episode">
|
||||
@@ -278,7 +287,17 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
></span
|
||||
>
|
||||
<div class="toolbar-actions">
|
||||
<NButton :disabled="blocked || !episodeNo" @click="qualityOpen = true">首帧质量生成</NButton>
|
||||
<!-- 以下是移动端图标入口模块,桌面保留完整文字,手机保留中文无障碍说明 -->
|
||||
<NButton
|
||||
class="mobile-toolbar-icon"
|
||||
:disabled="blocked || !episodeNo"
|
||||
aria-label="首帧质量生成"
|
||||
title="首帧质量生成"
|
||||
@click="qualityOpen = true"
|
||||
>
|
||||
<Image :size="18" class="mobile-action-icon" />
|
||||
<span class="workspace-action-label">首帧质量生成</span>
|
||||
</NButton>
|
||||
|
||||
<WorkspaceTools
|
||||
v-model:open="toolsOpen"
|
||||
@@ -696,10 +715,11 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
}}<span v-if="query.data.value"> 当前保留上次读取的数据,生产操作已暂停。</span></NAlert
|
||||
></NScrollbar
|
||||
>
|
||||
<!-- 以下是需要处理的项目状态摘要模块,数量为零的项目不占空间 -->
|
||||
<div v-if="staleKeyframes || staleVideos || identityBlocked" class="workspace-inline-status">
|
||||
<span
|
||||
>首帧待更新 {{ staleKeyframes }} · 视频待更新 {{ staleVideos }} · 身份待确认 {{ identityBlocked }}</span
|
||||
>
|
||||
<span v-if="staleKeyframes">首帧待更新 {{ staleKeyframes }}</span>
|
||||
<span v-if="staleVideos">视频待更新 {{ staleVideos }}</span>
|
||||
<span v-if="identityBlocked">身份待确认 {{ identityBlocked }}</span>
|
||||
</div>
|
||||
<div v-if="shots.length" class="panel production-workspace workspace-surface">
|
||||
<nav class="production-shot-list directory-panel" aria-label="本集生产镜头">
|
||||
@@ -763,22 +783,37 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</NScrollbar>
|
||||
</nav>
|
||||
<article class="production-detail min-w-0">
|
||||
<NScrollbar v-if="shot" class="panel-scroll" content-class="p-5 lg:p-7">
|
||||
<NScrollbar v-if="shot" class="panel-scroll" content-class="shot-detail-content p-5 lg:p-7">
|
||||
<header class="mb-5 pb-5">
|
||||
<NAlert v-if="linkedShotMissing" type="warning" :show-icon="false" class="mb-4"
|
||||
>链接中的镜头已不存在或不属于该剧集,请在左侧重新选择。</NAlert
|
||||
>
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div>
|
||||
<p class="eyebrow">段落 {{ shot.beatNo }} · 镜头 {{ shot.shotNo }}</p>
|
||||
<h3 class="mt-2 text-lg font-semibold">{{ shot.title }}</h3>
|
||||
</div>
|
||||
<!-- 以下是镜头编号与最近视频任务状态模块,分别对齐左右边缘 -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<p class="eyebrow">段落 {{ shot.beatNo }} · 镜头 {{ shot.shotNo }}</p>
|
||||
<StatusBadge
|
||||
v-if="videoStatusItem"
|
||||
:status="videoStatusItem.status"
|
||||
:label="productionStatusLabel(videoStatusItem.status)"
|
||||
:label="latestVideoTaskLabel"
|
||||
/>
|
||||
</div>
|
||||
<!-- 以下是镜头标题与低频生成检查菜单模块,菜单固定在标题行最右侧 -->
|
||||
<div class="mt-2 flex items-center justify-between gap-3">
|
||||
<h3 class="min-w-0 flex-1 break-words text-lg font-semibold">{{ shot.title }}</h3>
|
||||
<div class="shrink-0">
|
||||
<ActionMenu
|
||||
label="镜头资产更多操作"
|
||||
:items="[
|
||||
{
|
||||
key: 'specs',
|
||||
label: '检查生成规格与模型限制',
|
||||
disabled: !shotAssetsRef || shotAssetsRef.inspecting
|
||||
}
|
||||
]"
|
||||
@select="shotAssetsRef?.inspectSpecs()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="shot.description" class="mt-3 text-sm leading-7">{{ shot.description }}</p>
|
||||
<NAlert
|
||||
v-if="videoStatusItem?.status === 'failed'"
|
||||
@@ -817,6 +852,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
</NAlert>
|
||||
</header>
|
||||
<ShotProductionAssets
|
||||
ref="shotAssetsRef"
|
||||
:key="shot.shotId"
|
||||
:project-id="id"
|
||||
:shot="shot"
|
||||
@@ -994,22 +1030,9 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
|
||||
}
|
||||
}
|
||||
@media (max-width: 760px) {
|
||||
/* 移动端隐藏可由镜头目录获知的重复统计,并让操作从左侧连续排列。 */
|
||||
.production-workspace-page .workspace-toolbar {
|
||||
@apply grid grid-cols-[minmax(0,_1fr)] gap-2;
|
||||
}
|
||||
.production-workspace-page .toolbar-episode,
|
||||
.production-workspace-page .toolbar-actions {
|
||||
@apply w-full min-w-0 m-0;
|
||||
}
|
||||
.production-workspace-page .toolbar-summary {
|
||||
@apply hidden;
|
||||
}
|
||||
.production-workspace-page .toolbar-actions {
|
||||
@apply justify-start;
|
||||
}
|
||||
/* 手机目录按实际内容占高,将剩余空间交给镜头正文。 */
|
||||
.production-workspace {
|
||||
@apply grid-cols-[minmax(0,_1fr)] grid-rows-[184px_minmax(0,_1fr)] gap-3;
|
||||
@apply grid-cols-[minmax(0,_1fr)] grid-rows-[auto_minmax(0,_1fr)] gap-2;
|
||||
}
|
||||
.production-pipeline {
|
||||
@apply grid-cols-[1fr];
|
||||
|
||||
Reference in new issue
Block a user