import request from '@/utils/request'

//查询规则引擎列表
export function selectEngineList(data){
  return request({
    url: "/engine/engine/getMaintenanceList",
    method: "post",
    data:data
  })
}

//添加规则数据
export  function insert(data){
  return request({
    url: "/engine/engine/insert",
    method: "post",
    data:data
  })
}

//修改规则数据
export  function update(data){
  return request({
    url: "/engine/engine/update",
    method: "post",
    data:data
  })
}

//通过id删除数据
export  function del(id){
  return request({
    url: "/engine/engine/delete/" + id,
    method: "post",
    data:id
  })
}

//开启
export  function onEngine(id){
  return request({
    url: "/engine/version/open/" + id,
    method: "post"
  })
}

//禁用
export  function forbiddenEngine(id){
  return request({
    url: "/engine/version/close/" + id,
    method: "post"
  })
}

//查看等级列表信息
export  function selectLevel(){
  return request({
    url: "/engine/level/selectLevelList",
    method: "post"
  })
}

// 查询规则引擎版本列表
export function getRuleEngineInfo(id) {
  return request({
    url: '/engine/engine/getRuleEngineInfo/' + id,
    method: 'put'
  })
}

// 通过id查询
export function findById(id) {
  return request({
    url: '/engine/engine/findByIdsfindByIds/' + id,
    method:'get'
  })
}

//通过id删除数据
export function dels(id) {
  return request({
    url: '/engine/version/delete/' + id,
    method: 'post',
    data: id
  })
}



//添加规则数据
export  function add(data){
  return request({
    url: "/engine/version/insertVersion",
    method: "post",
    data:data
  })
}




export  function selectEngineById(id){
  return request({
    url: "/engine/engine/selectEngineById/" + id,
    method: "post",
    data:id
  })
}

//根据版本id查询版本信息
export  function sel(id){
  return request({
    url: "/engine/version/selectListById/" + id,
    method: "post"
  })
}





//根据版本id查询版本信息
export  function generate(data){
  return request({
    url: "/engine/engine/generate",
    method: "post",
    data:data
  })
}




