cuestionario validado, alerta de respuestas faltantes, ocultar preguntas, v2 en reportes
This commit is contained in:
@@ -14,6 +14,20 @@
|
||||
</b-select>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Version:">
|
||||
<b-select v-model="version" expanded>
|
||||
<option value="" disabled>Seleccione una version:</option>
|
||||
|
||||
<option value="v1">v1</option>
|
||||
|
||||
<option value="v2">
|
||||
v2
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
|
||||
|
||||
|
||||
<b-field label="Año:">
|
||||
<b-select v-model="selectedYear" expanded>
|
||||
<option value="" disabled>Seleccione un año:</option>
|
||||
@@ -51,6 +65,7 @@ export default {
|
||||
return {
|
||||
selectedCuestionario: '',
|
||||
selectedYear: '',
|
||||
version:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -58,16 +73,24 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/${this.selectedCuestionario}?year=${this.selectedYear}`,
|
||||
this.admin.token
|
||||
`${process.env.api}/${this.selectedCuestionario}`, {
|
||||
params: {
|
||||
year: this.selectedYear,
|
||||
version: this.version,
|
||||
},
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.admin.token}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then((res) => {
|
||||
fileDownload(
|
||||
res.data,
|
||||
`${this.selectedYear}_${this.selectedCuestionario}.csv`
|
||||
`${this.selectedYear}_${this.selectedCuestionario}_${this.version}.csv`
|
||||
)
|
||||
this.selectedYear = ''
|
||||
this.selectedCuestionario = ''
|
||||
this.version = ''
|
||||
this.updateIsLoading(false)
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user