import request from '@/utils/request'

// 查询服务区用电属性列表
export function listAttr(query) {
  return request({
    url: '/ems/basecfg/electricity/attr/list',
    method: 'get',
    params: query
  })
}

// 查询服务区用电属性详细
export function getAttr(id) {
  return request({
    url: '/ems/basecfg/electricity/attr/' + id,
    method: 'get'
  })
}

// 新增服务区用电属性
export function addAttr(data) {
  return request({
    url: '/ems/basecfg/electricity/attr',
    method: 'post',
    data: data
  })
}

// 修改服务区用电属性
export function updateAttr(data) {
  return request({
    url: '/ems/basecfg/electricity/attr',
    method: 'put',
    data: data
  })
}

// 删除服务区用电属性
export function delAttr(id) {
  return request({
    url: '/ems/basecfg/electricity/attr/' + id,
    method: 'delete'
  })
}

// 获取电价配置
export function getElecConfig() {
  return request({
    url: '/ems/basecfg/electricity/config/list',
    method: 'get'
  })
}
