/*
 * @Author: xiejiang
 * @Date: 2024-11-28 15:00:25
 * @LastEditors: xiejiang
 * @LastEditTime: 2024-12-11 19:53:35
 * @Description: 系统权限路由
 * Copyright（c）2024 by 好老师教育科技有限公司 All right Reserved.
 */
import { RouteRecordRaw } from 'vue-router'

const sysPermissionsRouter: RouteRecordRaw[] = [
  {
    path: '/layout',
    component: () => import('@/layouts/index.vue'),
    name: 'sys-permissions',
    meta: {
      title: '系统权限'
    },
    children: [
      {
        path: '/users',
        name: 'users',
        component: () => import('@/views/sys-permissions/user/index.vue'),
        meta: {
          title: '用户管理',
          keepAlive: true
        }
      },
      {
        path: '/users/detail',
        name: 'users-detail',
        component: () => import('@/views/sys-permissions/user/detail.vue'),
        meta: {
          title: '用户详情',
          access: 'users',
          noTopTag: true,
          affix: false,
          activeMenu: 'users',
          hideFooter: true
        }
      },
      {
        path: '/role',
        name: 'role',
        component: () => import('@/views/sys-permissions/role/index.vue'),
        meta: {
          title: '平台角色',
          keepAlive: true
        }
      },
      {
        path: '/role/detail',
        name: 'role-detail',
        component: () => import('@/views/sys-permissions/role/detail.vue'),
        meta: {
          title: '角色详情',
          access: 'role',
          noTopTag: true,
          affix: false,
          activeMenu: 'role',
          hideFooter: true
        }
      },
      {
        path: '/authority',
        name: 'authority',
        component: () => import('@/views/sys-permissions/authority/index.vue'),
        meta: {
          title: '权限配置',
          keepAlive: true
        }
      }
    ]
  }
]

export default sysPermissionsRouter
