Ver Fonte

Merge branch 'master' of http://192.168.123.2:3000/fort23/010GMClient

Administrator há 1 ano atrás
pai
commit
49a176f548
2 ficheiros alterados com 81 adições e 63 exclusões
  1. 57 39
      src/routers/index.ts
  2. 24 24
      src/routers/modules/system.ts

+ 57 - 39
src/routers/index.ts

@@ -1,8 +1,8 @@
-import { createRouter, createWebHistory, RouteRecordRaw,createWebHashHistory,Router } from 'vue-router'
+import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory, Router } from 'vue-router'
 import Layout from "@/layout/index.vue";
 // 扩展继承属性
 interface extendRoute {
-    hidden?:boolean
+  hidden?: boolean
 }
 //
 import tableRouter from './modules/table'
@@ -25,22 +25,22 @@ import operationRouter from './modules/operation'
 // 异步组件
 export const asyncRoutes = [
 
-//     ...echartsRouter,
-//     ...tableRouter,
-//     ...formRouter,
-//     ...othersRouter,
-//     ...functionPageRouter,
-//     ...chatRouter,
-//     ...nestedRouter,
-//     ...excelRouter,
-//     ...externalLink,
+  //     ...echartsRouter,
+  //     ...tableRouter,
+  //     ...formRouter,
+  //     ...othersRouter,
+  //     ...functionPageRouter,
+  //     ...chatRouter,
+  //     ...nestedRouter,
+  //     ...excelRouter,
+  //     ...externalLink,
 
-  ...playerInfo,
-  ...dataScreenRouter,
+  // 临时注释
+  // ...playerInfo,
+  // ...dataScreenRouter,
   ...systemRouter,
   ...serverRouter,
   ...operationRouter,
-
 ]
 
 
@@ -59,57 +59,75 @@ export const asyncRoutes = [
  * meta.breadcrumb ==> 如果设置为false,该项将隐藏在breadcrumb中(默认值为true)
  */
 
-export const constantRoutes: Array<RouteRecordRaw&extendRoute> = [
-    {
-        path: "/404",
-        name: "404",
-        component: () => import("@/views/errorPages/404.vue"),
-        hidden:true,
-    },
-    {
-        path: "/403",
-        name: "403",
-        component: () => import("@/views/errorPages/403.vue"),
-        hidden:true,
-    },
+export const constantRoutes: Array<RouteRecordRaw & extendRoute> = [
+  {
+    path: "/404",
+    name: "404",
+    component: () => import("@/views/errorPages/404.vue"),
+    hidden: true,
+  },
+  {
+    path: "/403",
+    name: "403",
+    component: () => import("@/views/errorPages/403.vue"),
+    hidden: true,
+  },
   {
     path: '/login',
     name: 'Login',
     component: () => import('@/views/login/index.vue'),
     hidden: true,
-    meta: { title: '登录',}
+    meta: { title: '登录', }
   },
   {
     path: '/',
     name: 'layout',
     component: Layout,
-    redirect: '/home',
-    meta: { title: '首页', icon: 'House', },
+    redirect: '/player/index',
+    meta: {
+      title: '玩家信息',
+      icon: 'chat-square'
+    },
     children: [
       {
-        path: '/home',
-        component: () => import('@/views/home/index.vue'),
-        name: 'home',
-        meta: { title: '首页', icon: 'House', affix: true ,role:['other']}
-      },
+        path: '/player/index',
+        component: () => import('@/views/player/index.vue'),
+        name: 'chat-square',
+        meta: { title: '玩家信息', icon: 'House', affix: true ,role:['other']}
+      }
     ]
   },
+  // {
+  //   path: '/',
+  //   name: 'layout',
+  //   component: Layout,
+  //   redirect: '/home',
+  //   meta: { title: '首页', icon: 'House', },
+  //   children: [
+  //     {
+  //       path: '/home',
+  //       component: () => import('@/views/home/index.vue'),
+  //       name: 'home',
+  //       meta: { title: '首页', icon: 'House', affix: true ,role:['other']}
+  //     },
+  //   ]
+  // },
 ]
 
 /**
  * notFoundRouter(找不到路由)
  */
 export const notFoundRouter = {
-    path: '/:pathMatch(.*)',
-    name: "notFound",
-    redirect: '/404'
+  path: '/:pathMatch(.*)',
+  name: "notFound",
+  redirect: '/404'
 };
 
 
 const router = createRouter({
   // history: createWebHistory(process.env.BASE_URL), // history
   history: createWebHashHistory(), // hash
-  routes:constantRoutes
+  routes: constantRoutes
 })
 
 export default router

+ 24 - 24
src/routers/modules/system.ts

@@ -18,30 +18,30 @@ const systemRouter = [{
             name: 'user',
             meta: { title: '用户管理' , icon: 'MenuIcon'}
         },
-        {
-            path: '/system/dept',
-            component: () => import('@/views/system/dept/index.vue'),
-            name: 'dept',
-            meta: { title: '部门管理' , icon: 'MenuIcon'}
-        },
-        {
-            path: '/system/role',
-            component: () => import('@/views/system/role/index.vue'),
-            name: 'role',
-            meta: { title: '角色管理', icon: 'MenuIcon' }
-        },
-        {
-            path: '/system/menu',
-            component: () => import('@/views/system/menu/index.vue'),
-            name: 'menu',
-            meta: { title: '菜单管理',  icon: 'MenuIcon'}
-        },
-        {
-            path: '/system/dictionary',
-            component: () => import('@/views/system/dictionary/index.vue'),
-            name: 'dictionary',
-            meta: { title: '字典管理',  icon: 'MenuIcon'}
-        },
+        // {
+        //     path: '/system/dept',
+        //     component: () => import('@/views/system/dept/index.vue'),
+        //     name: 'dept',
+        //     meta: { title: '部门管理' , icon: 'MenuIcon'}
+        // },
+        // {
+        //     path: '/system/role',
+        //     component: () => import('@/views/system/role/index.vue'),
+        //     name: 'role',
+        //     meta: { title: '角色管理', icon: 'MenuIcon' }
+        // },
+        // {
+        //     path: '/system/menu',
+        //     component: () => import('@/views/system/menu/index.vue'),
+        //     name: 'menu',
+        //     meta: { title: '菜单管理',  icon: 'MenuIcon'}
+        // },
+        // {
+        //     path: '/system/dictionary',
+        //     component: () => import('@/views/system/dictionary/index.vue'),
+        //     name: 'dictionary',
+        //     meta: { title: '字典管理',  icon: 'MenuIcon'}
+        // },
     ]
 }]