Sfoglia il codice sorgente

✨ feat(admin): 添加数据大屏功能菜单和路由

- 在管理菜单中添加数据大屏选项,使用FundViewOutlined图标
- 添加数据大屏路由配置,路径为/big
- 设置数据大屏访问权限为dashboard:view
yourname 7 mesi fa
parent
commit
015b768ff6
2 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 7 0
      src/client/admin/menu.tsx
  2. 5 0
      src/client/admin/routes.tsx

+ 7 - 0
src/client/admin/menu.tsx

@@ -88,6 +88,13 @@ export const useMenu = () => {
       icon: <DashboardOutlined />,
       path: '/admin/dashboard'
     },
+    {
+      key: 'big',
+      label: '数据大屏',
+      icon: <FundViewOutlined />,
+      path: '/big',
+      permission: 'dashboard:view'
+    },
     {
       key: 'users',
       label: '用户管理',

+ 5 - 0
src/client/admin/routes.tsx

@@ -24,6 +24,11 @@ export const router = createBrowserRouter([
     path: '/',
     element: <Navigate to="/admin" replace />
   },
+  {
+    path: '/big',
+    element: <BigScreenDashboard />,
+    errorElement: <ErrorPage />
+  },
   {
     path: '/admin/login',
     element: <LoginPage />