import request from '@/utils/request';

//获取算法模型列表
export function getAlarmLogPage(params:any){
  return request({
    url: '/basedata/algorithmmodel/getAlgorithmModelPage' ,
    method: 'get',
    params:params
  });
}
//新增和修改算法模型
export function addOrUpdateAlgorithmModel(params:any){
    return request({
      url: '/basedata/algorithmmodel/addOrUpdateAlgorithmModel' ,
      method: 'post',
      data:params
    });
  }
//从算法平台下载模型
export function downloadAlgorithmModel(params:any){
    return request({
      url: '/basedata/algorithmmodel/downloadAlgorithmModel' ,
      method: 'post',
      data:params,
    });
  }
  //将当前版本模型更新到智能分析主机
export function pushAlgorithmModelToAnalysisHost(params:any){
    return request({
      url: '/basedata/algorithmmodel/pushAlgorithmModelToAnalysisHost?ModelId='+ params.ModelId,
      method: 'post',
      data:params
    });
  }
  //上传文件
  export function uploadModelFile(params:any){
    return request({
      url: '/basedata/algorithmmodel/uploadModelFile' ,
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      method: 'post',
      data:params
    });
  }
    //删除文件
    export function deleteModelFile(params:any){
      return request({
        url: '/basedata/algorithmmodel/deleteModelFile' ,
        method: 'post',
        params:params
      });
    }

      //获取当前该区域某站点的运行算法参数
export function getRecogParams(params:any){
  return request({
    url: '/basedata/algorithmmodel/getRecogParams' ,
    method: 'post',
    data:params
  });
}