fix: 完善剧本完成状态限制并优化表单对齐与配色
This commit is contained in:
1 parent
a24326b85d
commit
370e7bb4a6
19 files changed
+340
-67
No files matched your search
@@ -53,7 +53,7 @@ const input = computed<BreakdownInput>(() => ({ groupSize: groupSize.value, modu
|
||||
const canStart = computed(
|
||||
() =>
|
||||
!!project.value?.episodes.length &&
|
||||
project.value.status !== 'generating' &&
|
||||
project.value.status === 'completed' &&
|
||||
!!preview.value &&
|
||||
configValid.value &&
|
||||
!operation.value.pending &&
|
||||
@@ -89,7 +89,7 @@ function toggleModule(module: BreakdownModule, checked: boolean | 'indeterminate
|
||||
|
||||
/** 获取服务器生成的任务分组,不在浏览器伪造任务 ID。 */
|
||||
async function loadPreview() {
|
||||
if (!configValid.value || !project.value || previewBusy.value) return
|
||||
if (!configValid.value || project.value?.status !== 'completed' || previewBusy.value) return
|
||||
invalidatePreview()
|
||||
const version = previewVersion
|
||||
previewController = new AbortController()
|
||||
@@ -106,7 +106,7 @@ async function loadPreview() {
|
||||
|
||||
/** 长请求不随路由切换取消,返回后刷新 checkpoint 与正式项目数据。 */
|
||||
async function run(action: BreakdownAction) {
|
||||
if (!project.value || operation.value.pending || error.value) return
|
||||
if (project.value?.status !== 'completed' || operation.value.pending || error.value) return
|
||||
if (action === 'start' && !canStart.value) return
|
||||
const labels: Record<BreakdownAction, string> = {
|
||||
start: '正在拆解剧本',
|
||||
@@ -202,7 +202,13 @@ function exportResult() {
|
||||
>
|
||||
</fieldset>
|
||||
<NButton
|
||||
:disabled="!configValid || previewBusy || operation.pending || !!error"
|
||||
:disabled="
|
||||
project?.status !== 'completed' ||
|
||||
!configValid ||
|
||||
previewBusy ||
|
||||
operation.pending ||
|
||||
!!error
|
||||
"
|
||||
@click="loadPreview"
|
||||
class="self-end"
|
||||
><LoaderCircle v-if="previewBusy" :size="14" class="animate-spin" />预览分组
|
||||
@@ -320,19 +326,34 @@ function exportResult() {
|
||||
label="重试失败抽取"
|
||||
description="只重试 character / scene / prop 抽取任务中的失败项。不能用于镜头阶段失败。"
|
||||
acknowledgement
|
||||
:disabled="!recovery.retry || operation.pending || !!error"
|
||||
:disabled="
|
||||
project?.status !== 'completed' ||
|
||||
!recovery.retry ||
|
||||
operation.pending ||
|
||||
!!error
|
||||
"
|
||||
@confirm="run('retry')"
|
||||
/><ConfirmAction
|
||||
label="补齐缺失镜头"
|
||||
description="复用已完成剧集的镜头,仅生成尚未完成的 Episode Shot,再进行校验与入库。"
|
||||
acknowledgement
|
||||
:disabled="!recovery.shots || operation.pending || !!error"
|
||||
:disabled="
|
||||
project?.status !== 'completed' ||
|
||||
!recovery.shots ||
|
||||
operation.pending ||
|
||||
!!error
|
||||
"
|
||||
@confirm="run('resume-shots')"
|
||||
/><ConfirmAction
|
||||
label="修复分镜绑定"
|
||||
description="复用已有镜头,修复 SubjectRef 与视觉 Form 绑定,再校验并保存。"
|
||||
acknowledgement
|
||||
:disabled="!recovery.storyboard || operation.pending || !!error"
|
||||
:disabled="
|
||||
project?.status !== 'completed' ||
|
||||
!recovery.storyboard ||
|
||||
operation.pending ||
|
||||
!!error
|
||||
"
|
||||
@confirm="run('resume-storyboard')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user