import {WeaTools} from 'ecCom'

export const getHasRight = params => {
    return WeaTools.callApi('/api/hrm/resource/total/hasRight', 'GET', params);
}

export const getHrmResourceTotal = params => {
    return WeaTools.callApi('/api/hrm/resource/total/getHrmResourceTotal', 'GET', params);
}
export const getFormInfo = (params = {}) => WeaTools.callApi('/api/hrm/permissionsearch/getPermissionSearchForm', 'GET', params)

export const getTableData = (params = {}) => WeaTools.callApi('/api/hrm/permissionsearch/getPermissionSearchResult', '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 initModuleData = (urlParams, params) => Promise.all([getCondition(urlParams), getList(urlParams, params)])
