import request from '@/utils/request'

// 查询应急事故柜列表
export function listCabinet(query) {
  return request({
    url: '/emergency/cabinet/list',
    method: 'get',
    params: query
  })
}

// 查询应急事故柜详细
export function getCabinet(id) {
  return request({
    url: '/emergency/cabinet/' + id,
    method: 'get'
  })
}

// 新增应急事故柜
export function addCabinet(data) {
  return request({
    url: '/emergency/cabinet',
    method: 'post',
    data: data
  })
}

// 修改应急事故柜
export function updateCabinet(data) {
  return request({
    url: '/emergency/cabinet',
    method: 'put',
    data: data
  })
}

// 删除应急事故柜
export function delCabinet(id) {
  return request({
    url: '/emergency/cabinet/' + id,
    method: 'delete'
  })
}
