import Layout from '@/layout'

export default [
    {
        path: '/home',
        hidden: true,
        component: Layout,
        redirect: '/home/index',
        children: [{
            path: 'index',
            name: 'HomeIndex',
            component: () => import('@/views/app/home'),
            meta: {title: '首页', icon: 'user'},
        }]
    },
    {
        path: '/system',
        component: Layout,
        meta: {title: '系统设置', icon: 'user', permissions: '系统设置'},
        children: [{
            path: 'permissions',
            name: 'SystemPermissions',
            component: () => import('@/views/app/system/permissions'),
            meta: {title: '权限管理', icon: 'user', permissions: '权限管理'},
        }, {
            path: 'role',
            name: 'SystemRole',
            component: () => import('@/views/app/system/role'),
            meta: {title: '角色管理', icon: 'user', permissions: '角色管理'},
        }, {
            path: 'user',
            name: 'SystemUser',
            component: () => import('@/views/app/system/user'),
            meta: {title: '用户管理', icon: 'user', permissions: '用户管理'},
            children: [
                {
                    path: 'add',
                    name: 'SystemUserAdd',
                    hidden: true,
                    component: () => import('@/views/app/system/user/edit'),
                    meta: {title: '添加', icon: 'user'},
                }, {
                    path: 'edit',
                    name: 'SystemUserEdit',
                    hidden: true,
                    component: () => import('@/views/app/system/user/edit'),
                    meta: {title: '编辑', icon: 'user', noCache: true},
                }
            ],
        }, {
            path: 'job',
            name: 'SystemJob',
            component: () => import('@/views/app/system/job'),
            meta: {title: '任务管理', icon: 'user', permissions: '任务管理'},
        }, {
            path: 'log',
            name: 'SystemLog',
            component: () => import('@/views/app/system/log'),
            meta: {title: '操作日志管理', icon: 'user', permissions: '操作日志管理'}
        }, {
            path: 'login-log',
            name: 'SystemLoginLog',
            component: () => import('@/views/app/system/login-log'),
            meta: {title: '登录日志管理', icon: 'user', permissions: '登录日志管理'}
        }, {
            path: 'status',
            name: 'SystemStatus',
            component: () => import('@/views/app/system/status'),
            meta: {title: '系统状态', icon: 'user', permissions: '系统状态'}
        }]
    },
    {
        path: '/template',
        component: Layout,
        redirect: '/template/table',
        meta: {title: '模板', icon: 'user', permissions: 'developer'},
        children: [{
            path: 'table',
            name: 'templateTable',
            component: () => import('@/views/app/template/table'),
            meta: {title: '表格模板', icon: 'user'},
        }]
    }
]
