import request from '@/utils/request'

// 查询列表
export function listReserveMeeting(query) {
  return request({
    url: '/bpm/oa-meeting-reserve/page',
    method: 'get',
    params: query
  })
}

// 获取精简信息列表
export function listSimpleReserveMeetings(query) {
  return request({
    url: '/bpm/oa-meeting-reserve/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getReserveMeeting(postId) {
  return request({
    url: '/bpm/oa-meeting-reserve/get?id=' + postId,
    method: 'get'
  })
}

// 新增
export function addReserveMeeting(data) {
  return request({
    url: '/bpm/oa-meeting-reserve/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateReserveMeeting(data) {
  return request({
    url: '/bpm/oa-meeting-reserve/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delReserveMeeting(postId) {
  return request({
    url: '/bpm/oa-meeting-reserve/delete?id=' + postId,
    method: 'delete'
  })
}

// 取消
export function cancelReserveMeeting(postId) {
  return request({
    url: '/bpm/oa-meeting-reserve/cancel?id=' + postId,
    method: 'get'
  })
}

// 结束
export function endReserveMeeting(postId) {
  return request({
    url: '/bpm/oa-meeting-reserve/end?id=' + postId,
    method: 'get'
  })
}

// 导出
export function exportReserveMeeting(query) {
  return request({
    url: '/bpm/oa-meeting-reserve/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
