import request from '@/utils/request'

// 查询计量设备列表
export function listDevice(query) {
  return request({
    url: '/ems/meterDevice/list',
    method: 'get',
    params: query
  })
}

// 查询计量设备详细
export function getDevice(id) {
  return request({
    url: '/ems/meterDevice/' + id,
    method: 'get'
  })
}

// 新增计量设备
export function addDevice(data) {
  return request({
    url: '/ems/meterDevice',
    method: 'post',
    data: data
  })
}

// 修改计量设备
export function updateDevice(data) {
  return request({
    url: '/ems/meterDevice',
    method: 'put',
    data: data
  })
}

// 删除计量设备
export function delDevice(id) {
  return request({
    url: '/ems/meterDevice/' + id,
    method: 'delete'
  })
}
