/**
 * path: 一定要设置绝对路径
 * menuCode: 服务端菜单编码, 用于权限校验
 */

export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './User/login',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/SecurityLayout',
        routes: [
          {
            path: '/',
            component: '../layouts/BasicLayout',
            routes: [
              {
                path: '/',
                redirect: '/welcome',
              },
              {
                path: '/welcome',
                name: 'welcome',
                icon: 'smile',
                component: './Welcome',
              },
              {
                path: '/admin',
                name: 'admin',
                icon: 'crown',
                component: './Admin',
                routes: [
                  {
                    path: '/admin/sub-page',
                    name: 'sub-page',
                    icon: 'smile',
                    component: './Welcome',
                  },
                ],
              },
              {
                name: 'list.table-list',
                icon: 'table',
                path: '/list',
                component: './TableList',
              },
              {
                path: '/cms',
                name: 'CMS管理',
                icon: 'AppstoreOutlined',
                menuCode: 'cms',
                component: '../layouts/BlankLayout',
                routes: [
                  {
                    path: '/cms/banner/list',
                    name: 'Banner管理',
                    menuCode: 'cms.banner',
                    component: './Cms/Banner/List',
                  },
                  {
                    path: '/cms/banner/edit',
                    name: 'Banner编辑',
                    menuCode: 'cms.banner',
                    component: './Cms/Banner/Edit',
                    hideInMenu: true,
                  },
                  {
                    path: '/cms/hot/list',
                    name: '热门管理',
                    menuCode: 'cms.hot',
                    component: './Cms/Hot/List',
                  },
                  {
                    path: '/cms/hot/edit',
                    name: 'Banner编辑',
                    menuCode: 'cms.hot',
                    component: './Cms/Hot/Edit',
                    hideInMenu: true,
                  },
                ],
              },
              {
                path: '/post',
                name: '科普管理',
                icon: 'ReadOutlined',
                menuCode: 'post',
                component: '../layouts/BlankLayout',
                routes: [
                  {
                    path: '/post/list',
                    name: '科普管理',
                    menuCode: 'post.post',
                    component: './Post/List',
                  },
                  {
                    path: '/post/edit',
                    name: '科普编辑',
                    menuCode: 'post.post',
                    component: './Post/Edit',
                    hideInMenu: true,
                  },
                ],
              },
              {
                path: '/student',
                name: '学生管理',
                icon: 'UserOutlined',
                menuCode: 'student',
                component: '../layouts/BlankLayout',
                routes: [
                  {
                    path: '/student/student',
                    name: '学生管理',
                    menuCode: 'student.student',
                    component: './Student/Student/List',
                  },
                  {
                    path: '/student/student/edit',
                    name: '学生管理',
                    menuCode: 'student.student',
                    hideInMenu: true,
                    component: './Student/Student/Edit',
                  },
                  {
                    path: '/student/school',
                    name: '学校管理',
                    menuCode: 'student.student',
                    component: './Student/School/List',
                  },
                  {
                    path: '/student/school/edit',
                    name: '学校编辑',
                    menuCode: 'student.student',
                    hideInMenu: true,
                    component: './Student/School/Edit',
                  },
                ],
              },
              {
                path: '/medical',
                name: '就医管理',
                icon: 'BranchesOutlined',
                menuCode: 'medical',
                component: '../layouts/BlankLayout',
                routes: [
                  {
                    path: '/medical/visit',
                    name: '就诊管理',
                    menuCode: 'medical.visit',
                    component: '../layouts/BlankLayout',
                  },
                  {
                    path: '/medical/test',
                    name: '体检管理',
                    menuCode: 'medical.test',
                    component: '../layouts/BlankLayout',
                  },
                ],
              },
              {
                path: '/report',
                name: '数据统计',
                icon: 'BarChartOutlined',
                menuCode: 'report',
                component: '../layouts/BlankLayout',
                routes: [
                  {
                    path: '/report/post',
                    name: '科普统计',
                    menuCode: 'report.post',
                    component: '../layouts/BlankLayout',
                  },
                  {
                    path: '/report/student',
                    name: '阅读统计',
                    menuCode: 'report.student',
                    component: '../layouts/BlankLayout',
                  },
                ],
              },
              {
                path: '/system',
                name: '系统设置',
                icon: 'SettingOutlined',
                menuCode: 'system',
                component: '../layouts/BlankLayout',
                routes: [
                  {
                    path: '/system/user',
                    name: '用户管理',
                    menuCode: 'system.user',
                    component: './user/List',
                  },
                  {
                    path: '/system/user/edit',
                    name: '用户编辑',
                    menuCode: 'system.user',
                    component: './user/Edit',
                    hideInMenu: true,
                  },
                  {
                    path: '/system/role',
                    name: '角色管理',
                    menuCode: 'system.role',
                    component: '../layouts/BlankLayout',
                  },
                  {
                    path: '/system/params',
                    name: '系统参数',
                    menuCode: 'system.params',
                    component: '../layouts/BlankLayout',
                  },
              
                  {
                    path: '/system/clinic',
                    name: '诊室管理',
                    menuCode: 'system.clinic',
                    component: '../layouts/BlankLayout',
                  },
                ],
              },
              {
                component: './404',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];