Align admin shell with reference app

This commit is contained in:
2026-06-10 14:58:45 +08:00
parent f4bca66a78
commit 1aa661e823
5 changed files with 28 additions and 9 deletions
+1 -1
View File
@@ -7085,7 +7085,7 @@
"name": "KnowledgeBase",
"title": "menu-title.knowledgeBase",
"authCode": null,
"path": "/ai-platform/knowledge",
"path": "/ai-platform/knowledge-base",
"type": "menu",
"component": "/ai-platform/knowledge/index",
"redirect": null,
+3 -3
View File
@@ -47,12 +47,12 @@ export const overridesPreferences = defineOverridesPreferences({
source: Logo,
},
widget: {
fullscreen: false,
globalSearch: false,
fullscreen: true,
globalSearch: true,
languageToggle: false,
lockScreen: false,
notification: true,
refresh: false,
refresh: true,
sidebarBranding: true,
sidebarToggle: true,
themeToggle: true,
@@ -1,6 +1,23 @@
import type { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
path: '/ai-platform/knowledge',
redirect: '/ai-platform/knowledge-base',
},
{
path: '/ai-platform/knowledge/detail/:id',
redirect: (to) => `/ai-platform/knowledge-base/detail/${to.params.id}`,
},
{
path: '/app/:appCode/ai-platform/knowledge',
redirect: (to) => `/app/${to.params.appCode}/ai-platform/knowledge-base`,
},
{
path: '/app/:appCode/ai-platform/knowledge/detail/:id',
redirect: (to) =>
`/app/${to.params.appCode}/ai-platform/knowledge-base/detail/${to.params.id}`,
},
{
meta: {
hideInMenu: true,
@@ -70,7 +87,7 @@ const routes: RouteRecordRaw[] = [
title: '知识库详情',
},
name: 'AIKnowledgeDetail',
path: '/ai-platform/knowledge/detail/:id',
path: '/ai-platform/knowledge-base/detail/:id',
component: () => import('#/views/ai-platform/knowledge/detail/index.vue'),
},
// 知识库详情 - 子应用
@@ -80,7 +97,7 @@ const routes: RouteRecordRaw[] = [
title: '知识库详情',
},
name: 'SubAppAIKnowledgeDetail',
path: '/app/:appCode/ai-platform/knowledge/detail/:id',
path: '/app/:appCode/ai-platform/knowledge-base/detail/:id',
component: () => import('#/views/ai-platform/knowledge/detail/index.vue'),
},
];
@@ -867,7 +867,7 @@ async function handleSaveSettings() {
}
function handleBack() {
router.push(appContextStore.getContextPath('/ai-platform/knowledge'));
router.push(appContextStore.getContextPath('/ai-platform/knowledge-base'));
}
// Tab 切换时加载数据
@@ -201,7 +201,7 @@ async function handleConfirm() {
// 跳转到详情页
router.push(
appContextStore.getContextPath(
`/ai-platform/knowledge/detail/${res.id}`,
`/ai-platform/knowledge-base/detail/${res.id}`,
),
);
}
@@ -217,7 +217,9 @@ async function handleConfirm() {
function handleDetail(item: KnowledgeBaseListItem) {
router.push(
appContextStore.getContextPath(`/ai-platform/knowledge/detail/${item.id}`),
appContextStore.getContextPath(
`/ai-platform/knowledge-base/detail/${item.id}`,
),
);
}