import request from '@/utils/request'

// 查询建筑列表
export function listBuildings(query) {
    return request({
        url: '/system/buildings/list',
        method: 'get',
        params: query
    })
}

// 查询建筑详细
export function getBuildings(query) {
    return request({
        url: '/system/buildings',
        method: 'get',
        params: query
    })
}

// 新增建筑
export function addBuildings(data) {
    return request({
        url: '/system/buildings',
        method: 'post',
        data: data
    })
}

// 修改建筑
export function updateBuildings(data) {
    return request({
        url: '/system/buildings',
        method: 'put',
        data: data
    })
}

// 删除建筑
export function delBuildings(query) {
    return request({
        url: '/system/buildings',
        method: 'delete',
        params: query
    })
}

// 导出建筑
export function exportBuildings(query) {
    return request({
        url: '/system/buildings/export',
        method: 'get',
        params: query
    })
}

// 获取项目空间下拉树列表
export function listRegionSpaceTree(query) {
  console.log('aaa-', query)
  return request({
    url: "/system/buildings/tree-list",
    method: "get",
    params: query
  });
}
