WXL
6 天以前 d0494a1b3ff6cdf48b1237058d99840da245a75e
src/views/ecg/doctor/components/RoutinePanel.vue
@@ -269,14 +269,37 @@
  formRef.value?.resetFields()
}
const yddownload = async () => {
  // 检查 setappointmentId 是否存在
  if (!props.setappointmentId) {
    message.warning('当前无就诊中患者请先叫号')
    return
  }
  yddownloadLoading.value = true
  try {
  const response = await DoctorApi.yddownload(props.setappointmentId)
  console.log(response, 'xml1')
  console.log(response.fileContent, 'xml2')
  downloadWordFile(response.fileContent, response.fileName)
  } finally {
    yddownloadLoading.value = false
}
}
const sgdownload = async () => {
  // 检查 setappointmentId 是否存在
  if (!props.setappointmentId) {
    message.warning('当前无就诊中患者请先叫号')
    return
  }
  sgdownloadLoading.value = true
  try {
  const response = await DoctorApi.sgdownload(props.setappointmentId)
  downloadWordFile(response.fileContent, response.fileName)
  } finally {
    sgdownloadLoading.value = false
  }
}
const downloadWordFile = (data, filename = 'document') => {
  try {