import request from '@/utils/request'

// 查询会议室列表
export function listMeeting(query) {
  return request({
    url: '/bpm/oa-meeting-room/page',
    method: 'get',
    params: query
  })
}

// 获取会议室精简信息列表
export function listSimpleMeetings() {
  return request({
    url: '/bpm/oa-meeting-room/list',
    method: 'get'
  })
}

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

// 新增会议室
export function addMeeting(data) {
  return request({
    url: '/bpm/oa-meeting-room/create',
    method: 'post',
    data: data
  })
}

// 修改会议室
export function updateMeeting(data) {
  return request({
    url: '/bpm/oa-meeting-room/update',
    method: 'put',
    data: data
  })
}

// 删除会议室
export function delMeeting(postId) {
  return request({
    url: '/bpm/oa-meeting-room/delete?id=' + postId,
    method: 'delete'
  })
}

// 导出会议室
export function exportMeeting(query) {
  return request({
    url: '/bpm/oa-meeting-room/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
