|
|
@ -298,7 +298,13 @@ export const CuentasComplementarias: FC<IProps> = (props) => { |
|
|
|
MFileManagerDataService.getFileContentById(id, proceso) |
|
|
|
MFileManagerDataService.getFileContentById(id, proceso) |
|
|
|
.then((response: any) => { |
|
|
|
.then((response: any) => { |
|
|
|
if (response.status === 200) { |
|
|
|
if (response.status === 200) { |
|
|
|
if (archivo.toLowerCase().endsWith('.pdf')) { |
|
|
|
const url = window.URL.createObjectURL(new Blob([response.data])) |
|
|
|
|
|
|
|
const link = document.createElement('a') |
|
|
|
|
|
|
|
link.href = url |
|
|
|
|
|
|
|
link.setAttribute('download', archivo) |
|
|
|
|
|
|
|
document.body.appendChild(link) |
|
|
|
|
|
|
|
link.click() |
|
|
|
|
|
|
|
/* if (archivo.toLowerCase().endsWith('.pdf')) { |
|
|
|
console.log(response.data) |
|
|
|
console.log(response.data) |
|
|
|
const blob = new Blob([response.data], { type: 'application/pdf' }) |
|
|
|
const blob = new Blob([response.data], { type: 'application/pdf' }) |
|
|
|
const url = window.URL.createObjectURL(blob) |
|
|
|
const url = window.URL.createObjectURL(blob) |
|
|
@ -308,7 +314,14 @@ export const CuentasComplementarias: FC<IProps> = (props) => { |
|
|
|
const blob = new Blob([response.data], { type: 'application/xml' }) |
|
|
|
const blob = new Blob([response.data], { type: 'application/xml' }) |
|
|
|
const url = window.URL.createObjectURL(blob) |
|
|
|
const url = window.URL.createObjectURL(blob) |
|
|
|
window.open(url) |
|
|
|
window.open(url) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const url = window.URL.createObjectURL(new Blob([response.data])) |
|
|
|
|
|
|
|
const link = document.createElement('a') |
|
|
|
|
|
|
|
link.href = url |
|
|
|
|
|
|
|
link.setAttribute('download', archivo) |
|
|
|
|
|
|
|
document.body.appendChild(link) |
|
|
|
|
|
|
|
link.click() |
|
|
|
|
|
|
|
} */ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setHeader('Error') |
|
|
|
setHeader('Error') |
|
|
|
setMsg('No existe ningun archivo asignado') |
|
|
|
setMsg('No existe ningun archivo asignado') |
|
|
|