Terminado con la solución del error
This commit is contained in:
+10
-7
@@ -330,6 +330,7 @@ export default {
|
||||
return JSON.parse(window.localStorage.isAdmin);
|
||||
},
|
||||
onDescarga(datos){
|
||||
var miDato;
|
||||
const fecha = new Date();
|
||||
const anyo = fecha.getFullYear();
|
||||
const mes = fecha.getMonth();
|
||||
@@ -362,25 +363,27 @@ export default {
|
||||
console.log("Descargar " + nomArch);
|
||||
if (this.pcView){
|
||||
for (let i = 0, j = 0; i < datos.length; i++){
|
||||
if (this.seleccionado == "0" || this.seleccionado == datos[i].activoFijo){
|
||||
if (this.seleccionado == "Todos" || this.seleccionado == datos[i].activoFijo){
|
||||
this.datosmios[j++] = datos[i];
|
||||
}
|
||||
}
|
||||
var miDato = MiXLSX.utils.json_to_sheet([],{ header : this.pcHeads});
|
||||
nomArch = "Computadoras" + nomArch;
|
||||
miDato = MiXLSX.utils.json_to_sheet([],{ header : this.pcHeads});
|
||||
} else {
|
||||
for (let i = 0, j = 0; i < datos.length; i++){
|
||||
if (this.seleccionado == "0" || this.seleccionado == datos[i].tipo){
|
||||
if (this.seleccionado == "Todos" || this.seleccionado == datos[i].tipo){
|
||||
this.datosmios[j++] = datos[i];
|
||||
}
|
||||
}
|
||||
var miDato = MiXLSX.utils.json_to_sheet([],{header : this.printerHeads}); // https://docs.sheetjs.com
|
||||
miDato = MiXLSX.utils.json_to_sheet([],{header : this.printerHeads}); // https://docs.sheetjs.com
|
||||
nomArch = "Impresoras" + nomArch;
|
||||
}
|
||||
MiXLSX.utils.sheet_add_json(miDato,this.datosmios,{
|
||||
skipHeader:true, origin : "A2"});
|
||||
let miDato = MiXLSX.utils.json_to_sheet(datos);
|
||||
const LibroTrabajo = MiXLSX.utils.book_new();
|
||||
MiXLSX.utils.book_append_sheet(LibroTrabajo, miDato, "SalidaFalsa");
|
||||
MiXLSX.writeFile(LibroTrabajo, "SalidaFalsa.xlsx");
|
||||
MiXLSX.utils.book_append_sheet(LibroTrabajo, miDato, this.seleccionado);
|
||||
nomArch += ".xlsx";
|
||||
MiXLSX.writeFile(LibroTrabajo, nomArch);
|
||||
return JSON.parse(localStorage.isAdmin);
|
||||
},
|
||||
previewFile(event) {
|
||||
|
||||
Reference in New Issue
Block a user