import request from '@/utils/request'

// 查询实验室布局列表
export function listLayout(query) {
  return request({
    url: '/laboratory/layout/list',
    method: 'get',
    params: query
  })
}

// 查询楼层下的布局信息-列表-不分页
export function listLayoutByFloorId(floorId) {
  return request({
    url: `/laboratory/layout/${floorId}/list`,
    method: 'get'
  })
}
// 查询楼层下的未分配布局信息-列表-不分页
export function onUselistLayoutByFloorId(floorId) {
  return request({
    url: `/laboratory/layout/${floorId}/noUse/list`,
    method: 'get'
  })
}
// 查询楼层下的未分配布局信息-列表-不分页---编辑时适用
export function onUselistLayoutByFloorIdTwo(floorId,ex) {
  return request({
    url: `/laboratory/layout/${floorId}/${ex}/noUse/list`,
    method: 'get'
  })
}

// 查询实验室布局详细
export function getLayout(id) {
  return request({
    url: '/laboratory/layout/' + id,
    method: 'get'
  })
}

// 新增实验室布局
export function addLayout(data) {
  return request({
    url: '/laboratory/layout',
    method: 'post',
    data: data
  })
}

// 修改实验室布局
export function updateLayout(data) {
  return request({
    url: '/laboratory/layout',
    method: 'put',
    data: data
  })
}

// 删除实验室布局
export function delLayout(id) {
  return request({
    url: '/laboratory/layout/' + id,
    method: 'delete'
  })
}
