aparentemente todo listo
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h3 class="label">
|
||||
Cuestionario de evaluación del programa de servicio social
|
||||
Cuestionario de evaluación del programa de servicio social.
|
||||
</h3>
|
||||
|
||||
<b-field class="mb-6" v-if="!servicio.idCuestionarioAlumno">
|
||||
@@ -15,15 +15,18 @@
|
||||
</b-button>
|
||||
</b-field>
|
||||
|
||||
<div v-else>
|
||||
<p class="block is-size-5">
|
||||
<div class="mb-6" v-else>
|
||||
<p class="block is-size-6">
|
||||
Cuestionario contestado
|
||||
<b-icon type="is-success" icon="check-bold" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h3 class="label">
|
||||
Informe global de actividades (en formato .PDF. No se aceptan fotos).
|
||||
Informe global de actividades
|
||||
<span v-if="!servicio.informeGlobal"
|
||||
>(en formato .PDF. No se aceptan fotos)</span
|
||||
>.
|
||||
</h3>
|
||||
|
||||
<div v-if="!servicio.informeGlobal">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
:imprimirWarning="imprimirWarning"
|
||||
:obtenerServicio="obtenerServicio"
|
||||
:updateIsLoading="updateIsLoading"
|
||||
v-if="servicio.Status.idStatus === 4 || servicio.Status.idStatus === 9"
|
||||
v-if="servicio.Status.idStatus >= 4"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading" />
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
path="carta_aceptacion"
|
||||
tipoCarta="aceptación"
|
||||
variableName="cartaAceptacion"
|
||||
:idServicio="idServicio"
|
||||
:responsable="responsable"
|
||||
:imprimirMensaje="imprimirMensaje"
|
||||
:imprimirWarning="imprimirWarning"
|
||||
@@ -21,6 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BotonRegresar from '@/components/botonRegresar'
|
||||
import UploadArchivo from '@/components/responsable/UploadArchivo'
|
||||
|
||||
@@ -29,6 +31,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
idServicio: null,
|
||||
responsable: {},
|
||||
}
|
||||
},
|
||||
@@ -36,6 +39,21 @@ export default {
|
||||
updateIsLoading(booleanValue) {
|
||||
this.isLoading = booleanValue
|
||||
},
|
||||
obtenerRegistro() {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/servicio/admin?idServicio=${this.idServicio}`,
|
||||
this.responsable.token
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
if (res.data.Status.idStatus != 7) this.$router.push('/responsable')
|
||||
})
|
||||
.catch((err) => {
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
@@ -96,17 +114,18 @@ export default {
|
||||
localStorage.getItem('idTipoUsuario')
|
||||
)
|
||||
this.responsable.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
// this.responsable.token = {
|
||||
// headers: {
|
||||
// token: localStorage.getItem('token'),
|
||||
// },
|
||||
// }
|
||||
this.responsable.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
this.responsable.tokenArchivo = {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
this.idServicio = Number(localStorage.getItem('idServicio'))
|
||||
},
|
||||
},
|
||||
created() {
|
||||
@@ -114,6 +133,8 @@ export default {
|
||||
if (this.responsable.idTipoUsuario === 1) this.$router.push('/admin')
|
||||
if (this.responsable.idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (this.responsable.idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
if (!this.idServicio) this.$router.push('/responsable')
|
||||
else this.obtenerRegistro()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -39,6 +39,22 @@ export default {
|
||||
updateIsLoading(booleanValue) {
|
||||
this.isLoading = booleanValue
|
||||
},
|
||||
obtenerRegistro() {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/servicio/admin?idServicio=${this.idServicio}`,
|
||||
this.responsable.token
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
if (res.data.Status.idStatus != 4 && res.data.Status.idStatus != 8)
|
||||
this.$router.push('/responsable')
|
||||
})
|
||||
.catch((err) => {
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
@@ -57,21 +73,6 @@ export default {
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
obtenerRegistro() {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/servicio/admin?idServicio=${this.idServicio}`,
|
||||
this.responsable.token
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
if (res.data.Status.idStatus != 4) this.$router.push('/responsable')
|
||||
})
|
||||
.catch((err) => {
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
|
||||
Reference in New Issue
Block a user