import request from '@/utils/request'

// 确认临时电源
export function handleConfirmPower(data) {
  return request({
    url: '/pssr/power/confirmPower',
    method: 'put',
    data: data
  })
}

// 驳回临时电源
export function handleTurnDownPower(data) {
  return request({
    url: '/pssr/power/turnDownPower',
    method: 'put',
    data: data
  })
}

// 查询临时电源列表
export function listPower(query) {
  return request({
    url: '/pssr/power/list',
    method: 'get',
    params: query
  })
}

// 查询临时电源详细
export function getPower(id) {
  return request({
    url: '/pssr/power/' + id,
    method: 'get'
  })
}

// 新增临时电源
export function addPower(data) {
  return request({
    url: '/pssr/power',
    method: 'post',
    data: data
  })
}

// 修改临时电源
export function updatePower(data) {
  return request({
    url: '/pssr/power',
    method: 'put',
    data: data
  })
}

//
export function updatePowerBatch(data) {
  return request({
    url: '/pssr/power/editBatch',
    method: 'put',
    data: data
  })
}


// 删除临时电源
export function delPower(id) {
  return request({
    url: '/pssr/power/' + id,
    method: 'delete'
  })
}

// 导出临时电源
export function exportPower(query) {
  return request({
    url: '/pssr/power/export',
    method: 'get',
    params: query
  })
}
