import request from '@/utils/request'

// 查询能源对象能力列表
export function listAbility(query) {
  return request({
    url: '/ems/object/ability/list',
    method: 'get',
    params: query
  })
}

// 查询能源对象能力详细
export function getAbility(id) {
  return request({
    url: '/ems/object/ability/' + id,
    method: 'get'
  })
}

// 新增能源对象能力
export function addAbility(data) {
  return request({
    url: '/ems/object/ability',
    method: 'post',
    data: data
  })
}

// 批量-新增能源对象能力批量
export function addAbilityBatch(data) {
  return request({
    url: '/ems/object/ability/batch',
    method: 'post',
    data: data
  })
}

// 修改能源对象能力
export function updateAbility(data) {
  return request({
    url: '/ems/object/ability',
    method: 'put',
    data: data
  })
}

// 删除能源对象能力
export function delAbility(id) {
  return request({
    url: '/ems/object/ability/' + id,
    method: 'delete'
  })
}
