import request from "../request";
//获取登录
export function loginJoggle(data) {
  return request({
    url: "/api/login",
    method: "post",
    data,
  });
}
//声光报警
export function alarmMarkJoggle(data) {
  return request({
    url: "/api/alarmMark",
    method: "post",
    data,
  });
}
//实时监控页面
//获取线路树状结构
export function getdyTreeListJoggle(data) {
  return request({
    url: "/api/getdyTreeList",
    method: "post",
    data,
  });
}
//获取图片接口
export function getTerminalPhotoListJoggle(data) {
  return request({
    url: "/api/getTerminalPhotoList",
    method: "post",
    data,
  });
}
//获取通道的接口

export function getChannelListJoggle(data) {
  return request({
    url: "/api/getChannelByTermid",
    method: "post",
    data,
  });
}
//根据装置号获取通道接口

export function getChannelByTermidJoggle(data) {
  return request({
    url: "/api/getChannelByTermid",
    method: "post",
    data,
  });
}

//获取装置信息
export function getDeviceList(data) {
  return request({
    url: "/api/getTerminalStatus",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
//获取最新装置信息
export function getNewDeviceList(data) {
  return request({
    url: "/api/getLastedTerminalStatus",
    method: "post",
    data,
  });
}

//图片轮巡
//获取图片轮巡接口
export function getPictureList(data) {
  return request({
    url: "/api/getPhotoBanner",
    method: "post",
    data,
  });
}

//历史图片
//获取电压-线路-杆塔等信息
export function getSearchInfo(data) {
  return request({
    url: "/api/getLineAndGt",
    method: "post",
    data,
  });
}
//获取实时图片数据
export function getRealtimePhoto(data) {
  return request({
    url: "/api/getPhotoList",
    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,
  });
}

//拍照时间表设置
//1.获取任务规则列表接口
export function getScheduleRulelListJoggle(data) {
  return request({
    url: "/api/getScheduleRulelList",
    method: "post",
    data,
  });
}
//2.新增任务规则
export function addScheduleRulel(data) {
  return request({
    url: "/api/addSchelduleRuleList",
    method: "post",
    data,
  });
}
//3.删除任务规则
export function deleteScheduleRulel(data) {
  return request({
    url: "/api/deleteSchelduleRule",
    method: "post",
    data,
  });
}
//4.修改任务规则
export function updateScheduleRulel(data) {
  return request({
    url: "/api/updateSchelduleRule",
    method: "post",
    data,
  });
}
//5.获取所有通道
export function getScheduleRulelAccessList(data) {
  return request({
    url: "/api/getChannelTreeList",
    method: "post",
    data,
  });
}
//6.设置时间表通道
export function setScheduleRulel(data) {
  return request({
    url: "/api/relateSchelduleRule",
    method: "post",
    data,
  });
}
//7.查询设备时间表
export function getSchedulenr(data) {
  return request({
    url: "/api/getChannelSchelduleRule",
    method: "post",
    data,
  });
}

//通道管理
//1.获取通道列表
export function getChannelListapi(data) {
  return request({
    url: "/api/getChannelList",
    method: "post",
    data,
  });
}
//2.新增通道
export function addChannelapi(data) {
  return request({
    url: "/api/addChannelList",
    method: "post",
    data,
  });
}
//3.删除通道
export function deleteChannelapi(data) {
  return request({
    url: "/api/deleteChannelList",
    method: "post",
    data,
  });
}
//4.修改通道
export function updateChannelapi(data) {
  return request({
    url: "/api/updateChannelList",
    method: "post",
    data,
  });
}

//线路信息管理接口数据
//获取电压等级列表
export function getdyListJoggle(data) {
  return request({
    url: "/api/getdyList",
    method: "post",
    data,
  });
}
//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 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 resetTerminalApi(data) {
  return request({
    url: "/api/resetTerminal",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}

//图像采集参数
//图像采集装置设置 列表
export function getImageResolutionListJoggle(data) {
  return request({
    url: "/api/getImageResolutionList",
    method: "post",
    data,
  });
}
//图像参数查询--触发
export function getPhotoParamApi(data) {
  return request({
    url: "/api/getPhotoQueryParamList",
    method: "post",
    data,
  });
}
//图像参数查询
export function getPhotoParamnrApi(data) {
  return request({
    url: "/api/photoQueryParamGet",
    method: "post",
    data,
  });
}
//图像参数设置
export function setPhotoParamApi(data) {
  return request({
    url: "/api/updatePhotoParam",
    method: "post",
    data,
  });
}
//图像参数--获取图像分辨率
export function getResolutionRatio(data) {
  return request({
    url: "/api/getResolutionList",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}

//视频采集参数
//参数查询--触发
export function getVideoParamApi(data) {
  return request({
    url: "/api/videoParamGet",
    method: "post",
    data,
  });
}
//参数查询
export function getVideoParamnrApi(data) {
  return request({
    url: "/api/selectVideoParam",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
//参数设置
export function setVideoParamApi(data) {
  return request({
    url: "/api/updateVideoParam",
    method: "post",
    data,
  });
}

//设置图像参数 setImageParams

//查询图像分辨率 getImageParams

//获取GPS位置触发
export function getTermGPSPosition(data) {
  return request({
    url: "/api/getTermGPSPosition",
    method: "post",
    data,
  });
}
// 获取GPS位置

export function getTermGPSJoggle(data) {
  return request({
    url: "/api/getTermGPS",
    method: "post",
    data,
  });
}
//setTermGPS 开启关闭gps
export function setTermGPSJoggle(data) {
  return request({
    url: "/api/setTermGPS",
    method: "post",
    data,
  });
}

//手动拍照
export function getLatestPhotoJoggle(data) {
  return request({
    url: "/api/getLatestPhoto",
    method: "post",
    data,
  });
}

//获取所有通道列表

export function getAllChannelListJoggle(data) {
  return request({
    url: "/api/getAllChannelList",
    method: "post",
    data,
  });
}

//获取所有杆塔列表

export function getAllTowerJoggle(data) {
  return request({
    url: "/api/getAllTower",
    method: "post",
    data,
  });
}

//手动拍照获取最新图片
export function getReturnedPhotoJoggle(data) {
  return request({
    url: "/api/getReturnedPhoto",
    method: "post",
    data,
  });
}

//获取装置信息

export function getTerminalInfoJoggle(data) {
  return request({
    url: "/api/getTerminalInfo",
    method: "post",
    data,
  });
}

//根据通道编号获取设备列表
export function getTermListByChannelJoggle(data) {
  return request({
    url: "/api/getTermListByChannel ",
    method: "post",
    data,
  });
}

//下发时间表设置
export function getPhotoTimeJoggle(data) {
  return request({
    url: "/api/getPhotoTime",
    method: "post",
    data,
  });
}
//拍照时间表查询触发
export function selectPhotoTimeGetJoggle(data) {
  return request({
    url: "/api/selectPhotoTimeGet",
    method: "post",
    data,
  });
}
//拍照时间表查询
export function selectPhotoTimeJoggle(data) {
  return request({
    url: "/api/selectPhotoTime",
    method: "post",
    data,
  });
}

//用户管理
//用户列表查询
export function getUserList(data) {
  return request({
    url: "/api/userList",
    method: "post",
    data,
  });
}
//新增用户
export function addUserApi(data) {
  return request({
    url: "/api/addUser",
    method: "post",
    data,
  });
}
//修改用户
export function updateUserApi(data) {
  return request({
    url: "/api/updateUser",
    method: "post",
    data,
  });
}
//删除用户
export function delUserApi(data) {
  return request({
    url: "/api/deleteUser",
    method: "post",
    data,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
  });
}
//获取设备接口

export function getCoordinate(data) {
  return request({
    url: "/api/getCoordinate",
    method: "post",
    data,
  });
}
//绘制坐标保存

export function updateCoordinate(data) {
  return request({
    url: "/api/updateCoordinate",
    method: "post",
    data,
  });
}

//根据requestid查询时间表下发状态
export function getCmaSchelduleUpload(data) {
  return request({
    url: "/api/getCmaSchelduleUpload",
    method: "post",
    data,
  });
}
//通过Cma获取装置的实际拍照时间调用

export function cmaSchelduleDetials(data) {
  return request({
    url: "/api/cmaSchelduleDetials",
    method: "post",
    data,
  });
}
//获取Cma调用实际拍照时间的结果
export function getCmaSchelduleDetials(data) {
  return request({
    url: "/api/getCmaSchelduleDetials",
    method: "post",
    data,
  });
}

//查询apk列表
export function listApk(data) {
  return request({
    url: "/api/listApk",
    method: "post",
    data,
  });
}

//上传apk
export function uploadApk(data) {
  return request({
    url: "/api/uploadApk",
    method: "post",
    data,
  });
}

//下发apk
export function issueApk(data) {
  return request({
    url: "/api/issueApk",
    method: "post",
    data,
  });
}
