import {
	WeaTools
} from 'ecCom'

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

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

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

export const getEditorForm = (params) => {
	return WeaTools.callApi('/api/hrm/detachsysadmin/getAddorEditForm?is_multilang_set=true', 'GET', params);
}

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

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

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

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

export const securitySave = (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);
}