import request from '@/utils/request'

// 查询合格证列表
export function listCertificate(query) {
  return request({
    url: '/base/certificate/list',
    method: 'get',
    params: query
  })
}

// 查询合格证详细
export function getCertificate(id) {
  return request({
    url: '/base/certificate/' + id,
    method: 'get'
  })
}

// 新增合格证
export function addCertificate(data) {
  return request({
    url: '/base/certificate',
    method: 'post',
    data: data
  })
}

// 修改合格证
export function updateCertificate(data) {
  return request({
    url: '/base/certificate',
    method: 'put',
    data: data
  })
}

// 删除合格证
export function delCertificate(id) {
  return request({
    url: '/base/certificate/' + id,
    method: 'delete'
  })
}
