import request from '@/utils/request'

// 查询预警策略列表
export function listStrategy(query) {
  return request({
    url: '/warn/strategy/list',
    method: 'get',
    params: query
  })
}

// 查询预警策略详细
export function getStrategy(id) {
  return request({
    url: '/warn/strategy/' + id,
    method: 'get'
  })
}

// 新增预警策略
export function addStrategy(data) {
  return request({
    url: '/warn/strategy',
    method: 'post',
    data: data
  })
}

// 修改预警策略
export function updateStrategy(data) {
  return request({
    url: '/warn/strategy',
    method: 'put',
    data: data
  })
}

// 删除预警策略
export function delStrategy(id) {
  return request({
    url: '/warn/strategy/' + id,
    method: 'delete'
  })
}
