import request from '@/utils/request'

// 查询灭火器列表
export function listExtinguisher(query) {
  return request({
    url: '/safety/extinguisher/list',
    method: 'get',
    params: query
  })
}

// 查询灭火器详细
export function getExtinguisher(id) {
  return request({
    url: '/safety/extinguisher/' + id,
    method: 'get'
  })
}

// 新增灭火器
export function addExtinguisher(data) {
  return request({
    url: '/safety/extinguisher',
    method: 'post',
    data: data
  })
}

// 修改灭火器
export function updateExtinguisher(data) {
  return request({
    url: '/safety/extinguisher',
    method: 'put',
    data: data
  })
}

// 删除灭火器
export function delExtinguisher(id) {
  return request({
    url: '/safety/extinguisher/' + id,
    method: 'delete'
  })
}

// 导出灭火器
export function exportExtinguisher(query) {
  return request({
    url: 'safety/extinguisher/export',
    method: 'get',
    params: query
  })
}
