import request from '@/utils/request'

// 分页查询设施信息列表
export function pageListFacility(query) {
  return request({
    url: '/pm/facility/pageList',
    method: 'get',
    params: query
  })
}

// 查询设施信息列表
export function listFacility(query) {
  return request({
    url: '/pm/facility/list',
    method: 'get',
    params: query
  })
}

// 查询设施信息详细
export function getFacility(id) {
  return request({
    url: '/pm/facility/' + id,
    method: 'get'
  })
}

// 新增设施信息
export function addFacility(data) {
  return request({
    url: '/pm/facility',
    method: 'post',
    data: data
  })
}

// 修改设施信息
export function updateFacility(data) {
  return request({
    url: '/pm/facility',
    method: 'put',
    data: data
  })
}

// 删除设施信息
export function delFacility(id) {
  return request({
    url: '/pm/facility/' + id,
    method: 'delete'
  })
}

// 导出设施信息
export function exportFacility(query) {
  return request({
    url: '/pm/facility/' + 'export',
    method: 'post',
    params: query
  })
}
