import request from '@/utils/request'

// 查询事故列表
export function listEvent(query) {
  return request({
    url: '/algorithms/event/list',
    method: 'get',
    params: query
  })
}

// 查询事故详细
export function getEvent(eventId) {
  return request({
    url: '/algorithms/event/' + eventId,
    method: 'get'
  })
}

// 新增事故
export function addEvent(data) {
  return request({
    url: '/algorithms/event',
    method: 'post',
    data: data
  })
}

// 修改事故
export function updateEvent(data) {
  return request({
    url: '/algorithms/event',
    method: 'put',
    data: data
  })
}

// 删除事故
export function delEvent(eventId) {
  return request({
    url: '/algorithms/event/' + eventId,
    method: 'delete'
  })
}
