Add lightweight AI admin dashboard

This commit is contained in:
2026-06-11 00:17:04 +08:00
parent e3352bf04c
commit a1b9ff5146
17 changed files with 866 additions and 599 deletions
+4 -3
View File
@@ -16,6 +16,7 @@ const forbiddenComponent = () => import('#/views/_core/fallback/forbidden.vue');
const lightMenuNames = new Set([
'AIAgent',
'AIKnowledgeDetail',
'AIModelConfig',
'AIPlatform',
'AIWorkflow',
'AIWorkflowRuns',
@@ -82,8 +83,8 @@ function normalizeBackendRoute<
if (route.name !== 'ControlCenter') return route;
const normalized = { ...route };
normalized.path = '/page-render/main_home';
normalized.component = 'online-dev/page-render/index';
normalized.path = '/dashboard';
normalized.component = 'dashboard/index';
normalized.query = undefined;
return normalized;
}
@@ -158,7 +159,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
'../views/ai-platform/workflow/editor/index.vue',
'../views/ai-platform/workflow/index.vue',
'../views/ai-platform/workflow-runs/index.vue',
'../views/online-dev/page-render/index.vue',
'../views/dashboard/index.vue',
]);
const layoutMap: ComponentRecordType = {
+1 -1
View File
@@ -191,7 +191,7 @@ function setupAccessGuard(router: Router) {
if (to.path === subAppRootPath) {
const defaultHome =
preferences.app.defaultHomePath || '/page-render/main_home';
preferences.app.defaultHomePath || '/dashboard';
// 确保路径包含子应用前缀
const subAppTargetPath = defaultHome.startsWith(subAppRootPath)
? defaultHome
@@ -1,12 +1,27 @@
import type { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
meta: { hideInMenu: true },
name: 'LegacyMainHomeRedirect',
path: '/page-render/main_home',
redirect: '/dashboard',
},
{
meta: { hideInMenu: true },
name: 'AIKnowledgeLegacyRedirect',
path: '/ai-platform/knowledge',
redirect: '/ai-platform/knowledge-base',
},
{
meta: {
hideInMenu: true,
title: '模型配置',
},
name: 'AIModelConfig',
path: '/ai-platform/model',
component: () => import('#/views/ai-platform/model/index.vue'),
},
{
meta: { hideInMenu: true },
name: 'AIKnowledgeLegacyDetailRedirect',