import {
	WeaTools
} from 'ecCom'

//------------------------------权限----------------------------------------
export const getAuth = (params) => {
	return WeaTools.callApi('/api/hrm/trainlayout/getHasRight', 'GET', params);
}
export const getTraineeAuth = (params) => {
	return WeaTools.callApi('/api/hrm/trainactor/getHasRight', 'GET', params);
}
export const getTestAuth = (params) => {
	return WeaTools.callApi('/api/hrm/traintest/getHasRight', 'GET', params);
}
export const getReviewAuth = (params) => {
	return WeaTools.callApi('/api/hrm/trainassess/getHasRight', 'GET', params);
}
export const getScheduleAuth = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/getHasRight', 'GET', params);
}

//------------------------------页面功能按钮--------------------------------
export const getMainButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/train/getRightMenu', 'GET', params);
}
export const getScheduleButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/getRightMenu', 'GET', params);
}
export const getTestButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/traintest/getRightMenu', 'GET', params);
}
export const getReviewButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/trainassess/getRightMenu', 'GET', params);
}
export const getAttendButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/trainactor/getRightMenu', 'GET', params);
}

//------------------------------高级搜索------------------------------------
export const getSearchItems = (params) => {
	return WeaTools.callApi('/api/hrm/train/getSearchCondition', 'GET', params);
}
//-------------------------------删除活动-----------------------------------
export const deleteActivity = (params) => {
	return WeaTools.callApi('/api/hrm/train/delete', 'POST', params);
}
export const deleteSchedule = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/delete', 'POST', params);
}
//-------------------------------培训浏览框联动-----------------------------------
export const getTrainArrangeContent = (params) => {
	return WeaTools.callApi('/api/hrm/train/getTrainPlanInfo', 'GET', params);
}

//-------------------------------获取列表信息------------------------------
export const getActivityTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/train/getSearchList', 'GET', params);
}
export const getTestTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/traintest/getSearchList', 'GET', params);
}
export const getReviewTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainassess/getSearchList', 'GET', params);
}
export const getScheduleTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/getSearchList', 'GET', params);
}
export const getAttendTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainactor/getSearchList', 'GET', params);
}

//--------------------------------获取表单信息-------------------------------
export const getActivityForm = (params) => {
	return WeaTools.callApi('/api/hrm/train/getTrainForm?is_multilang_set=true', 'GET', params);
}
export const getTraineeForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainactor/getTrainActorForm?is_multilang_set=true', 'GET', params);
}
export const getTestForm = (params) => {
	return WeaTools.callApi('/api/hrm/traintest/getTrainTestForm?is_multilang_set=true', 'GET', params);
}
export const getReviewForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainassess/getTrainAssessForm?is_multilang_set=true', 'GET', params);
}
export const getScheduleForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/getTrainDayForm?is_multilang_set=true', 'GET', params);
}
export const getActivityEndForm = (params) => {
	return WeaTools.callApi('/api/hrm/train/getFinishEventForm?is_multilang_set=true', 'GET', params);
}

//-------------------------------新建、编辑保存--------------------------------
export const addActivity = (params) => {
	return WeaTools.callApi('/api/hrm/train/add', 'POST', params);
}
export const editActivity = (params) => {
	return WeaTools.callApi('/api/hrm/train/edit', 'POST', params);
}
export const addTest = (params) => {
	return WeaTools.callApi('/api/hrm/traintest/add', 'POST', params);
}
export const editTest = (params) => {
	return WeaTools.callApi('/api/hrm/traintest/edit', 'POST', params);
}
export const addReview = (params) => {
	return WeaTools.callApi('/api/hrm/trainassess/add', 'POST', params);
}
export const editReview = (params) => {
	return WeaTools.callApi('/api/hrm/trainassess/edit', 'POST', params);
}
export const addSchedule = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/add', 'POST', params);
}
export const editSchedule = (params) => {
	return WeaTools.callApi('/api/hrm/trainday/edit', 'POST', params);
}
export const addEndActivity = (params) => {
	return WeaTools.callApi('/api/hrm/train/saveFinishEvent', 'POST', params);
}
export const addTrainee = (params) => {
	return WeaTools.callApi('/api/hrm/trainactor/add', 'POST', params);
}
export const editAttendance = (params) => {
	return WeaTools.callApi('/api/hrm/trainactor/edit', 'POST', params);
}