import request from '@/utils/request'

// 确认短接
export function handleConfirmCircuit(data) {
  return request({
    url: '/pssr/circuit/confirmCircuit',
    method: 'put',
    data: data
  })
}

// 驳回短接
export function handleTurnDownCircuit(data) {
  return request({
    url: '/pssr/circuit/turnDownCircuit',
    method: 'put',
    data: data
  })
}

// 查询短接列表
export function listCircuit(query) {
  return request({
    url: '/pssr/circuit/list',
    method: 'get',
    params: query
  })
}

// 查询短接详细
export function getCircuit(id) {
  return request({
    url: '/pssr/circuit/' + id,
    method: 'get'
  })
}

// 新增短接
export function addCircuit(data) {
  return request({
    url: '/pssr/circuit',
    method: 'post',
    data: data
  })
}

// 修改短接
export function updateCircuit(data) {
  return request({
    url: '/pssr/circuit',
    method: 'put',
    data: data
  })
}

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


// 删除短接
export function delCircuit(id) {
  return request({
    url: '/pssr/circuit/' + id,
    method: 'delete'
  })
}

// 导出短接
export function exportCircuit(query) {
  return request({
    url: '/pssr/circuit/export',
    method: 'get',
    params: query
  })
}
