diff --git a/pages/admin/cuestionario/index.vue b/pages/admin/cuestionario/index.vue index ab0eb25..3b31da1 100644 --- a/pages/admin/cuestionario/index.vue +++ b/pages/admin/cuestionario/index.vue @@ -47,6 +47,82 @@ disabled >Descargar archivo + +

Descargar reportes

+ +

Seleccione una fecha de inicio:

+ + +

Seleccione una fecha de fin:

+ + + + Crear reporte + Crear reporte + + Descargar reporte + + Descargar reporte +

Gustavo Baz Prada

+

Seleccione un año:

+ + + + Crear Gustavo Baz + Crear Gustavo Baz + + Descargar + + Descargar { + this.link2 = `${process.env.api}/reporte.csv`; + this.reporteListo = true; + }) + .catch((err) => { + this.error(err.response.data.message); + }) + .finally(() => { + this.isLoading = false; + }); + }, + crearGustavoBaz() { + this.isLoading = true; + axios + .get( + `${process.env.api}/servicio/gustavo_bas_prada?year=${this.selectedYearGustavoBaz}`, + this.token + ) + .then((res) => { + this.link3 = `${process.env.api}/${this.selectedYearGustavoBaz}_gustavo_baz_prada.csv`; + this.gustavoListo = true; + }) + .catch((err) => { + this.error(err.response.data.message); + }) + .finally(() => { + this.isLoading = false; + }); + }, error(msj) { let salir = false; switch (msj) { @@ -154,7 +275,7 @@ export default {