/**
 * 设备管理接口
 */
import request from '@/utils/request'
import qs from 'qs'

// 设备类别
export function getDevice(params) {
  return request({
    url: 'device/type',
    method: 'get',
    params
  })
}

// 设备查询
export function getDeviceTypeList(params) {
  return request({
    url: 'deviceType/list',
    method: 'get',
    params
  })
}

// 添加设备
export function addDeviceType(params) {
  return request({
    url: 'deviceType/add',
    method: 'post',
    params
  })
}
// 修改设备
export function updateDeviceType(params) {
  return request({
    url: 'deviceType/update',
    method: 'post',
    params
  })
}
// 删除设备
export function delDeviceType(ids) {
  return request({
    url: 'deviceType/delete',
    method: 'post',
    params: {
      ids: ids
    },
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}
