import {
	WeaTools
} from 'ecCom';

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

export const isInitialized = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/isInitialized', 'GET', params);
}

export const getRightMenu = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/getRightMenu', 'GET', params);
}

export const getSearchCondition = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/getSearchCondition', 'GET', params);
}

export const getSearchList = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/getSearchList', 'GET', params);
}

export const getInitForm = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/getInitForm', 'GET', params);
}

export const initAdmin = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/initAdmin', 'POST', params);
}

export const getAdminForm = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/getAdminForm', 'GET', params);
}

export const addAdmin = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/addAdmin', 'POST', params);
}

export const editAdmin = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/editAdmin', 'POST', params);
}

export const deleteAdmin = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/deleteAdmin', 'POST', params);
}

export const isLoginIdRepeat = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/isLoginIdRepeat', 'GET', params);
}

export const addFuncRight = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/funcRight/addFuncRight', 'POST', params);
}

export const addSubComRight = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/subComRight/addSubComRight', 'POST', params);
}

export const deleteFuncRight = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/funcRight/deleteFuncRight', 'POST', params);
}

export const deleteSubComRight = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/subComRight/deleteSubComRight', 'POST', params);
}

export const getFuncRightList = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/funcRight/getFuncRightList', 'GET', params);
}

export const getSubComRightList = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/subComRight/getSubComRightList', 'GET', params);
}

export const getFuncSearchCondition = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/funcRight/getSearchCondition', 'GET', params);
}

export const getSubComSearchCondition = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/subComRight/getSearchCondition', 'GET', params);
}

export const getFuncRightForm = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/funcRight/getFuncRightForm', 'GET', params);
}

export const getSubComRightForm = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/subComRight/getSubComRightForm', 'GET', params);
}

export const getTab = (params) => {
	return WeaTools.callApi('/api/hrm/sanyuan/admin/getTab', 'GET', params);
}

export const getSecForm = (params) => {
	return WeaTools.callApi('/api/hrm/detachsysadmin/getSecForm', 'GET', params);
}

export const saveSec = (params) => {
	return WeaTools.callApi('/api/hrm/detachsysadmin/saveSec', 'POST', params);
}

export const isUseSecondaryPwd = (params) => {
	return WeaTools.callApi('/api/hrm/secondarypwd/isUseSecondaryPwd', 'GET', params);
}

export const saveUseSecondaryPwd = (params) => {
	return WeaTools.callApi('/api/hrm/secondarypwd/saveUseSecondaryPwd', 'POST', params);
}
