import request from '@/utils/request'

// 楼宇下拉
export function getBuildingList(areaId) {
  return request({
    url: '/gas/building/getBuilding',
    method: 'get',
    params: {areaId: areaId}
  })
}

// 查询楼宇管理列表
export function listBuilding(query) {
  return request({
    url: '/gas/building/list',
    method: 'get',
    params: query
  })
}

// 查询楼宇管理详细
export function getBuilding(id) {
  return request({
    url: '/gas/building/' + id,
    method: 'get'
  })
}

// 新增楼宇管理
export function addBuilding(data) {
  return request({
    url: '/gas/building',
    method: 'post',
    data: data
  })
}

// 修改楼宇管理
export function updateBuilding(data) {
  return request({
    url: '/gas/building',
    method: 'put',
    data: data
  })
}

// 删除楼宇管理
export function delBuilding(id) {
  return request({
    url: '/gas/building/' + id,
    method: 'delete'
  })
}
