import request from '@/utils/request'
// 获取区域列表分页
export function getAreaPageList(data) {
  return request({
    url: '/admin/third/platform/page',
    method: 'post',
    data
  })
}

// 获取区域列表
export function getAreaList(data) {
  return request({
    url: '/admin/third/platform/list',
    method: 'post',
    data
  })
}

// 添加/编辑区域
export function addOrUpdate(data) {
  return request({
    url: '/admin/third/platform/create',
    method: 'post',
    data
  })
}

// 删除指定区域
export function deleteArea(areaId) {
  return request({
    url: `admin/third/platform/zone/delete/${areaId}`,
    method: 'get'
  })
}

// 删除指定区域的设备
export function deleteDeviceOfArea(areaId, deviceId) {
  return request({
    url: `admin/third/platform/zone/sn/delete/${areaId}/${deviceId}`,
    method: 'get'
  })
}
// 获取设备列表
export function platformSnList(data) {
  return request({
    url: '/admin/third/platform/sn/list',
    method: 'post',
    data
  })
}
