import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/dmDevice',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/dmDevice/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/dmDevice',
    method: 'put',
    data
  })
}

export function getAllDevice(data) {
  return request({
    url: 'api/dmDevice/all',
    method: 'get',
    data
  })
}

export function selectList(data) {
  return request({
    url: 'api/dmDevice/selectList',
    method: 'get',
    data
  })
}

export function getInfo(data) {
  console.info('getInfo ', data)
  return request({
    url: 'api/dmDevice/info?id=' + data,
    method: 'get'
  })
}

export default { add, edit, del, selectList, getAllDevice, getInfo }
