prueba2
This commit is contained in:
+72
-67
@@ -9,37 +9,37 @@
|
||||
v-model="activeStep"
|
||||
>
|
||||
<b-step-item
|
||||
:visible="activeStep < 6"
|
||||
:visible="activeStep < 6"
|
||||
:clickable="false"
|
||||
label="Pre Registro"
|
||||
icon="account-plus"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:visible="activeStep < 6"
|
||||
:visible="activeStep < 6"
|
||||
:clickable="false"
|
||||
label="Pre Registro Validado"
|
||||
icon="account-clock"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:visible="activeStep < 6"
|
||||
:visible="activeStep < 6"
|
||||
:clickable="false"
|
||||
label="Registro"
|
||||
icon="account"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:visible="activeStep < 6"
|
||||
:visible="activeStep < 6"
|
||||
:clickable="false"
|
||||
label="Pre Termino"
|
||||
icon="account-details"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:visible="activeStep < 6"
|
||||
:visible="activeStep < 6"
|
||||
:clickable="false"
|
||||
label="Termino"
|
||||
icon="account-clock"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:visible="activeStep < 6"
|
||||
:visible="activeStep < 6"
|
||||
:clickable="false"
|
||||
label="Liberacion"
|
||||
icon="account-check"
|
||||
@@ -51,7 +51,7 @@
|
||||
label="Carta Aceptación Rechazada"
|
||||
class="bad"
|
||||
icon="file"
|
||||
type= "is-danger"
|
||||
type="is-danger"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:clickable="false"
|
||||
@@ -59,7 +59,7 @@
|
||||
label="Carta Termino Rechazada"
|
||||
icon="file"
|
||||
class="bad"
|
||||
type= "is-danger "
|
||||
type="is-danger "
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:clickable="false"
|
||||
@@ -67,7 +67,7 @@
|
||||
label="Informe Global Rechazado"
|
||||
icon="file"
|
||||
class="bad"
|
||||
type= "is-danger"
|
||||
type="is-danger"
|
||||
></b-step-item>
|
||||
<b-step-item
|
||||
:clickable="false"
|
||||
@@ -75,7 +75,7 @@
|
||||
label="Cancelado"
|
||||
icon="account-cancel"
|
||||
class="bad"
|
||||
type= "is-danger bad"
|
||||
type="is-danger bad"
|
||||
></b-step-item>
|
||||
</b-steps>
|
||||
</div>
|
||||
@@ -253,8 +253,8 @@
|
||||
</div>
|
||||
|
||||
<div class="container px-3"></div>
|
||||
<pre>{{$data}}</pre>
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<pre>{{ $data }}</pre>
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -267,12 +267,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
token: {
|
||||
headers:{
|
||||
token: window.localStorage.getItem('token')
|
||||
}
|
||||
headers: {
|
||||
token: window.localStorage.getItem("token"),
|
||||
},
|
||||
},
|
||||
activeStep: "",
|
||||
status:'',
|
||||
status: "",
|
||||
isLoading: false,
|
||||
file: [],
|
||||
nacimiento: [],
|
||||
@@ -328,12 +328,14 @@ export default {
|
||||
},
|
||||
{ status: 7, mensaje: "carta de aceptacion rechazada" },
|
||||
{ status: 8, mensaje: "carta de termino rechazada" },
|
||||
{ status: 9, mensaje:
|
||||
"Informe global de actividades rechazado. Por favor reenvia el informe correctamente",
|
||||
},
|
||||
{
|
||||
status: 9,
|
||||
mensaje:
|
||||
"Informe global de actividades rechazado. Por favor reenvia el informe correctamente",
|
||||
},
|
||||
{
|
||||
status: 10,
|
||||
mensaje: "servicio cancelado"
|
||||
mensaje: "servicio cancelado",
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -345,26 +347,26 @@ export default {
|
||||
this.telefono = "";
|
||||
this.direccion = "";
|
||||
},
|
||||
error(msj){
|
||||
let salir =false;
|
||||
switch(msj){
|
||||
case 'invalid signature':
|
||||
msj= "tu token no es valido, inicia sesión de nuevo"
|
||||
salir=true
|
||||
break;
|
||||
case 'jwt expired':
|
||||
msj= "tu sesión ha expirado, inicia sesión de nuevo"
|
||||
salir=true
|
||||
break;
|
||||
case 'jwt malformed':
|
||||
msj= "tu token esta mal formado, inicia sesión de nuevo"
|
||||
salir=true
|
||||
break;
|
||||
case 'No hay token':
|
||||
msj= "no has enviado tu token, inicia sesión de nuevo"
|
||||
salir=true
|
||||
break;
|
||||
}
|
||||
error(msj) {
|
||||
let salir = false;
|
||||
switch (msj) {
|
||||
case "invalid signature":
|
||||
msj = "tu token no es valido, inicia sesión de nuevo";
|
||||
salir = true;
|
||||
break;
|
||||
case "jwt expired":
|
||||
msj = "tu sesión ha expirado, inicia sesión de nuevo";
|
||||
salir = true;
|
||||
break;
|
||||
case "jwt malformed":
|
||||
msj = "tu token esta mal formado, inicia sesión de nuevo";
|
||||
salir = true;
|
||||
break;
|
||||
case "No hay token":
|
||||
msj = "no has enviado tu token, inicia sesión de nuevo";
|
||||
salir = true;
|
||||
break;
|
||||
}
|
||||
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
@@ -375,20 +377,24 @@ export default {
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
if (salir == true) {
|
||||
localStorage.clear()
|
||||
this.$router.push(`/`)
|
||||
}
|
||||
|
||||
});
|
||||
if (salir == true) {
|
||||
localStorage.clear();
|
||||
this.$router.push(`/`);
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
axios
|
||||
.get(`${process.env.api}/servicio/alumno?idUsuario=${localStorage.getItem("idUsuario")}`, this.token)
|
||||
.get(
|
||||
`${process.env.api}/servicio/alumno?idUsuario=${localStorage.getItem(
|
||||
"idUsuario"
|
||||
)}`,
|
||||
this.token
|
||||
)
|
||||
.then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.activeStep = resp.data.Status.idStatus +5;
|
||||
this.status = resp.data.Status.idStatus ;
|
||||
this.activeStep = resp.data.Status.idStatus - 1;
|
||||
this.status = resp.data.Status.idStatus;
|
||||
|
||||
this.programa.programa = resp.data.Programa.programa;
|
||||
this.programa.dependencia = resp.data.Programa.dependencia;
|
||||
@@ -414,15 +420,18 @@ export default {
|
||||
this.alumno.nombre = localStorage.getItem("nombre");
|
||||
this.alumno.cuenta = localStorage.getItem("usuario");
|
||||
|
||||
window.localStorage.setItem("idCuestionarioAlumno",resp.data.idCuestionarioAlumno);
|
||||
window.localStorage.setItem(
|
||||
"idCuestionarioAlumno",
|
||||
resp.data.idCuestionarioAlumno
|
||||
);
|
||||
window.localStorage.setItem("idServicio", resp.data.idServicio);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.error(error.response.data.message)
|
||||
this.error(error.response.data.message);
|
||||
});
|
||||
},
|
||||
enviarRegistro() {
|
||||
this.isLoading=true
|
||||
this.isLoading = true;
|
||||
const data = {
|
||||
idServicio: this.alumno.idServicio,
|
||||
direccion: this.direccion,
|
||||
@@ -433,7 +442,6 @@ export default {
|
||||
axios
|
||||
.put(`${process.env.api}/servicio/registro_validado`, data, this.token)
|
||||
.then((res) => {
|
||||
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Success",
|
||||
message: "Se enviaron los datos correctamente",
|
||||
@@ -449,14 +457,14 @@ export default {
|
||||
this.getData();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.error(error.response.data.message)
|
||||
})
|
||||
.finally(()=>{
|
||||
this.isLoading=false
|
||||
this.error(error.response.data.message);
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false;
|
||||
});
|
||||
},
|
||||
enviarInforme() {
|
||||
this.isLoading = true
|
||||
this.isLoading = true;
|
||||
const data = {
|
||||
idServicio: this.alumno.idServicio,
|
||||
};
|
||||
@@ -469,11 +477,10 @@ export default {
|
||||
.put(`${process.env.api}/servicio/informe_global`, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
token: this.token.headers.token
|
||||
token: this.token.headers.token,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Success",
|
||||
message: "Se enviaron los datos correctamente",
|
||||
@@ -489,12 +496,11 @@ export default {
|
||||
this.getData();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.error(error.response.data.message)
|
||||
})
|
||||
.finally(()=>{
|
||||
this.isLoading= false
|
||||
})
|
||||
|
||||
this.error(error.response.data.message);
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false;
|
||||
});
|
||||
},
|
||||
fecha(date) {
|
||||
const fecha = moment(date);
|
||||
@@ -554,5 +560,4 @@ export default {
|
||||
display: flex;
|
||||
align-content: center !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user