
// 视图组件
const view = {
  tabs: () => import('@/layouts/tabs'),
  blank: () => import('@/layouts/BlankView'),
  page: () => import('@/layouts/PageView')
}

// 路由组件注册-BaseAdmin端
const BaseAdminRouterMap = {
  BaseAdmin: {
    name: '用户管理',
    icon: 'idcard',
    component: view.page,
    meta: {
      invisible: true
    },
    authority: {
      permission: ['BaseAdmin-All'],
    }
  },
  BaseAdminList: {
    name: '用户管理',
    icon: 'idcard',
    path: '/BaseAdmin/BaseAdminList',
    meta: {
      invisible: true
    },
    component: () => import('@/pages/Middle/Base/BaseAdmin/BaseAdmin/list'),

    authority: {
      permission: ['BaseAdmin-All'],
    }
  },


  BasePermission: {
    name: '权限管理',
    icon: 'idcard',
    component: view.page,
    meta: {
      invisible: true
    },
    authority: {
      permission: ['BasePermission-All'],
    }
  },
  RoleList: {
    name: '角色管理',
    icon: 'idcard',
    path: '/BasePermission/RoleList',
    component: () => import('@/pages/Middle/Base/BaseAdmin/BaseRole/list'), 
    authority: {
      permission: ['BasePermission-All'],
    }
  },

}
let routerNames = "ForgetPasswordCheckEmail,BindEmail,ChangePassword,ChangeProfile,GetCompanyInfo,BaseAdminCreate,BaseAdminDetail,BaseAdminDelete,GetEmailCode,ForgetPasswordCheckEmai,ForgetPasswordCheckMobile,GetCompanyList,ForgetPasswordResetPassword,BaseAdminLogDetail,BaseAdminLogList,Login,LoginByMobile,GetMobileCode,BaseAdminSettings,BaseAdminSettingsUpdate,SwitchCompany,BaseAdminUpdate,BaseAdminUpdatePassword";
routerNames += ",BasePermissionBatchDelete,BasePermissionCreate,BasePermissionDetail,BasePermissionDelete,BasePermissionList,BasePermissionUpdate,DepartmentPermissionBatchDelete,DepartmentPermissionCreate,DepartmentPermissionDelete,DepartmentPermissionList,BasePermissionLogDetail,BasePermissionLogList,RoleBatchDelete,RoleCreate,RoleDetail,RoleDelete,RoleList,RolePermissionBatchDelete,RolePermissionCreate,RolePermissionDelete,RolePermissionList,RoleUpdate,BasePermissionSettings,BasePermissionSettingsUpdate,UserCustomBatchDelete,UserCustomCreate,UserCustomDelete,UserCustomList,UserLevelCreate,UserLevelDetail,UserLevelDelete,UserLevelUpdate,UserRoleBatchDelete,UserRoleCreate,UserRoleDelete,UserRoleList"


routerNames.split(',').forEach(name => {
  if (name && !(name in BaseAdminRouterMap)) {
    BaseAdminRouterMap[name] = {
      meta: {
        invisible: true // 不在菜单中显示
      }
    }
  }
})
export default BaseAdminRouterMap