import request from '@/utils/request'

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

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

// 新增灭火器
export function addFireextinguisher(data) {
  return request({
    url: '/ehs/fireextinguisher',
    method: 'post',
    data: data
  })
}

// 修改灭火器
export function updateFireextinguisher(data) {
  return request({
    url: '/ehs/fireextinguisher',
    method: 'put',
    data: data
  })
}

// 删除灭火器
export function delFireextinguisher(id) {
  return request({
    url: '/ehs/fireextinguisher/' + id,
    method: 'delete'
  })
}

// 导出灭火器
export function exportFireextinguisher(query) {
  return request({
    url: '/ehs/fireextinguisher/export',
    method: 'get',
    params: query
  })
}

// 批量修改灭火器
export function batchEdit(data) {
  return request({
    url: '/ehs/fireextinguisher/batchEdit',
    method: 'post',
    data: data
  })
}
