import request from '@/utils/request'

// 查询耳塞分配器列表
export function listEarplug(query) {
  return request({
    url: '/dev/earplug/list',
    method: 'get',
    params: query
  })
}

// 查询耳塞分配器详细
export function getEarplug(id) {
  return request({
    url: '/dev/earplug/' + id,
    method: 'get'
  })
}

// 新增耳塞分配器
export function addEarplug(data) {
  return request({
    url: '/dev/earplug',
    method: 'post',
    data: data
  })
}

// 修改耳塞分配器
export function updateEarplug(data) {
  return request({
    url: '/dev/earplug',
    method: 'put',
    data: data
  })
}

// 删除耳塞分配器
export function delEarplug(id) {
  return request({
    url: '/dev/earplug/' + id,
    method: 'delete'
  })
}
