import {
	WeaTools
} from 'ecCom';

/**
 * 获取tab数据
 * @param  {Object} params [description]
 * @return {[type]}        [description]
 */
export const getFormInfo = (params = {}) => WeaTools.callApi('/api/hrm/permissiontoadjust/getPermissionToAdjustForm', 'GET', params)

export const getTableData = (params = {}) => WeaTools.callApi('/api/hrm/permissiontoadjust/getPermissionToAdjustList', 'POST', params)

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

export const getCondition = (urlParams, params) => WeaTools.callApi(`/api/hrm/permissiontoadjustbrowser/condition/${urlParams}`, 'GET', params)

export const getList = (urlParams, params) => WeaTools.callApi(`/api/hrm/permissiontoadjustbrowser/list/${urlParams}`, 'GET', params)

export const getProcessLog = (params) => WeaTools.callApi('/api/hrm/permissiontoadjust/getProcessLog', 'GET', params)

export const checkFromId = (params) => WeaTools.callApi('/api/hrm/permissiontoadjust/checkFromId', 'GET', params)

export const initModuleData = (urlParams, params) => Promise.all([getCondition(urlParams), getList(urlParams, params)])