import { http } from '@/utils/http';

/*我的任务列表*/
export function taskListApi(config : Object) {
	return http({
		url: '/act/task/list',
		method: 'GET',
		data: config
	})
}

/*历史任务列表*/
export function taskHistoryListApi(config : Object) {
	return http({
		url: '/act/task/taskHistoryList',
		method: 'GET',
		data: config
	})
}

/*签收*/
export function claim(config : Object) {
	return http({
		url: '/act/task/claim',
		method: 'PUT',
		data: config
	})
}

/*发起流程*/
export function startMutilProcessApi(config : Object) { // 发起流程
	return http({
		url: '/process/extActProcess/startMutilProcess',
		method: 'POST',
		data: config
	})
}
export function getProcessNodeInfo(config : Object) { // 获取节点信息
	return http({
		url: '/process/extActProcessNode/getProcessNodeInfo',
		method: 'GET',
		data: config
	})
}
export function getNodePositionInfo(config : Object) {
	return http({
		url: '/act/task/getNodePositionInfo',
		method: 'GET',
		data: config
	})
}

export function getHisInfo(config : Object) {
	return http({
		url: '/act/task/processHistoryList',
		method: 'GET',
		data: config
	})
}


export function taskEntrust(config : Object) { //委托
	return http({
		url: '/act/task/taskEntrust',
		method: 'PUT',
		data: config
	})
}

export function getProcessTaskTransInfo(config : Object) { //获取当前流程节点信息
	return http({
		url: '/act/task/getProcessTaskTransInfo',
		method: 'GET',
		data: config
	})
}
export function getHisProcessNodeInfo(config : Object) { //获取当前流程节点历史信息
	return http({
		url: '/process/extActProcessNode/getHisProcessNodeInfo',
		method: 'GET',
		data: config
	})
}
export function processComplete(config : Object) { //流程任务完成
	return http({
		url: '/act/task/processComplete',
		method: 'POST',
		data: config
	})
}

export function histTasks(config : Object) { //流程任务完成
	return http({
		url: '/act/task/taskHistoryList',
		method: 'GET',
		data: config
	})
}
export function myApplyProcessListApi(config : object) { // 本人发起列表
	return http({
		url: '/act/task/myApplyProcessList',
		method: 'GET',
		data: config
	})
}

export function callBackProcessApi(config : object) { // 取回流程
	return http({
		url: '/act/task/callBackProcess',
		method: 'PUT',
		data: config
	})
}

export function getHisProcessTaskTransInfo(config : object) { // 历史流转
	return http({
		url: '/act/task/getHisProcessTaskTransInfo',
		method: 'GET',
		data: config
	})
}

export function sendMessageApi(config : object) { // 短信通知
	return http({
		url: '/myAct/processInstance/sendMessage',
		method: 'GET',
		data: config
	})
}