import request from '@/utils/request'

// 创建楼层导视
export function createBuilding(data) {
  return request({
    url: '/system/building/create',
    method: 'post',
    data: data
  })
}

// 查询楼层导视
export function listBuilding(query) {
  return request({
    url: '/system/building/list01',
    method: 'get',
    params: query
  })
}

// 获楼层精简信息列表
export function listSimpleBuildings() {
  return request({
    url: '/system/building/list-all-simple',
    method: 'get'
  })
}

// 更新楼层导视
export function updateBuilding(data) {
  return request({
    url: '/system/building/update',
    method: 'put',
    data: data
  })
}

// 删除楼层导视
export function deleteBuilding(id) {
  return request({
    url: '/system/building/delete?id=' + id,
    method: 'delete'
  })
}

// 获得楼层导视
export function getBuilding(id) {
  return request({
    url: '/system/building/get?id=' + id,
    method: 'get'
  })
}

// 获得楼层导视分页
export function getBuildingPage(query) {
  return request({
    url: '/system/building/page',
    method: 'get',
    params: query
  })
}

// 导出楼层导视 Excel
export function exportBuildingExcel(query) {
  return request({
    url: '/system/building/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
