import Vue from 'vue'
import { all } from 'vue-client'

import ldapService from './components/ldapService'

/* 异步注册组件 */
require('./custom.less')
/** **************************主菜单******************************/
export default function () {

  Vue.use(ldapService)

  /* 特殊组件 */
  Vue.component('dynamic-ldap', (resolve) => { require(['./components/special/ldapDynamic'], resolve) })
  Vue.component('tab-ldap', (resolve) => { require(['./components/special/ldapTab'], resolve) })
  Vue.component('tabset-ldap', (resolve) => { require(['./components/special/ldapTabset'], resolve) })



  Vue.component('res-main', (resolve) => { require(['./components/server/ResMain'], resolve) })

  Vue.component('resource-tree', (resolve) => { require(['./components/server/ResourceTree'], resolve) })
  /* eslint-disable no-new */
//部门
  Vue.component('department', (resolve) => { require(['./components/base/Department'], resolve)})
  Vue.component('add-department', (resolve) => { require(['./components/base/AddDepartment'], resolve)})

// 组织机构
  Vue.component('organization', (resolve) => { require(['./components/base/Organization'], resolve) })
  Vue.component('user', (resolve) => { require(['./components/base/User'], resolve) })
  Vue.component('add-org', (resolve) => { require(['./components/base/AddOrg'], resolve) })
  // Vue.component('add-user', (resolve) => { require(['./components/base/AddUser'], resolve) })
  Vue.component('movedevice-manager', (resolve) => { require(['./components/base/MoveDeviceManager'], resolve) })
// 区域
  Vue.component('zone', (resolve) => { require(['./components/base/Zone'], resolve) })
  Vue.component('add-region', (resolve) => { require(['./components/base/AddRegion'], resolve) })
// 角色
  Vue.component('parentrole', (resolve) => { require(['./components/role/Parentrole'], resolve) })
  Vue.component('role', (resolve) => { require(['./components/role/Role'], resolve) })
  Vue.component('add-role', (resolve) => { require(['./components/role/AddRole'], resolve) })
// 功能模块
// Vue.component('functiontree', (resolve) => { require(['./components/function/Functiontree'], resolve)})
  Vue.component('functiontree', (resolve) => { require(['./components/function/Function'], resolve) })
  Vue.component('function', (resolve) => { require(['./components/function/Function'], resolve) })
  Vue.component('add-function', (resolve) => { require(['./components/function/AddFunction'], resolve) })
  Vue.component('modify-function', (resolve) => { require(['./components/function/ModifyFunction'], resolve) })
   // 数据授权
  Vue.component('edit', (resolve) => { require(['./components/Authorization/Edit'], resolve) })
  // 功能授权
  Vue.component('fun-edit', (resolve) => { require(['./components/Authorization/FunctionEdit'], resolve) })
  // 角色授权
  Vue.component('role-edit', (resolve) => { require(['./components/Authorization/RoleEdit'], resolve) })
// 调整功能位置（前后）
  Vue.component('adjust-pos', (resolve) => { require(['./components/base/AdjustPos'], resolve) })
  // 移动资源【资源调配】（父子）
  Vue.component('move-res', (resolve) => { require(['./components/base/MoveRes'], resolve) })
  // 资源显示
  Vue.component('rights-list', (resolve) => { require(['./components/base/HasRight'], resolve) })
  // 资源服务跟节点
  Vue.component('res-toot', (resolve) => { require(['./components/base/ResRoot'], resolve) })

  // 所属组织模态框
  Vue.component('organization-modal', (resolve) => { require(['./components/common/OrganizationModal'], resolve) })

  // 所属部门模态框
  Vue.component('department-modal', (resolve) => { require(['./components/common/DepartmentModal'], resolve) })

  Vue.component('organization-permission', (resolve) => { require(['./components/common/OrganizationPermission'], resolve) })

  // 所属角色模态框
  Vue.component('role-modal', (resolve) => { require(['./components/common/RoleModal'], resolve) })

  // // 人员管理
  // Vue.component('user-manage', (resolve) => { require(['./components/user/UserManage'], resolve) })
  //
  // // 角色管理
  // Vue.component('role-manage', (resolve) => { require(['./components/role/RoleManange'], resolve) })

  // 人员信息管理
  Vue.component('staff-list-manage', (resolve) => { require(['./components/Staff/StaffListManage'], resolve) })
  Vue.component('staff-list', (resolve) => { require(['./components/Staff/StaffList'], resolve) })
  Vue.component('staff-compile-list', (resolve) => { require(['./components/Staff/StaffCompileList'], resolve) })
  // 角色管理
  Vue.component('role-list-manage', (resolve) => { require(['./components/rolemanage/RoleListManage'], resolve) })
  Vue.component('role-list', (resolve) => { require(['./components/rolemanage/RoleList'], resolve) })
  Vue.component('role-compile-list', (resolve) => { require(['./components/rolemanage/RoleCompileList'], resolve) })
  // 部门管理
  Vue.component('dep-list-manage', (resolve) => { require(['./components/department/DepListManage'], resolve) })
  Vue.component('dep-list', (resolve) => { require(['./components/department/DepList'], resolve) })
  Vue.component('dep-compile-list', (resolve) => { require(['./components/department/DepCompileList'], resolve) })
}
