/* Layout */
import Layout from '../../views/layout/Layout'

export const systemRouters = [{
  path: 'batch',
  component: Layout,
  redirect: '/batchlist',
  name: 'Batch',
  alwaysShow: true,
  meta: {
    title: '批产管理',
    // icon: 'icon-config', // 图标
    permission: ['/batch']// 权限名称
  },
  children: [
    {
      path: '/batchlist',
      component: () => import('@/views/batchManager/listTask'), // Parent router-view
      name: 'BatchList',
      meta: { title: '批产任务列表', permission: ['/batch/list'] }
    }, {
      path: '/devicelist',
      component: () => import('@/views/batchManager/listDevice'), // Parent router-view
      name: 'DeviceList',
      meta: { title: '批产设备列表', permission: ['/device/list'], keepAlive: true }
    },
    // {
    //   // path: '/qualitylist',
    //   path: '/qualitylist/:id',
    //   component: () => import('@/views/batchManager/listQuality'), // Parent router-view
    //   name: 'QualityList',
    //   hidden: true,
    //   meta: { title: '质量履历列表', permission: ['/quality/list'] }
    // },
    {
      path: '/qualitylist/:id',
      component: () => import('@/views/batchManager/listQuality'), // Parent router-view
      name: 'QualityList',
      meta: { title: '质量履历列表', permission: ['/quality/list'] }
    },
    {
      path: '/devicelist/:id',
      component: () => import('@/views/batchManager/listDevice'), // Parent router-view
      name: 'DeviceListId',
      hidden: true,
      meta: { title: '批产设备列表', permission: ['/device/list'], keepAlive: true }
    }
  ]
},
{
  path: 'contract',
  component: Layout,
  redirect: '/contractlist',
  name: 'Contract',
  alwaysShow: true,
  meta: {
    title: '批产合同管理',
    // icon: 'icon-config', // 图标
    permission: ['/contract']// 权限名称
  },
  children: [
    {
      path: '/contractlist',
      component: () => import('@/views/contractManager/listContract'), // Parent router-view
      name: 'ContractList',
      meta: { title: '批产合同列表', permission: ['/contract/list'], keepAlive: true }

    }, {
      // path: '/contractcheck',
      path: '/contractcheck/:id',
      component: () => import('@/views/contractManager/checkContract'), // Parent router-view
      name: 'ContractCheck',
      hidden: true,
      meta: { title: '批产合同详情', permission: ['/contract/check'] }
    }
  ]
}, {
  path: 'devicetype',
  component: Layout,
  redirect: '/devicetypelist',
  name: 'DeviceType',
  alwaysShow: true,
  meta: {
    title: '设备类型管理',
    // icon: 'icon-config', // 图标
    permission: ['/devicetype']// 权限名称
  },
  children: [
    {
      path: '/devicetypelist',
      component: () => import('@/views/deviceTypeManager/listDeviceType'), // Parent router-view
      name: 'DeviceTypeList',
      meta: { title: '设备类型列表', permission: ['/devicetype/list'] }

    }]
},
{
  path: 'factory',
  component: Layout,
  redirect: '/factorylist',
  name: 'Factory',
  alwaysShow: true,
  meta: {
    title: '厂家管理',
    // icon: 'icon-config', // 图标
    permission: ['/factory']// 权限名称
  },
  children: [
    {
      path: '/factorylist',
      component: () => import('@/views/factoryManager/listFactory'), // Parent router-view
      name: 'FactoryList',
      meta: { title: '厂家列表', permission: ['/factory/list'] }

    }]
}, {
  path: 'construction',
  component: Layout,
  redirect: '/constructionlist',
  name: 'Construction',
  alwaysShow: true,
  meta: {
    title: '施工管理',
    // icon: 'icon-config', // 图标
    permission: ['/construction']// 权限名称
  },
  children: [
    {
      path: '/constructionlist',
      component: () => import('@/views/factoryManager/listConstruction'), // Parent router-view
      name: 'ConstructionList',
      meta: { title: '日志列表', permission: ['/construction/list'] }
    },
    {
      path: '/projectManagementList',
      component: () => import('@/views/factoryManager/projectManagement/list.vue'), // Parent router-view
      name: 'ProjectManagementList',
      meta: { title: '项目管理', permission: ['/projectManagement/list'] }
    },
    {
      path: '/MiniUserManageList',
      component: () => import('@/views/factoryManager/MiniUserManage/list.vue'), // Parent router-view
      name: 'MiniUserManageList',
      meta: { title: '小程序用户管理', permission: ['/MiniUserManage/list'] }
    },
    {
      path: '/safeManageList',
      component: () => import('@/views/factoryManager/safeManage/list.vue'), // Parent router-view
      name: 'SafeManageList',
      meta: { title: '安全生产管理', permission: ['/safeManage/list'] }
    },
    {
      path: '/dataPreentryList',
      component: () => import('@/views/factoryManager/dataPreentry/list.vue'), // Parent router-view
      name: 'DataPreentry',
      meta: { title: '安全生产管理', permission: ['/dataPreentry/list'] }
    }
  ]
},
{
  path: 'system',
  component: Layout,
  redirect: '/resource',
  name: 'System',
  alwaysShow: true,
  meta: {
    title: '系统管理',
    icon: 'icon-config', // 图标
    permission: ['/system']// 权限名称
  },
  children: [
    {
      path: '/resource',
      name: 'Resource',
      component: () => import('@/views/system/resource/listResource'),
      meta: { title: '资源管理', icon: 'function', permission: ['/resource'] }
    },
    {
      path: '/dict',
      name: 'Dict',
      component: () => import('@/views/system/dict/listDict'),
      meta: { title: '字典管理', icon: 'function', permission: ['/dict'] }
    },
    {
      path: '/area',
      name: 'Area',
      component: () => import('@/views/system/area/listArea'),
      meta: { title: '区域管理', icon: 'function', permission: ['/area'] }
    },
    {
      path: '/dept',
      name: 'Dept',
      component: () => import('@/views/system/dept/listDept'),
      meta: { title: '组织管理', icon: 'tree', permission: ['/dept'] }
    },
    {
      path: '/role',
      component: () => import('@/views/system/role/listRole'), // Parent router-view
      name: 'Role',
      meta: { title: '角色管理', permission: ['/role'] }
    },
    {
      path: '/user',
      component: () => import('@/views/system/user/listUser'), // Parent router-view
      name: 'User',
      meta: { title: '用户管理', permission: ['/mgr'] }
    },
    // {
    //   path: '/projectlist',
    //   component: () => import('@/views/system/project/listProject'), // Parent router-view
    //   name: 'ProjectList',
    //   meta: { title: '项目列表', permission: ['/project/list'] }
    // },
    {
      path: '/log',
      component: () => import('@/views/system/log/listLog'), // Parent router-view
      name: 'Log',
      meta: { title: '项目列表', permission: ['/log'] }
    }
  ]
}
]
