From 010f6378730e98b284f015546d4361cea08e5c60 Mon Sep 17 00:00:00 2001 From: linfeng <2819853134@qq.com> Date: Tue, 25 Mar 2025 12:54:26 +0800 Subject: [PATCH] lin --- .../src/app/main/layout/NavigationMenu.tsx | 46 ++++++----------- .../src/app/main/systemlog/SystemLogPage.tsx | 3 ++ .../components/layout/admin/AdminLayout.tsx | 2 +- apps/web/src/routes/index.tsx | 49 ++++--------------- 4 files changed, 27 insertions(+), 73 deletions(-) create mode 100644 apps/web/src/app/main/systemlog/SystemLogPage.tsx diff --git a/apps/web/src/app/main/layout/NavigationMenu.tsx b/apps/web/src/app/main/layout/NavigationMenu.tsx index 4ffd306..7fcd7be 100644 --- a/apps/web/src/app/main/layout/NavigationMenu.tsx +++ b/apps/web/src/app/main/layout/NavigationMenu.tsx @@ -44,43 +44,23 @@ const items = [ null, null, ), + getItem( + "系统日志", + "/systemlog", + , + null, + null, + ), getItem( "系统设置", "/admin", , [ getItem("部门设置", "/admin/department", null, null, null), + getItem("角色设置", "/admin/role", null, null, null), ], null, ), - getItem( - "训练计划", - "/plan", - , - [ - getItem("周训练计划", "/plan/weekplan", null, null, null), - getItem("月训练计划", "/plan/monthplan", null, null, null), - ], - null, - ), - getItem( - "每日填报", - "/daily", - , - null, - null, - ), - getItem( - "考核成绩", - "/assessment", - , - [ - getItem("岗位", "/assessment/positionassessment", null, null, null), - getItem("共同", "/assessment/commonassessment", null, null, null), - getItem("体育", "/assessment/sportsassessment", null, null, null), - ], - null, - ) ]; const NavigationMenu: React.FC = () => { @@ -89,11 +69,13 @@ const NavigationMenu: React.FC = () => { const children2Parent: any = { "^/plan/weekplan": ["/plan"], "^/plan/monthplan": ["/plan"], - // 添加考核成绩子路径的匹配规则 - "^/assessment/positionassessment": ["/assessment"], - "^/assessment/commonassessment": ["/assessment"], - "^/assessment/sportsassessment": ["/assessment"], "^/admin/department": ["/admin"], + "^/admin/role": ["/admin"], + "^/admin/term": ["/admin"], + "^/admin/taxonomy": ["/admin"], + "^/admin/rolemap": ["/admin"], + "^/admin/transform": ["/admin"], + "^/admin/app_config": ["/admin"], }; // 选中的菜单 diff --git a/apps/web/src/app/main/systemlog/SystemLogPage.tsx b/apps/web/src/app/main/systemlog/SystemLogPage.tsx new file mode 100644 index 0000000..e73543a --- /dev/null +++ b/apps/web/src/app/main/systemlog/SystemLogPage.tsx @@ -0,0 +1,3 @@ +export default function SystemLogPage() { + return
SystemLogPage
; +} \ No newline at end of file diff --git a/apps/web/src/components/layout/admin/AdminLayout.tsx b/apps/web/src/components/layout/admin/AdminLayout.tsx index ed2cd5a..7759f57 100755 --- a/apps/web/src/components/layout/admin/AdminLayout.tsx +++ b/apps/web/src/components/layout/admin/AdminLayout.tsx @@ -9,7 +9,7 @@ const { Content } = Layout; export default function AdminLayout() { return ( - + {/* */} diff --git a/apps/web/src/routes/index.tsx b/apps/web/src/routes/index.tsx index 81a15aa..6b89a3c 100755 --- a/apps/web/src/routes/index.tsx +++ b/apps/web/src/routes/index.tsx @@ -15,6 +15,9 @@ import Dashboard from "../app/main/home/page"; import WeekPlanPage from "../app/main/plan/weekplan/page"; import StaffInformation from "../app/main/staffinformation/page"; import DeptSettingPage from "../app/main/admin/deptsettingpage/page"; +import { adminRoute } from "./admin-route"; +import AdminLayout from "../components/layout/admin/AdminLayout"; +import SystemLogPage from "../app/main/systemlog/SystemLogPage"; interface CustomIndexRouteObject extends IndexRouteObject { name?: string; breadcrumb?: string; @@ -60,48 +63,14 @@ export const routes: CustomRouteObject[] = [ path: "/staff", element: , }, + { + path: "/systemlog", + element: , + }, { path: "/admin", - children: [ - { - path: "department", - element: , - }, - ] - }, - { - path:"/plan", - children:[ - { - path:"weekplan", - element: - }, - { - path:"monthplan", - element: - } - ] - }, - { - path:"/daily", - element: - }, - { - path:"/assessment", - children:[ - { - path:"positionassessment", - element: - }, - { - path:"commonassessment", - element: - }, - { - path:"sportsassessment", - element: - } - ] + element: , + children:adminRoute.children }, ],