import request from '@/utils/request'

// 创建四性检测维护
export function createDetection(data) {
  return request({
    url: '/setting/detection/create',
    method: 'post',
    data: data
  })
}

// 更新四性检测维护
export function updateDetection(data) {
  return request({
    url: '/setting/detection/update',
    method: 'put',
    data: data
  })
}

// 删除四性检测维护
export function deleteDetection(id) {
  return request({
    url: '/setting/detection/delete?id=' + id,
    method: 'delete'
  })
}

// 获得四性检测维护
export function getDetection(id) {
  return request({
    url: '/setting/detection/get?id=' + id,
    method: 'get'
  })
}

// 获得四性检测维护分页
export function getDetectionPage(query) {
  return request({
    url: '/setting/detection/page',
    method: 'get',
    params: query
  })
}

// 导出四性检测维护 Excel
export function exportDetectionExcel(query) {
  return request({
    url: '/setting/detection/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
