import request from '@/utils/request'

// 创建维修项目
export function createRepairProject(data) {
  return request({
    url: '/repair/project/create',
    method: 'post',
    data: data
  })
}

// 更新维修项目
export function updateRepairProject(data) {
  return request({
    url: '/repair/project/update',
    method: 'put',
    data: data
  })
}

// 删除维修项目
export function deleteRepairProject(id) {
  return request({
    url: '/repair/project/delete?id=' + id,
    method: 'delete'
  })
}

// 获得维修项目
export function getRepairProject(id) {
  return request({
    url: '/repair/project/get?id=' + id,
    method: 'get'
  })
}

// 获得维修项目分页
export function getRepairProjectPage(params) {
  return request({
    url: '/repair/project/page',
    method: 'get',
    params
  })
}
// 导出维修项目 Excel
export function exportRepairProjectExcel(params) {
  return request({
    url: '/repair/project/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
