import {
	creatRequest
} from '../../utils/request.js';

const requestList = {
	// 改善任务列表
	getMissionList: {
		method: 'GET',
		url: 'improverTask/list'
	},
	// 改善任务详情
	getMissionDetails: {
		method: 'GET',
		url: 'improverTask/detail'
	},
	// 查询部门人员树 (通用接口)
	getEmpDeptTree: {
		method: 'GET',
		url: 'common/empDeptTree'
	},
	// 公共改善任务接口
	comTaskCirculation: {
		method: 'POST',
		url: 'improverTask/taskCirculation'
	}
};

export const commServer = ({
	key,
	data
}) => {
	let obj = requestList[key];
	return creatRequest(obj, data);
}
