import { WeaTools } from 'ecCom'

export const getHasRight = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getHasRight', 'POST', params);
}

export const getRightMenu = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getRightMenu', 'POST', params);
}

export const getTabs = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getTabs', 'POST', params);
}

export const getCompanyFormField = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getCompanyFormField?is_multilang_set=true', 'GET', params);
}

export const getSubCompanyFormField = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanyFormField?is_multilang_set=true', 'GET', params);
}

export const getDepartmentFormField = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentFormField?is_multilang_set=true', 'GET', params);
}

export const getSubCompanyFormFieldView = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanyFormFieldView', 'GET', params);
}

export const getDepartmentFormFieldView = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentFormFieldView', 'GET', params);
}

export const addCompany = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/addCompany', 'POST', params);
}

export const addSubCompany = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/addSubCompany', 'POST', params);
}

export const addDepartment = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/addDepartment', 'POST', params);
}

export const editCompany = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/editCompany', 'POST', params);
}

export const editSubCompany = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/editSubCompany', 'POST', params);
}

export const editDepartment = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/editDepartment', 'POST', params);
}

export const delCompany = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/delCompany', 'POST', params);
}

export const delSubCompany = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/delSubCompany', 'POST', params);
}

export const delDepartment = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/delDepartment', 'POST', params);
}

export const delResource = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/delResource', 'POST', params);
}

export const getSubCompanySearchCondition = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanySearchCondition', 'GET', params);
}

export const getDepartmentSearchCondition = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentSearchCondition', 'GET', params);
}

export const getResourceSearchCondition = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getResourceSearchCondition', 'GET', params);
}

export const getSubCompanySearchList = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getSubCompanySearchList', 'POST', params);
}

export const getDepartmentSearchList = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getDepartmentSearchList', 'POST', params);
}

export const getResourceSearchList = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getResourceSearchList', 'POST', params);
}

export const doSubCompanyCancel = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/doSubCompanyCancel', 'POST', params);
}

export const doDepartmentCancel = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/doDepartmentCancel', 'POST', params);
}

export const doSubCompanyISCanceled = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/doSubCompanyISCanceled', 'POST', params);
}

export const doDepartmentISCanceled = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/doDepartmentISCanceled', 'POST', params);
}

export const saveBatchEdit = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/saveBatchEdit', 'POST', params);
}

export const addResourceToVirtual = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/addResourceToVirtual', 'POST', params);
}

export const getBatchSetManagerFormField = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getBatchSetManagerFormField', 'POST', params);
}

export const saveBatchSetManager = params => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/saveBatchSetManager', 'POST', params);
}

//获取导入表单
export const getHrmResourceImportForm = (params) => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getHrmResourceImportForm', 'GET', params);
}
//导入文件提交
export const saveHrmResourceImport = (params) => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/saveHrmResourceImport', 'POST', params);
}
//获取导入结果信息
export const getHrmResourceImportResult = (params) => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getHrmResourceImportResult', 'GET', params);
}
//历史导入信息查询
export const getHrmResourceImportHistory = (params) => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/getHrmResourceImportHistory', 'GET', params);
}
//下载历史导入信息
export const downloadHrmResourceImportHistory = (params) => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/downloadHrmResourceImportHistory', 'GET', params);
}
//删除历史导入日志
export const delHrmResourceImportHistory = (params) => {
  return WeaTools.callApi('/api/hrm/organizationvirtual/delHrmResourceImportHistory', 'POST', params);
}