import request from '@/utils/request'

// 创建流程
export function create(data) {
    return request({
      url: '/bpm/oa-conversion/commit',
      method: 'post',
      data: data
    })
  }
  //驳回或撤回后再次提交通用用事项审批流程信息
  export function reCommit(data) {
    return request({
      url: '/bpm/oa-conversion/reCommit',
      method: 'post',
      data: data
    })
  }
  // 暂存数据保存
  export function save(data) {
    return request({
      url: '/bpm/oa-conversion/staging',
      method: 'post',
      data: data
    })
  }
  // 暂存数据删除
  export function deleteById(id) {
    return request({
      url: 'bpm/oa-conversion/delete?id=' + id,
      method: 'delete'
    })
  }
  
  // 关闭审批流程信息
  export function closeById(id) {
    return request({
      url: '/bpm/oa-conversion/close?id=' + id,
      method: 'delete'
    })
  }
  
  // 获得详情
  export function getDetail(id) {
    return request({
      url: '/bpm/oa-conversion/get?id=' + id,
      method: 'get'
    })
  }
  
  // 获得列表
  export function getListData(query) {
    return request({
      url: '/bpm/oa-conversion/page',
      method: 'get',
      params: query
    })
  }
  // 导出列表
  export function exportList(query) {
    return request({
      url: '/bpm/oa-conversion/export-excel',
      method: 'get',
      params: query,
      responseType: 'blob'
    })
  }
  
  //审批同意通用事项审批流程信息
  export function agree(data) {
    return request({
      url: '/bpm/oa-conversion/agree',
      method: 'post',
      data: data
    })
  }
  
  //驳回通用事项审批流程信息
  export function disagree(data) {
    return request({
      url: '/bpm/oa-conversion/disagree',
      method: 'post',
      data: data
    })
  }
  
  //撤回通用事项审批流程信息
  export function revocation(data) {
    return request({
      url: '/bpm/oa-conversion/revocation',
      method: 'post',
      data: data
    })
  }
  
  