| | |
| | | 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 { |