sinake
2026-06-22 b6d3aeac5729abd70e46cf5999163356f7f8add0
src/views/ecg/doctor/components/RoutinePanel.vue
@@ -269,14 +269,37 @@
  formRef.value?.resetFields()
}
const yddownload = async () => {
  const response = await DoctorApi.yddownload(props.setappointmentId)
  console.log(response, 'xml1')
  console.log(response.fileContent, 'xml2')
  downloadWordFile(response.fileContent, response.fileName)
  // 检查 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 () => {
  const response = await DoctorApi.sgdownload(props.setappointmentId)
  downloadWordFile(response.fileContent, response.fileName)
  // 检查 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 {