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 {