// 系统管理模块路由
import type { Route } from '@/global'

const Layout = () => import('@/layouts/index.vue')

const routes: Route.recordRaw[] = [
  {
    path: '/system',
    component: Layout,
    redirect: '/system/area',
    name: 'System',
    meta: {
      title: '系统设置',
      icon: 'ep:key',
      auth: '/system',
    },
    children: [
      {
        path: 'area',
        name: 'AreaList',
        component: () => import('@/views/system/area/listArea.vue'),
        meta: {
          title: '区域管理',
          auth: '/sys/area',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/area',
        },
      },
      {
        path: 'resource',
        name: 'ResourceList',
        component: () => import('@/views/system/resource/listResource.vue'),
        meta: {
          title: '资源管理',
          auth: '/sys/resource',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/resource',
        },
      },
      {
        path: 'dept',
        name: 'DeptList',
        component: () => import('@/views/system/dept/listDept.vue'),
        meta: {
          title: '组织管理',
          auth: '/sys/dept',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/dept',
        },
      },
      {
        path: 'role',
        name: 'RoleList',
        component: () => import('@/views/system/role/listRole.vue'),
        meta: {
          title: '角色管理',
          auth: '/sys/role',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/role',
        },
      },
      {
        path: 'user',
        name: 'UserList',
        component: () => import('@/views/system/user/listUser.vue'),
        meta: {
          title: '用户管理',
          auth: '/sys/mgr',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/user',
        },
      },
      // {
      //   path: 'manufacturer',
      //   name: 'manufacturerList',
      //   component: () => import('@/views/system/manufacturer/index.vue'),
      //   meta: {
      //     title: '厂商管理',
      //     auth: '/sys/manufacturer',
      //     sidebar: true,
      //     breadcrumb: true,
      //     activeMenu: '/system/manufacturer',
      //   },
      // },
      {
        path: 'dict',
        name: 'DictList',
        component: () => import('@/views/system/dict/listDict.vue'),
        meta: {
          title: '字典管理',
          auth: '/sys/dict',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/dict',
        },
      },
      // {
      //   path: '/process',
      //   component: Layout,
      //   redirect: '/process/list',
      //   name: 'Process',
      //   meta: {
      //     title: '流程管理',
      //     icon: 'ep:key',
      //     auth: '/sys/process',
      //   },
      //   children: [
      //     {
      //       path: 'list',
      //       name: 'ProcessList',
      //       component: () => import('@/views/system/process/process.vue'),
      //       meta: {
      //         title: '流程管理',
      //         icon: 'ep:key',
      //         auth: '/sys/process',
      //         sidebar: false,
      //         breadcrumb: false,
      //         activeMenu: '/process',
      //       },
      //     },
      //     {
      //       path: 'edit',
      //       name: 'ProcessListEdit',
      //       component: () => import('@/views/system/process/editProcess.vue'),
      //       meta: {
      //         title: '流程管理',
      //         icon: 'ep:key',
      //         auth: '/sys/process',
      //         sidebar: false,
      //         breadcrumb: false,
      //         activeMenu: '/process/list',
      //       },
      //     },
      //     {
      //       path: 'detail',
      //       name: 'ProcessListDetail',
      //       component: () => import('@/views/system/process/detailProcess.vue'),
      //       meta: {
      //         title: '流程管理',
      //         icon: 'ep:key',
      //         sidebar: false,
      //         breadcrumb: false,
      //         activeMenu: '/process/list',
      //       },
      //     },
      //     {
      //       path: 'add',
      //       name: 'ProcessListAdd',
      //       component: () => import('@/views/system/process/addProcess.vue'),
      //       meta: {
      //         title: '流程管理',
      //         icon: 'ep:key',
      //         sidebar: false,
      //         breadcrumb: false,
      //         activeMenu: '/process/list',
      //       },
      //     },
      //   ],
      // },
      // {
      //   path: 'tenant',
      //   name: 'TenantList',
      //   component: () => import('@/views/system/tenant/list.tenant.vue'),
      //   meta: {
      //     title: '项目管理',
      //     auth: '/sys/tenantSys/list',
      //     sidebar: true,
      //     breadcrumb: true,
      //     activeMenu: '/system/tenant',
      //   },
      // },
      {
        path: 'businessLog',
        name: 'BusinessList',
        component: () => import('@/views/system/log/listLog.vue'),
        meta: {
          title: '业务日志',
          auth: '/sys/log',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/businessLog',
        },
      },
      {
        path: 'errorLog',
        name: 'ErrorList',
        component: () => import('@/views/system/log/listErrorLog.vue'),
        meta: {
          title: '异常日志',
          auth: '/sys/log/error/list',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/errorLog',
        },
      },
      {
        path: 'loginDiary',
        name: 'loginDiaryList',
        component: () => import('@/views/system/log/LoginLog.vue'),
        meta: {
          title: '登录日志',
          auth: '/sys/loginLog',
          sidebar: true,
          breadcrumb: true,
          activeMenu: '/system/loginDiary',
        },
      }],
  },
]

export default routes
