/*
 * @Author: zk
 * @Date: 2022-01-06 13:45:09
 * @LastEditTime: 2022-03-02 10:05:16
 * @LastEditors: Please set LastEditors
 * @Description: 组织管理路由
 * @FilePath: \Foshan4A3.0\src\router\routes\routes-file-two.js
 */
import Layout from '@/layout'

const organizationRoutes = {
  path: '/organization',
  component: Layout,
  meta: { roles: ['organ_menu'], title: '组织管理' },
  children: [
    {
      path: '/organization',
      name: 'Organization',
      component: () => import('@/views/organizationManagement/index'),
      meta: { title: '组织管理' },
      children: [
        {
          path: '/organization',
          name: 'OrganizationHome',
          component: () => import('@/views/organizationManagement/components/organizationHome'),
          meta: { title: '组织管理', roles: ['organ_page'], icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
        },
        {
          path: 'organizationAdd',
          name: 'OrganizationAdd',
          component: () => import('@/views/organizationManagement/components/organizationAdd'),
          meta: { title: '新增组织', icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
        },
        {
          path: 'organizationEdit',
          name: 'OrganizationEdit',
          component: () => import('@/views/organizationManagement/components/organizationEdit'),
          meta: { title: '编辑组织', icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
        }
      ]
    }
  ]
}

const staffRoutes = {
  path: '/staff',
  component: Layout,
  meta: { roles: ['officer_menu'], title: '职员管理' },
  children: [
    {
      path: '/staff',
      name: 'Staff',
      component: () => import('@/views/staffManagement/index'),
      meta: { title: '职员管理' },
      children: [
        {
          path: '/staff',
          name: 'StaffHome',
          component: () => import('@/views/staffManagement/compontents/staffHome'),
          meta: { title: '职员管理', roles: ['officer_page'], icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
        },
        {
          path: 'staffAdd',
          name: 'StaffAdd',
          component: () => import('@/views/staffManagement/compontents/staffAdd'),
          meta: { title: '新增职员', icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
        },
        {
          path: 'staffEdit',
          name: 'StaffEdit',
          component: () => import('@/views/staffManagement/compontents/staffEdit'),
          meta: { title: '编辑职员', icon: 'authority', imgstyle: 'ic_home_nav_defaul.png', imgstyleup: 'ic_home_nav_check.png' }
        }
      ]
    }
  ]
}

export default [
  organizationRoutes,
  staffRoutes
]
