import request from '@/utils/request'

// 创建档案鉴定
export function createAuthenticate(data) {
  return request({
    url: '/archives/authenticate/create',
    method: 'post',
    data: data
  })
}

// 更新档案鉴定
export function updateAuthenticate(data) {
  return request({
    url: '/archives/authenticate/update',
    method: 'put',
    data: data
  })
}

// 删除档案鉴定
export function deleteAuthenticate(id) {
  return request({
    url: '/archives/authenticate/delete?id=' + id,
    method: 'delete'
  })
}

// 获得档案鉴定
export function getAuthenticate(id) {
  return request({
    url: '/archives/authenticate/get?id=' + id,
    method: 'get'
  })
}

// 获得档案鉴定分页
export function getAuthenticatePage(query) {
  return request({
    url: '/archives/authenticate/page',
    method: 'get',
    params: query
  })
}

// 获得档案鉴定列表
export function getAuthenticateList(query) {
    return request({
      url: '/archives/authenticate/get/record',
      method: 'get',
      params: query
    })
  }
  

// 导出档案鉴定 Excel
export function exportAuthenticateExcel(query) {
  return request({
    url: '/archives/authenticate/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 新增鉴定申请
export function createAuthenticateApply(data) {
  return request({
    url: '/archives/authenticate/create/apply',
    method: 'post',
    data: data
  })
}
