import request from "../request";
//获取登录
export function loginJoggle(data) {
  return request({
    url: "/api/login",
    method: "post",
    data,
  });
}
//获取线路树状结构
export function getdyTreeListJoggle(data) {
  return request({
    url: "/api/getdyTreeList",
    method: "get",
    params: data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
//导出数据
export function ExportExcel() {
  return request({
    url: "/xapi/query.php",
    method: "get",
    params: data,
    responseType: "blob",
  });
}

//修改用户
export function updateUserApi(data) {
  return request({
    url: "/api/updateUser",
    method: "post",
    data,
  });
}

//获取装置总数图表
// export function getTermStatistics(data) {
//   return request({
//     url: "/api/getTermStatistics",
//     method: "get",
//     params: data,
//   });
// }
//获取数据接口
export function getDataListJoggle(data) {
  return request({
    url: "/xapi/query.php",
    method: "get",
    params: data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
//获取相位码
export function funccodeJoggle(data) {
  return request({
    url: "/xapi/funccode.php",
    method: "get",
    params: data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
//线路
//1.线路列表信息
export function getLineListJoggle(data) {
  return request({
    url: "/api/getLineList",
    method: "post",
    data,
  });
}
//2.添加单个或者多个线路信息
export function addLineJoggle(data) {
  return request({
    url: "/api/addLine",
    method: "post",
    data,
  });
}
//3.删除新路信息
export function deleteLineJoggle(data) {
  return request({
    url: "/api/deleteLine",
    method: "post",
    data,
  });
}
//4.修改信息
export function updateLineJoggle(data) {
  return request({
    url: "/api/updateLine",
    method: "post",
    data,
  });
}
//获取电压等级列表
export function getdyListJoggle(data) {
  return request({
    url: "/api/getdyList",
    method: "post",
    data,
  });
}
//杆塔信息
//1.获取杆塔列表
export function getTowerListApi(data) {
  return request({
    url: "/api/getTowerList",
    method: "post",
    data,
  });
}
//2.获取线路编号列表
export function getLineListApi(data) {
  return request({
    url: "/api/getLineList",
    method: "post",
    data,
  });
}
//3.新增杆塔信息
export function addTowerApi(data) {
  return request({
    url: "/api/addTower",
    method: "post",
    data,
  });
}
//4.修改杆塔信息
export function updateTowerApi(data) {
  return request({
    url: "/api/updateTower",
    method: "post",
    data,
  });
}
//5.删除杆塔信息
export function delTowerApi(data) {
  return request({
    url: "/api/deleteTower",
    method: "post",
    data,
  });
}
export function getTerminalJoggle(data) {
  return request({
    url: "/api/getTerminalList",
    method: "post",
    data,
  });
}
//添加设备信息
export function addTerminalJoggle(data) {
  return request({
    url: "/api/addTerminal",
    method: "post",
    data,
  });
}
//添加设备---获取-线路-杆塔
export function getLineAndGtInfo(data) {
  return request({
    url: "/api/getLineAndGtList",
    method: "post",
    data,
  });
}
//修改设备信息
export function updateTerminalJoggle(data) {
  return request({
    url: "/api/updateTerminal",
    method: "post",
    data,
  });
}
//删除设备信息
export function deleteTerminalJoggle(data) {
  return request({
    url: "/api/deleteTerminal",
    method: "post",
    data,
  });
}
//规约版本
export function getProtocolList(data) {
  return request({
    url: "/api/getProtocolList",
    method: "get",
    params: data,
  });
}
//获取电压-线路-杆塔等信息
export function getSearchInfo(data) {
  return request({
    url: "/api/getLineAndGt",
    method: "post",
    data,
  });
}
