import request from '@/utils/request';

//查询变电站辅控设备联动方案设置
export function listDeviceLinkagePlan(params:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/listDeviceLinkagePlan' ,
    method: 'post',
    params:params
  });
}
//新增变电站辅控设备联动方案设置
export function addDeviceLinkagePlan(data:any){
    return request({
      url: '/monitorConfig/DeviceLinkage/addDeviceLinkagePlan' ,
      method: 'post',
      data
    });
  }
  //修改变电站辅控设备联动方案设置
  export function updateDeviceLinkagePlan(data:any){
    return request({
      url: '/monitorConfig/DeviceLinkage/updateDeviceLinkagePlan' ,
      method: 'post',
      data
  });
}
//根据ID删除变电站辅控设备
export function deleteDeviceLinkagePlanById(params:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/deleteDeviceLinkagePlanById' ,
    method: 'post',
    params:params
  });
}


//查询所有变电站辅控设备联动方案设置（联动操作列表）
export function listDeviceLinkageOperate(params:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/listDeviceLinkageOperate' ,
    method: 'post',
    params:params
  });
}


//新增变电站辅控设备联动方案设置--联动操作列表
export function addDeviceLinkageOperate(data:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/addDeviceLinkageOperate' ,
    method: 'post',
    data
  });
}
//修改变电站辅控设备联动方案设置--联动操作列表
export function updateDeviceLinkageOperate(data:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/updateDeviceLinkageOperate' ,
    method: 'post',
    data
});
}
//删除变电站辅控设备联动方案设置--联动操作列表
export function deleteDeviceLinkageOperate(params:any){
return request({
  url: '/monitorConfig/DeviceLinkage/deleteDeviceLinkageOperate' ,
  method: 'post',
  params:params
});
}
//修改变电站辅控设备联动方案设置--联动顺序号
export function updateOrderno(params:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/updateOrderno' ,
    method: 'post',
    params:params
  });
}

//根据所属系统查询配置了联动任务的设备信号（运行监控）
export function listDeviceIdBySystemcode(params:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/listSignalIdBySystemcode' ,
    method: 'post',
    params:params
  });
}
//根据设备信号查询所有的联动任务（运行监控）
export function listDeviceLinkageBySignalId(params:any){
  return request({
    url: '/monitorConfig/DeviceLinkage/listDeviceLinkageBySignalId' ,
    method: 'post',
    params:params
  });
}



//根据设备信号查询所有的联动任务（运行监控）
export function sendTestData(params:any){
  return request({
    url: '/test/data/'+ params.name,
    method: 'get',
    params:params
  });
}

//关闭WebSocket
export function closeWebSocket(params:any){
  return request({
    url: '/test/data/closeWebSocket',
    method: 'post',
    params:params
  });
}
