feat:完善知识库管理路由权限配置
This commit is contained in:
@@ -214,8 +214,7 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '' }: Sid
|
||||
|
||||
// 🔑 如果选择了"智慧法务大模型",显示 /chat-with-llm 和 /dataset-manager 相关菜单
|
||||
if (selectedModuleName === '智慧法务大模型') {
|
||||
return item.path === '/chat-with-llm' || item.path?.startsWith('/chat-with-llm/') ||
|
||||
item.path === '/dataset-manager' || item.path?.startsWith('/dataset-manager/');
|
||||
return item.path === '/chat-with-llm' || item.path?.startsWith('/chat-with-llm/')
|
||||
}
|
||||
|
||||
// 🔑 如果选择了包含"合同"的模块
|
||||
|
||||
@@ -209,7 +209,7 @@ export default function Index() {
|
||||
// console.log('📌 [Index] 合同模块,跳转到:', targetPath);
|
||||
} else if (module.name === '智慧法务大模型') {
|
||||
// 智慧法务大模型 → 跳转到 AI 对话
|
||||
targetPath = '/chat-with-llm';
|
||||
targetPath = '/chat-with-llm/chat';
|
||||
// console.log('📌 [Index] 智慧法务大模型,跳转到:', targetPath);
|
||||
} else {
|
||||
// console.log('📌 [Index] 其他模块,跳转到:', targetPath);
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import { Outlet } from "@remix-run/react";
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
export const meta: MetaFunction = () => {
|
||||
return [
|
||||
{ title: "知识库管理 - 智能审核系统" },
|
||||
{ name: "description", content: "Dify 知识库文档管理" },
|
||||
];
|
||||
};
|
||||
|
||||
export const handle = {
|
||||
breadcrumb: "知识库管理",
|
||||
};
|
||||
|
||||
/**
|
||||
* 知识库管理布局路由
|
||||
*/
|
||||
export default function DatasetManagerLayout() {
|
||||
return <Outlet />;
|
||||
}
|
||||
Reference in New Issue
Block a user