//台账c操作
import request from "@/utils/request";

//左边树
export function pvTree() {
  return request({
    url: "/user-boot/dept/deptTree",
    method: "post",
  });
}
//左边树
export function typeTree() {
  return request({
    url: "/user-boot/dept/deptTree",
    method: "post",
  });
}
//表格数据
export function pvLineDetail(data) {
  return request({
    url: "/device-boot/pvTerminalBase/pvLineDetail",
    method: "post",
    data,
  });
}
//刪除
export function delPvLineDetail(data) {
  return request({
    url: "/device-boot/pvLineDetail/delPvLineDetail",
    method: "post",
    data,
  });
}
//刪除
export function getPvDeviceById(params) {
  return request({
    url: "/device-boot/pvDevice/getPvDeviceById",
    method: "get",
    params,
  });
}
//id查询
export function pvDisOrLv(params) {
  return request({
    url: "/device-boot/pvTerminalBase/pvDisOrLv",
    method: "get",
    params,
  });
}

//(I类监测点)根据组织部门获取自身以及子部门的主网或配网监测点
export function getOneMonitorByOrgId(data) {
  return request({
    url: "/device-boot/pms/terminalEliminateData/getOneMonitorByOrgId",
    method: "post",
    data,
  });
}
//根据条件获取监测点信息列表
export function getMonitorListByParam(data) {
  return request({
    url: "/device-boot/pms/monitor/getMonitorListByParam",
    method: "post",
    data,
  });
}
//新增配网监测点
export function addDistributionMonitor(data) {
  return request({
    url: "/device-boot/pms/distributionMonitor/addDistributionMonitor",
    method: "post",
    data,
  });
}
//查询台区所有信息
export function getPowerDistributionList(data) {
  return request({
    url: "/device-boot/pms/powerDistributionarea/getPowerDistributionList",
    method: "post",
    data,
  });
}
//获取发电用户列表
export function getPowerGenerationUserList(data) {
  return request({
    url: "/device-boot/pms/powerGenerationUser/getPowerGenerationUserList",
    method: "post",
    data,
  });
}
//获取用电用户列表
export function getPowerClientList(data) {
  return request({
    url: "/device-boot/pms/powerClient/getPowerClientList",
    method: "post",
    data,
  });
}
//删除配网监测点
export function delDistributionMonitor(data) {
  return request({
    url: "/device-boot/pms/distributionMonitor/delDistributionMonitor",
    method: "post",
    data,
  });
}

//(II类监测点)根据组织部门获取自身以及子部门的主网或配网监测点

export function getTwoMonitorByOrgId(data) {
  return request({
    url: "/device-boot/pms/terminalEliminateData/getTwoMonitorByOrgId",
    method: "post",
    data,
  });
}
//(III类监测点)根据组织部门获取自身以及子部门的主网或配网监测点

export function getThreeYongMonitorByOrgId(data) {
  return request({
    url: "/device-boot/pms/terminalEliminateData/getThreeYongMonitorByOrgId",
    method: "post",
    data,
  });
}
//查询监测终端台账所有信息

export function getTerminalSelectList(data) {
  return request({
    url: "/device-boot/pms/terminal/getTerminalSelectList",
    method: "post",
    data,
  });
}
//删除主网监测点
export function delMonitor(data) {
  return request({
    url: "/device-boot/pms/monitor/delMonitor",
    method: "DELETE",
    data,
  });
}
//根据监测点id获取配网监测点
export function getDistributionMonitorById(data) {
  return request({
    url: "/device-boot/pms/distributionMonitor/getDistributionMonitorById",
    method: "post",
    params: data,
  });
}
//修改
export function updateDistributionMonitor(data) {
  return request({
    url: "/device-boot/pms/distributionMonitor/updateDistributionMonitor",
    method: "post",
    data,
  });
}
//退役监测点
export function retirementMonitor(data) {
  return request({
    url: `/device-boot/pms/monitor/retirementMonitor?type=${data.type}`,
    method: "post",
    data: data.lineIds,
  });
}
//主网台账统计
export function getMainnetPoint(data) {
  return request({
    url: `/device-boot/pms/summaryStatistics/getMainnetPoint`,
    method: "post",
    data,
  });
}
//配网台账统计
export function getDistributionPoint(data) {
  return request({
    url: `/device-boot/pms/summaryStatistics/getDistributionPoint`,
    method: "post",
    data,
  });
}
//稳态指标历史趋势
export function getHistoryResult(data) {
  return request({
    url: `/harmonic-boot/harmonic/getHistoryResult`,
    method: "post",
    data,
  });
}
