import request from '@/utils/request'
// 分页查询
export function list(query) {
  return request({
    url: '/processInstance/list',
    method: 'get',
    params: query
  })
}
// 分页查询
export function upload(query) {
  return request({
    url: '/processInstance/list',
    method: 'get',
    params: query
  })
}

// 分页查询
export function delTitle(query) {
  return request({
    url: '/processInstance/list',
    method: 'get',
    params: query
  })
}

// 分页查询
export function suspendProcess(processInstanceId,status) {
  return request({
    url: '/processInstance/suspend/'+processInstanceId+"/"+status,
    method: 'post',
  })
}

// 删除流程实例
export function deleteProcess(processInstanceId) {
  return request({
    url: '/processInstance/'+processInstanceId,
    method: 'delete',
  })
}
//更具id获取任务列表
export function listTask(processInstanceId) {
  return request({
    url: '/processInstance/listTask/'+processInstanceId,
    method: 'get',
  })
}

//获取分配任务人员
export function listUser() {
  return request({
    url: '/processInstance/listUser',
    method: 'get',
  })
}
//转办任务
export function transToOffice(taskId,userId) {
  return request({
    url: '/processInstance/transToOffice/'+taskId+"/"+userId,
    method: 'post',
  })
}
//委托任务
export function entrust(taskId,userId) {
  return request({
    url: '/processInstance/entrust/'+taskId+"/"+userId,
    method: 'post',
  })
}
