From 4dbd7968f05b3c4ff9e3ac37ed7af30c3829ab3a Mon Sep 17 00:00:00 2001 From: CI Bot Date: Wed, 15 Jul 2026 21:46:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=93=BE=E8=B7=AF=E4=B8=89=E4=B8=AA=E9=98=BB=E5=A1=9E=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. EditingPlanner.css: 状态栏 display:none → flex 布局,恢复「生成历史」按钮可见 2. main.tsx: 添加 包裹,修复 antd v5 message.xxx() toast 不显示 3. EditingPlanner.tsx: handleGoToGenerate 先重置计划状态为 draft, 解决 failed 状态计划无法更新配置和触发生成的问题 Co-Authored-By: Claude Fable 5 --- apps/web/src/main.tsx | 6 +++-- .../pages/editing-planner/EditingPlanner.css | 22 ++++++++++++++++++- .../pages/editing-planner/EditingPlanner.tsx | 9 ++++++-- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx index 1c77b70f1..856a9fb16 100644 --- a/apps/web/src/main.tsx +++ b/apps/web/src/main.tsx @@ -6,7 +6,7 @@ import React from "react"; import ReactDOM from "react-dom/client"; import { RouterProvider } from "react-router-dom"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { ConfigProvider } from "antd"; +import { ConfigProvider, App as AntApp } from "antd"; import zhCN from "antd/locale/zh_CN"; import router from "./router"; import "./index.css"; @@ -91,7 +91,9 @@ ReactDOM.createRoot(document.getElementById("root")!).render( - + + + , diff --git a/apps/web/src/pages/editing-planner/EditingPlanner.css b/apps/web/src/pages/editing-planner/EditingPlanner.css index 41d25caaf..892a75d89 100644 --- a/apps/web/src/pages/editing-planner/EditingPlanner.css +++ b/apps/web/src/pages/editing-planner/EditingPlanner.css @@ -1812,7 +1812,27 @@ ═══════════════════════════════════════ */ .ep-status-bar { - display: none; + display: flex; + align-items: center; + justify-content: space-between; + padding: 6px 16px; + background: var(--ep-bg-card, #fff); + border-bottom: 1px solid var(--ep-border, #e8e8e8); + font-size: 12px; + color: var(--text-secondary, #666); + flex-shrink: 0; +} + +.ep-status-left, +.ep-status-right { + display: flex; + align-items: center; + gap: 4px; +} + +.ep-status-sep { + margin: 0 4px; + opacity: 0.35; } /* ═══════════════════════════════════════ diff --git a/apps/web/src/pages/editing-planner/EditingPlanner.tsx b/apps/web/src/pages/editing-planner/EditingPlanner.tsx index ec80485f7..783e502a4 100755 --- a/apps/web/src/pages/editing-planner/EditingPlanner.tsx +++ b/apps/web/src/pages/editing-planner/EditingPlanner.tsx @@ -955,14 +955,19 @@ const EditingPlanner: React.FC = () => { let planId = loadedPlanId; if (planId) { - // 已有计划 → 更新配置(不传 status,避免非 draft 状态被后端拒绝) + // 已有计划 → 先重置状态为 draft(failed/editing 等非 draft 状态会被后端拒绝更新和生成) + try { + await updateEditPlan(planId, { status: "draft" }); + } catch (resetErr) { + console.warn("[状态重置跳过]", resetErr); + } + // 再更新配置 try { await updateEditPlan(planId, { config, total_duration: totalDuration, }); } catch (updateErr) { - // 非 draft 状态(如 failed/editing)PUT 会被拒绝,忽略继续生成 console.warn("[计划更新跳过]", updateErr); } } else { -- 2.54.0