From 16e84c6991650f7ebc340efb94291c78327a4aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?cls=5F=E5=AE=81=E6=B3=A2=E6=9C=AC=E6=9C=BA?= <908705107@qq.com> Date: Wed, 10 Jun 2026 19:57:22 +0800 Subject: [PATCH] Align control center menu source --- backend-fastapi/core/menu/service.py | 9 +- backend-fastapi/db_init.json | 8 +- .../src/views/_core/control-center/index.vue | 1162 ----------------- 3 files changed, 9 insertions(+), 1170 deletions(-) delete mode 100644 web/apps/web-ele/src/views/_core/control-center/index.vue diff --git a/backend-fastapi/core/menu/service.py b/backend-fastapi/core/menu/service.py index 4510fcb..829a4e8 100644 --- a/backend-fastapi/core/menu/service.py +++ b/backend-fastapi/core/menu/service.py @@ -17,7 +17,7 @@ from core.menu.schema import MenuCreate, MenuUpdate menu_cache = CacheManager(prefix="menu:") # 缓存key -AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v5" +AI_AGENT_ADMIN_MENU_CACHE_VERSION = "v6" MENU_TREE_CACHE_KEY = f"tree:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}" USER_ROUTE_CACHE_PREFIX = f"user_route:ai_agent_admin:{AI_AGENT_ADMIN_MENU_CACHE_VERSION}:" @@ -36,6 +36,7 @@ AI_AGENT_ADMIN_MENU_NAMES = { "SystemMenu", "SystemRole", "Message", + "MessageList", "AnnouncementList", "AnnouncementManage", } @@ -50,10 +51,10 @@ def _filter_ai_agent_admin_menus(menus: List[Menu]) -> List[Menu]: def _normalize_ai_agent_admin_menu(menu: Menu) -> None: - """Route legacy low-code home to a lightweight static dashboard.""" + """Route the retained control center to the original rendered dashboard.""" if menu.name == "ControlCenter": - menu.path = "/control-center" - menu.component = "_core/control-center/index" + menu.path = "/page-render/main_home" + menu.component = "online-dev/page-render/index" menu.query = None diff --git a/backend-fastapi/db_init.json b/backend-fastapi/db_init.json index 7de5896..d1d6864 100644 --- a/backend-fastapi/db_init.json +++ b/backend-fastapi/db_init.json @@ -7038,9 +7038,9 @@ "name": "ControlCenter", "title": "menu-title.controlCenter", "authCode": null, - "path": "/control-center", + "path": "/page-render/main_home", "type": "menu", - "component": "_core/control-center/index", + "component": "online-dev/page-render/index", "redirect": null, "activePath": null, "query": null, @@ -9341,7 +9341,7 @@ "fields": { "application_id": "23CFVEUHdZcOQyku1mbIO", "config_key": "frontend_preferences", - "config_value": "{\"app\":{\"defaultHomePath\":\"/control-center\"}}", + "config_value": "{\"app\":{\"defaultHomePath\":\"/page-render/main_home\"}}", "config_type": "preferences", "description": "子应用UI偏好配置", "status": true, @@ -9361,7 +9361,7 @@ "fields": { "application_id": "uRFPsrZ0BSJodp-qesFq6", "config_key": "frontend_preferences", - "config_value": "{\"app\":{\"defaultHomePath\":\"/control-center\"}}", + "config_value": "{\"app\":{\"defaultHomePath\":\"/page-render/main_home\"}}", "config_type": "preferences", "description": "子应用UI偏好配置", "status": true, diff --git a/web/apps/web-ele/src/views/_core/control-center/index.vue b/web/apps/web-ele/src/views/_core/control-center/index.vue deleted file mode 100644 index 0c8d1f4..0000000 --- a/web/apps/web-ele/src/views/_core/control-center/index.vue +++ /dev/null @@ -1,1162 +0,0 @@ - - - - - - - - AI - - {{ greeting }},{{ displayName }},欢迎回来 - 这里汇总智能体、流程编排、公告消息和服务器状态,方便快速进入协作工作。 - - - {{ currentTime }} - {{ currentDate }} - - - - - - - 今日状态 - - - {{ successRate }}% - 最近流程完成率 - - - - - - - - - - 协作中心 - - 更多 - - - - - - - - {{ item.title }} - {{ item.value }} - - - - - - - - 我的应用 - - - - - - - {{ entry.title }} - - - - - - - - - 最新公告 - - - - - {{ item.title }} - {{ item.summary || item.publisher_name || '系统公告' }} - - - - - - - - - 消息通知 - - - - - {{ item.title }} - {{ formatTime(item.created_at) }} · {{ item.msg_type }} - - - - - - - - - - 服务器信息 - - {{ - serverOverview - ? `${serverOverview.basic_info.hostname} (${serverOverview.basic_info.ip_address}) · 运行 ${serverOverview.boot_time.uptime_formatted}` - : '等待服务器采集数据' - }} - - - - - - - - {{ item.label }} - {{ item.value }} - {{ item.desc }} - - - - - - - - - 最近执行 - - 执行历史 - - - - - - - {{ run.workflow_name }} - - {{ run.total_steps }} 步 · {{ run.total_tokens }} tokens · - {{ formatTime(run.started_at) }} - - - - {{ run.status }} - - - - - - - - - - 快捷入口 - - - - - {{ link.title }} - - - - - - - - 运行概览 - - - - - - {{ item.label }} - {{ item.value }} - - - - 智能体发布率 - {{ publishedAgents }} / {{ stats.agentTotal }} - - - - 流程发布率 - {{ publishedWorkflows }} / {{ stats.workflowTotal }} - - - - - 最近执行消耗 {{ tokenTotal }} tokens - - - - - - - - -
这里汇总智能体、流程编排、公告消息和服务器状态,方便快速进入协作工作。