import request from '@/utils/request'

// 查询流程运行记录列表
export function listFlowRecord(query) {
  return request({
    url: '/flow/flowRecord/list',
    method: 'get',
    params: query
  })
}

// 查询流 查询流程运行记录列表
export function listFlowRecordByGf(query) {
  return request({
    url: '/flow/flowRecord/gf',
    method: 'get',
    params: query
  })
}

// 查询流 查询流程运行记录列表
// export function listFlowRecord(query) {
//   return request({
//     url: '/flow/flowRecord/list',
//     method: 'get',
//     params: query
//   })
// }

export function getFlowRecord(id) {
  return request({
    url: '/flow/flowRecord/' + id,
    method: 'get'
  })
}

// 新增流程运行记录
export function addFlowRecord(data) {
  return request({
    url: '/flow/flowRecord',
    method: 'post',
    data: data
  })
}

// 修改流程运行记录
export function updateFlowRecord(data) {
  return request({
    url: '/flow/flowRecord',
    method: 'put',
    data: data
  })
}

// 删除流程运行记录
export function delFlowRecord(id) {
  return request({
    url: '/flow/flowRecord/' + id,
    method: 'delete'
  })
}

// 导出流程运行记录
export function exportFlowRecord(query) {
  return request({
    url: '/flow/flowRecord/export',
    method: 'get',
    params: query
  })
}
