import { WeaTools } from 'ecCom'

export const getTabs = (params) => {
	return  WeaTools.callApi('/api/hrm/search/getTabs','GET',params);
}
export const getSearchCondition = (params) => {
	return  WeaTools.callApi('/api/hrm/search/getHrmSearchCondition','GET',params);
}
export const getSearchList = (params) => {
    return WeaTools.callApi('/api/hrm/search/getHrmSearchResult', 'POST', params);
}
export const queryFieldsTree = (params) => {
    return WeaTools.callApi('/api/hrm/base/getHrmSearchTree', 'GET', params);
}
export const saveHrmSearchCondition = (params) => {
	return WeaTools.callApi('/api/hrm/search/saveHrmSearchCondition','POST',params)
}
export const getHrmSearchMoudleList = (params) => {
	return WeaTools.callApi('/api/hrm/search/getHrmSearchMoudleList','GET',params)
}
export const customQueryCondition = (params) => {
	return WeaTools.callApi('/api/hrm/search/getHrmSearchUserDefine','GET',params)
}
export const saveHrmSearchUserDefine = (params) => {
	return WeaTools.callApi('/api/hrm/search/saveHrmSearchUserDefine','POST',params)
}
export const getRightMenuConfig = (params) => {
    return WeaTools.callApi('/api/hrm/search/getRightMenu','GET',params)
}
export const exportExcel = (params = {}) => {
    return WeaTools.callApi('/api/ec/dev/table/export', 'POST', params)
}

export const getFields = (params = {}) => WeaTools.callApi('/api/hrm/search/getFields', 'GET', params)

export const getTemplate = (params = {}) => WeaTools.callApi('/api/hrm/resourceExportTemplate/getTemplate', 'GET', params)

export const getTemplateTable = (params = {}) => WeaTools.callApi('/api/hrm/resourceExportTemplate/getTemplateTable', 'GET', params)

export const saveTemplate = (params = {}) => WeaTools.callApi('/api/hrm/resourceExportTemplate/saveTemplate', 'POST', params)

export const deleteTemplate = (params = {}) => WeaTools.callApi('/api/hrm/resourceExportTemplate/deleteTemplate', 'POST', params)

export const saveAs = (params = {}) => WeaTools.callApi('/api/hrm/resourceExportTemplate/saveAs', 'POST', params)

export const initExportSetting = (params = {}) => Promise.all([getFields(), getTemplate(params)])

//export const cleartemp = (params = {}) => WeaTools.callApi('/api/ec/dev/table/cleartemp', 'GET', params)