import {
	WeaTools
} from 'ecCom';

/**
 * 获取tab数据
 * @param  {Object} params [description]
 * @return {[type]}        [description]
 */
export const getTabInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/getTabInfo?is_multilang_set=true`, 'GET', params)

export const getFieldDefinedInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/getFieldDefinedInfo?is_multilang_set=true`, 'GET', params)

export const saveFieldDefinedInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/save`, 'POST', params)

export const removeFieldDefinedInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/del`, 'POST', params)

export const saveGroupInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/saveGroup`, 'POST', params)

export const removeGroupInfo = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/delGroup`, 'POST', params)

export const getTree = (params = {}) => WeaTools.callApi(`/api/hrm/resourcefielddefined/getTree`, 'GET', params)

export const saveTree = (params = {}) => WeaTools.callApi(`/api/hrm/resourcefielddefined/saveTree`, 'POST', params)

export const changeGroup = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/changeGroup`, 'POST', params)

export const getEncryptFieldSettingForm = (params = {}) => WeaTools.callApi(`/api/encrypt/fieldsetting/getEncryptFieldSettingForm`, 'GET', params)

export const saveEncryptFieldSettingForm = (params = {}) => WeaTools.callApi(`/api/encrypt/fieldsetting/saveEncryptFieldSettingForm`, 'POST', params)

//获取字段可查看范围列表
export const getEncryptFieldScopeList = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/getEncryptFieldScopeList', 'POST', params);

//获取字段可查看范围表单
export const getEncryptFieldScopeForm = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/getEncryptFieldScopeForm', 'GET', params);

//保存字段可查看范围
export const saveEncryptFieldScopeSetting = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/saveEncryptFieldScopeSetting', 'POST', params);

//删除字段可查看范围
export const delEncryptFieldScopeSetting = (params = {}) => WeaTools.callApi('/api/encrypt/fieldsetting/delEncryptFieldScopeSetting', 'POST', params);

