import request from '@/utils/request';
//获取表格数据
export function getdata(params: any) {
    return request({
        url: '/basedata/linkage-signal/getLinkageSignalPage',
        method: 'get',
        params: params
    });
}

//新增联动信号
export function addPosition(params: any) {
    return request({
        url: '/basedata/linkage-signal/addLinkageSignal',
        method: 'post',
        data: params
    });
}
//修改联动信号
export function editPosition(params: any) {
    return request({
        url: '/basedata/linkage-signal/updateLinkageSignal',
        method: 'post',
        data: params
    });
}
//删除
export function delPosition(params: any) {
    return request({
        url: '/basedata/linkage-signal/deleteLinkageSignal',
        method: 'post',
        params: params
    });
}
//绑定巡视点位
export function TourPosition(params: any) {
    return request({
        url: '/basedata/linkage-signal/bindSubstationDevice',
        method: 'post',
        data: params
    });
}
//查询绑定的巡视信息
export function changeTour(params: any) {
    return request({
        url: '/basedata/linkage-signal/getSubstationDeviceListById',
        method: 'get',
        params: params
    });
}

//删除绑定的巡视点位
export function DelTour(params: any) {
    return request({
        url: '/basedata/linkage-signal/deleteBindSubstationDevice',
        method: 'post',
        params: params
    });
}


//巡视点位
//获取变电站信息
export function getTreelist(params: any) {
    return request({
        url: '/basedata/substation/getSubstationNaviTree',
        method: 'get',
        params: params
    });
}
//获取table表格

//巡视设备
//获取变电站信息
export function getTreeList(params:any){
  return request({
    url: '/basedata/substation/getSubstationAreaTree' ,
    method: 'get',
    params:params
  });
}
//获取table表格
export function getlistdata(params:any){
  return request({
    url: '/basedata/substation-patroldevice/getPatrolCameraList' ,
    method: 'get',
    params:params
  });
}
//发送文件
//上串文件
export function addFile (data:any){
    return request({
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      url: '/basedata/linkage-signal/receiveFile' ,
      method: 'post',
      data
    });
  }
  //发送UDP数据
  export function linkageSignal(){
    return request({
      url: '/basedata/linkage-signal/sendFile' ,
      method: 'get',
    });
  }
    //改变任务状态
    export function setLinkageSignalById(params:any){
      return request({
        url: '/basedata/linkage-signal/setLinkageSignalStatus' ,
        method: 'post',
        data:params
      });
    }