import request from '@/utils/request'

// 查询能源设备列表
export function listDevice(query) {
  return request({
    url: '/ems/basecfg/device/list',
    method: 'get',
    params: query
  })
}

// 查询能源设备详细
export function getDevice(id) {
  return request({
    url: '/ems/basecfg/device/' + id,
    method: 'get'
  })
}

// 新增能源设备
export function addDevice(data) {
  return request({
    url: '/ems/basecfg/device',
    method: 'post',
    data: data
  })
}

// 修改能源设备
export function updateDevice(data) {
  return request({
    url: '/ems/basecfg/device',
    method: 'put',
    data: data
  })
}

// 删除能源设备
export function delDevice(id) {
  return request({
    url: '/ems/basecfg/device/' + id,
    method: 'delete'
  })
}
