import request from '@/utils/request'

// 查询电价峰谷列表
export function listValley(query) {
  return request({
    url: '/ems/basecfg/peakvalley/list',
    method: 'get',
    params: query
  })
}

// 查询电价峰谷详细
export function getValley(id) {
  return request({
    url: '/ems/basecfg/peakvalley/' + id,
    method: 'get'
  })
}

// 新增电价峰谷
export function addValley(data) {
  return request({
    url: '/ems/basecfg/peakvalley',
    method: 'post',
    data: data
  })
}

// 修改电价峰谷
export function updateValley(data) {
  return request({
    url: '/ems/basecfg/peakvalley',
    method: 'put',
    data: data
  })
}

// 删除电价峰谷
export function delValley(id) {
  return request({
    url: '/ems/basecfg/peakvalley/' + id,
    method: 'delete'
  })
}
