/* Layout */
import Layout from '@/layout'

// 供应商管理页面
const supplierRoutes = [
  {
    path: '/supplier',
    component: Layout,
    alwaysShow: true,
    name: 'Supplier',
    redirect: '/supplier/list',
    meta: { title: '账号管理', icon: 'el-icon-s-custom', roles: ['admin'], noCache: true },
    children: [
      {
        path: 'list',
        component: () => import('@/views/admin/supplier'),
        name: 'SupplierList',
        meta: { title: '供应商账号', icon: 'el-icon-menu', affix: true, roles: ['admin'], noCache: true }
      },
      {
        hidden: true,
        path: 'supplier-add',
        component: () => import('@/views/admin/supplier/edit'),
        name: 'SupplierAdd',
        meta: { title: '添加供应商', icon: 'el-icon-menu', roles: ['admin'], noCache: true }
      },
      {
        hidden: true,
        path: 'supplier-edit',
        component: () => import('@/views/admin/supplier/edit'),
        name: 'SupplierEdit',
        meta: { title: '修改供应商', icon: 'el-icon-menu', roles: ['admin'], noCache: true }
      },
      {
        hidden: true,
        path: 'club-list',
        component: () => import('@/views/admin/supplier/club'),
        name: 'SupplierClubList',
        meta: { title: '查看认证机构', icon: 'el-icon-menu', roles: ['admin'], noCache: true }
      },
      {
        hidden: true,
        path: 'club-detail',
        component: () => import('@/views/admin/supplier/club/detail'),
        name: 'SupplierClubDetail',
        meta: { title: '认证机构详情', icon: 'el-icon-menu', roles: ['admin'], noCache: true }
      },
      {
        hidden: true,
        path: 'club-device-list',
        component: () => import('@/views/admin/supplier/club/device'),
        name: 'SupplierClubDeviceList',
        meta: { title: '查看设备认证', icon: 'el-icon-menu', roles: ['admin'], noCache: true }
      },
      {
        hidden: true,
        path: 'club-device-detail',
        component: () => import('@/views/admin/supplier/club/device/detail'),
        name: 'SupplierClubDeviceDetail',
        meta: { title: '设备认证详情', icon: 'el-icon-menu', roles: ['admin'], noCache: true }
      }
    ]
  }
]

export default supplierRoutes
