import request from '@/utils/request'

// 获取待我审核
export function FlowBeforeList(category, data) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/List/${category}`,
    method: 'get',
    data
  })
}
// 获取待我审批信息
export const FlowBeforeInfo = (id, params) => {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/${id}`,
    method: 'get',
    params
  })
}
// 待我审核审核
export function Audit(id, data, processId) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/Audit/${id}/${processId}`,
    method: 'post',
    data
  })
}
// 待我审核驳回
export function Reject(id, data, processId) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/Reject/${id}`, // /${processId}
    method: 'post',
    data
  })
}
// 撤回审核
export function Recall(id, data) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/Recall/${id}`,
    method: 'post',
    data
  })
}
// 终止审核
export function Cancel(id, data) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/Cancel/${id}`,
    method: 'post',
    data
  })
}
// 待我审核转办
export function Transfer(id, data) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/Transfer/${id}`,
    method: 'post',
    data
  })
}
// 流程监控指派
export function Assign(id, data) {
  return request({
    url: `/flow-api/paas/workflow/Engine/FlowBefore/Assign/${id}`,
    method: 'post',
    data
  })
}
