import request from '@/utils/request'

// 查询预警结果列表
export function queryList(query) {
  return request({
    url: '/dk/config/list',
    method: 'get',
    params: query
  })
}

// 查询预警结果详细
export function getOperationWarnresult(id) {
  return request({
    url: '/system/operationWarnresult/' + id,
    method: 'get'
  })
}

// 新增预警结果
export function addConfig(data) {
  return request({
    url: '/dk/config/add',
    method: 'post',
    data: data
  })
}

// 修改预警结果
export function updateConfig(data) {
  return request({
    url: '/dk/config/updateConfig',
    method: 'put',
    data: data
  })
}

// 删除
export function deleteConfig(id) {
  console.log(id)
  return request({
    url: '/dk/config/deleteConfig/' + id,
    method: 'delete'
  })
}
