import request from '@/utils/request'

// 查询危害物质-防护用品列表
export function listProtect(query) {
  return request({
    url: '/configuration/protect/list',
    method: 'get',
    params: query
  })
}

// 查询危害物质-防护用品列表
export function getForType(query) {
  return request({
    url: '/configuration/protect/type',
    method: 'get',
    params: query
  })
}

// 查询危害物质-防护用品详细
export function getProtect(id) {
  return request({
    url: '/configuration/protect/' + id,
    method: 'get'
  })
}

// 新增危害物质-防护用品
export function addProtect(data) {
  return request({
    url: '/configuration/protect',
    method: 'post',
    data: data
  })
}

// 修改危害物质-防护用品
export function updateProtect(data) {
  return request({
    url: '/configuration/protect',
    method: 'put',
    data: data
  })
}

// 删除危害物质-防护用品
export function delProtect(id) {
  return request({
    url: '/configuration/protect/' + id,
    method: 'delete'
  })
}

// 导出危害物质-防护用品
export function exportProtect(query) {
  return request({
    url: '/configuration/protect/export',
    method: 'get',
    params: query
  })
}
