import request from '@/utils/request'

// 创建咨询档案
export function createElectronicConsultation(data) {
  return request({
    url: '/ea/electronic-consultation/create',
    method: 'post',
    data: data
  })
}

// 更新咨询档案
export function updateElectronicConsultation(data) {
  return request({
    url: '/ea/electronic-consultation/update',
    method: 'put',
    data: data
  })
}

// 删除咨询档案
export function deleteElectronicConsultation(id) {
  return request({
    url: '/ea/electronic-consultation/delete?id=' + id,
    method: 'delete'
  })
}

// 获得咨询档案
export function getElectronicConsultation(id) {
  return request({
    url: '/ea/electronic-consultation/get?id=' + id,
    method: 'get'
  })
}

// 获得咨询档案分页
export function getElectronicConsultationPage(query) {
  return request({
    url: '/ea/electronic-consultation/page',
    method: 'get',
    params: query
  })
}

// 导出咨询档案 Excel
export function exportElectronicConsultationExcel(query) {
  return request({
    url: '/ea/electronic-consultation/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
