import request from '@/utils/request'

// 创建ETM 测量仪器
export function createMeasuringApparatus(data) {
  return request({
    url: '/etm/measuring-apparatus/create',
    method: 'post',
    data: data
  })
}

// 更新ETM 测量仪器
export function updateMeasuringApparatus(data) {
  return request({
    url: '/etm/measuring-apparatus/update',
    method: 'put',
    data: data
  })
}

// 删除ETM 测量仪器
export function deleteMeasuringApparatus(id) {
  return request({
    url: '/etm/measuring-apparatus/delete?id=' + id,
    method: 'delete'
  })
}

// 获得ETM 测量仪器
export function getMeasuringApparatus(id) {
  return request({
    url: '/etm/measuring-apparatus/get?id=' + id,
    method: 'get'
  })
}

// 获得ETM 测量仪器分页
export function getMeasuringApparatusPage(query) {
  return request({
    url: '/etm/measuring-apparatus/page',
    method: 'get',
    params: query
  })
}

// 导出ETM 测量仪器 Excel
export function exportMeasuringApparatusExcel(query) {
  return request({
    url: '/etm/measuring-apparatus/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
