import request from '@/utils/request'

// 查询线损对象信息列表
export function listLoss(query) {
  return request({
    url: '/ems/loss/list',
    method: 'get',
    params: query
  })
}

// 查询线损对象信息详细
export function getLoss(objid) {
  return request({
    url: '/ems/loss/' + objid,
    method: 'get'
  })
}

// 新增线损对象信息
export function addLoss(data) {
  return request({
    url: '/ems/loss',
    method: 'post',
    data: data
  })
}

// 修改线损对象信息
export function updateLoss(data) {
  return request({
    url: '/ems/loss',
    method: 'put',
    data: data
  })
}

// 删除线损对象信息
export function delLoss(objid) {
  return request({
    url: '/ems/loss/' + objid,
    method: 'delete'
  })
}

// 查询监测点下拉树结构
export function monitorTreeSelect(params) {
  return request({
    url: '/ems/dnbThreshold/monitorTree',
    method: 'get',
    params: params
  })
}
