/**
 * 设备管理页面 API
 */
import request from '@/utils/request'

/** 设备列表查询 */
export const queryDeviceListApi = (data) => {
  return request.get('/base/tbDevice/list', {
    params: data
  })
}

/** 设备类型查询 */
export const queryDeviceTypeApi = (data) => {
  return request.get('/base/tbProDepart/getDataList', {
    params: data
  })
}

/** 所属边带查询 */
export const queryBdIdApi = (data) => {
  return request.get('/base/tbBdDeviceRecord/list', {
    params: data
  })
}

/** 预警配置查询 */
export const queryConfigApi = (data) => {
  return request.get('/base/tbWarnConfig/list', {
    params: data
  })
}

/** 新增设备 */
export const addDeviceApi = (data) => {
  return request.post('/base/tbDevice', data)
}

/** 修改设备 */
export const editDeviceApi = (data) => {
  return request.put('/base/tbDevice', data)
}

/** 删除设备 */
export const deleteDeviceApi = (id) => {
  return request.delete(`/base/tbDevice/${id}`)
}
