import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/enterpriseManagement.info/` + url, ...arg)
const requestDEL = (url, ...arg) => baseRequest(`/basic.info/unitInfo/` + url, ...arg)
const requestPAG = (url, ...arg) => baseRequest(`/policy.info` + url, ...arg)

// 企业管理
export default {
	// 人员信息
	EmPersonInfo(data) {
		return request('emPersonInfo/findPage', data, 'get')
	},

	//add
	EmPersonInfoAdd(data) {
		return request('/emPersonInfo/add', data, 'post')
	},

	//del
	EmPersonInfoDelete(data) {
		return request(`/emPersonInfo/delete`, data, 'post')
	},
	//view
	EmPersonInfoDetail(data) {
		return request(`/emPersonInfo/detail`, data, 'get')
	},
	//edit
	EmPersonInfoEdit(data) {
		return request(`/emPersonInfo/edit`, data, 'post')
	},
	// 人员制度建设
	EmPersonInfoEmSystemBuild(data) {
		return request(`/emSystemBuild/findPage`, data, 'get')
	},
	//add
	enterpriseManagementAdd(data) {
		return request(`/emSystemBuild/add`, data, 'post')
	},
	//del
	enterpriseManagementDEl(data) {
		return request(`/emSystemBuild/delete`, data, 'post')
	},
	//view
	enterpriseManagementdetail(data) {
		return request(`/emSystemBuild/detail`, data, 'get')
	},
	//edit
	enterpriseManagementedit(data) {
		return request(`/emSystemBuild/edit`, data, 'post')
	},

	//荣誉称号管理
	EmHonorTitle(data) {
		return request('/emHonorTitle/findPage', data, 'get')
	},
	// del
	EmHonorDelete(data) {
		return request('/emHonorTitle/delete', data, 'post')
	},

	// add
	EmHonorADD(data) {
		return request('/emHonorTitle/add', data, 'post')
	},
	// view

	EmHonorView(data) {
		return request('/emHonorTitle/detail', data, 'get')
	},
	// /edit

	EmHonorEdit(data) {
		return request('/emHonorTitle/edit', data, 'post')
	},

	// 知识库建设
	ZSKJK(data) {
		return request('/emKnowledge/findPage', data, 'get')
	},
	//add
	ZSKJKADD(data) {
		return request('/emKnowledge/add', data, 'post')
	},
	//del
	ZSKJKDEl(data) {
		return request('/emKnowledge/delete', data, 'post')
	},
	//view
	ZSKJKView(data) {
		return request('/emKnowledge/detail', data, 'get')
	},
	ZSKJKEdit(data) {
		return request('/emKnowledge/edit', data, 'post')
	},

	// 人才培训管理
	RCPXGLList(data) {
		return request('/emTrain/findPage', data, 'get')
	},
	//del
	RCPXGLdelete(data) {
		return request('/emTrain/delete', data, 'post')
	},
	//add
	RCPXGLadd(data) {
		return request('/emTrain/add', data, 'post')
	},
	//view
	RCPXGLdetail(data) {
		return request('/emTrain/detail', data, 'get')
	},
	//edit
	RCPXGLedit(data) {
		return request('/emTrain/edit', data, 'post')
	},
	// 企业管理-位置信息
	QYWZXXlist(data) {
		return request('/emPositionInfo/findPage', data, 'get')
	},
	//del
	QYWZXXdelete(data) {
		return request('/emPositionInfo/delete', data, 'post')
	},
	//获取地域信息3级
	getAllChildrenDataDEl(data) {
		return requestDEL('/getAllChildren', data, 'get')
	},
	//add
	QYWZXXadd(data) {
		return request('/emPositionInfo/add', data, 'post')
	},

	//view
	QYWZXXview(data) {
		return request('/emPositionInfo/detail', data, 'get')
	},

	//edit
	QYWZXXedit(data) {
		return request('/emPositionInfo/edit', data, 'post')
	},

	// 人才规划
	RCGHlist(data) {
		return request('/emPersonPlan/findPage', data, 'get')
	},
	// del
	RCGHdel(data) {
		return request('/emPersonPlan/delete', data, 'post')
	},
	//add
	RCGHadd(data) {
		return request('/emPersonPlan/add', data, 'post')
	},
	//view
	RCGHview(data) {
		return request('/emPersonPlan/detail', data, 'get')
	},
	//edit
	RCGHedit(data) {
		return request('/emPersonPlan/edit', data, 'post')
	},
	//
	RCGHstartFlow(data) {
		return request('/emPersonPlan/startFlow', data, 'get')
	},
	// 规划审批
	// /auditRequest/auditPersonPlan
	RCGHauditPersonPlan(data) {
		return requestPAG('/auditRequest/auditPersonPlan', data, 'post')
	},
	//view
	RCGHauditRequest(data) {
		return requestPAG('/auditRequest/detail', data, 'get')
	}
}
