import request from "@/utils/request";


/* 归还任务 */
export function returnTask(taskId) {
  return request({
    url: '/activiti/process/restore/' + taskId,
    method: 'get'
  })
}

/* 拾取任务 */
export function claimTask(taskId) {
  return request({
    url: '/activiti/process/claimTask/' + taskId,
    method: 'get'
  })
}

/* 委托任务 */
export function delegate(taskId, userId) {
  return request({
    url: `/activiti/process/delegate/${ taskId }/${ userId }`,
    method: 'get'
  })
}

// 审批历史列表
export function listHistory(queryForm) {
  return request({
    url: '/activiti/process/listHistory/' + queryForm.instanceId,
    method: 'get',
    params: queryForm,
  })
}
