import {
	WeaTools
} from 'ecCom'

const apiAddress = '/api/hrm/kq/reportFieldDefine/';

export const getRightMenu = (params = {}) => WeaTools.callApi(`${apiAddress}getRightMenu`, 'GET', params);
export const getFieldDefineTabs = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineTabs`, 'GET', params);
export const getFieldDefineList = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineList`, 'POST', params);
export const saveFieldDefineList = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldDefineList`, 'POST', params);
export const getFieldDefineForm = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldDefineForm`, 'POST', params);
export const saveFieldDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldDefine`, 'POST', params);
export const deleteFieldDefine = (params = {}) => WeaTools.callApi(`${apiAddress}deleteFieldDefine`, 'POST', params);
export const getGroupList = (params = {}) => WeaTools.callApi(`${apiAddress}getGroupList`, 'POST', params);
export const getGroupForm = (params = {}) => WeaTools.callApi(`${apiAddress}getGroupForm`, 'POST', params);
export const saveGroup = (params = {}) => WeaTools.callApi(`${apiAddress}saveGroup`, 'POST', params);
export const deleteGroup = (params = {}) => WeaTools.callApi(`${apiAddress}deleteGroup`, 'POST', params);
export const getConditionMoudleTabs = (params = {}) => WeaTools.callApi(`${apiAddress}getConditionMoudleTabs`, 'POST', params);
export const saveConditionMoudleDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveConditionMoudleDefine`, 'POST', params);
export const getFieldOrderDefine = (params = {}) => WeaTools.callApi(`${apiAddress}getFieldOrderDefine`, 'POST', params);
export const saveFieldOrderDefine = (params = {}) => WeaTools.callApi(`${apiAddress}saveFieldOrderDefine`, 'POST', params);
export const changeFieldGroup = (params = {}) => WeaTools.callApi(`${apiAddress}changeFieldGroup`, 'POST', params);

export const init = (params = {}) => Promise.all([getRightMenu(), getFieldDefineTabs()]);