error merge
This commit is contained in:
+175
-166
@@ -72,10 +72,9 @@
|
||||
<p><strong> Número de cuenta: </strong> {{ alumno.cuenta }}</p>
|
||||
<p><strong> Carrera: </strong> {{ alumno.carrera }}</p>
|
||||
<p>
|
||||
<strong> Créditos: </strong> {{ alumno.creditos[1]
|
||||
}}{{ alumno.creditos[2] }}<span v-if="alumno.creditos">%</span>
|
||||
<strong> Créditos: </strong>{{ alumno.creditos}} <span v-if="alumno.creditos">%</span>
|
||||
</p>
|
||||
<p><strong> Correo: </strong> {{ alumno.correo }}</p>
|
||||
<p><strong> Correo del alumno: </strong> {{ alumno.correo }}</p>
|
||||
<p><strong> Fecha de inicio: </strong> {{ fecha(alumno.inicio) }}</p>
|
||||
<p>
|
||||
<strong> Fecha de finalización: </strong> {{ fecha(alumno.fin) }}
|
||||
@@ -88,7 +87,7 @@
|
||||
<p><strong> Direccion: </strong> {{ alumno.direccion }}</p>
|
||||
<p><strong> Telefono: </strong> {{ alumno.telefono }}</p>
|
||||
<p>
|
||||
<strong> Fecha de nacimiento: </strong> {{ alumno.nacimiento }}
|
||||
<strong> Fecha de nacimiento: </strong> {{ fecha(alumno.nacimiento) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -209,245 +208,255 @@
|
||||
|
||||
<div class="Liberacion" v-if="activeStep == 5"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container px-3">
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import "buefy/dist/buefy.css";
|
||||
import moment from "moment";
|
||||
import axios from "axios";
|
||||
import 'buefy/dist/buefy.css'
|
||||
import moment from 'moment'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
activeStep: "",
|
||||
activeStep: '',
|
||||
isFullPage: true,
|
||||
file: [],
|
||||
nacimiento: [],
|
||||
telefono: "",
|
||||
direccion: "",
|
||||
|
||||
telefono: '',
|
||||
direccion: '',
|
||||
alumno: {
|
||||
carrera: "",
|
||||
creditos: "",
|
||||
nombre: "",
|
||||
cuenta: "",
|
||||
correo: "",
|
||||
direccion: "",
|
||||
nacimiento: "",
|
||||
telefono: "",
|
||||
idCuestionario: "",
|
||||
informeGlobal: "",
|
||||
idAlumno: "",
|
||||
idCarrera: "",
|
||||
idServicio: "",
|
||||
carrera: '',
|
||||
creditos: '',
|
||||
nombre: '',
|
||||
cuenta: '',
|
||||
correo: '',
|
||||
direccion: '',
|
||||
nacimiento: '',
|
||||
telefono: '',
|
||||
idCuestionario: '',
|
||||
informeGlobal: '',
|
||||
idAlumno: '',
|
||||
idCarrera: '',
|
||||
idServicio: '',
|
||||
inicio: [],
|
||||
fin: [],
|
||||
registro: [],
|
||||
registro: []
|
||||
},
|
||||
programa: {
|
||||
programa: "",
|
||||
institucion: "",
|
||||
dependencia: "",
|
||||
clave: "",
|
||||
acatlan: "",
|
||||
programaInterno: "",
|
||||
profesor: "",
|
||||
programa: '',
|
||||
institucion: '',
|
||||
dependencia: '',
|
||||
clave: '',
|
||||
acatlan: '',
|
||||
programaInterno: '',
|
||||
profesor: ''
|
||||
},
|
||||
mensajes: [
|
||||
{ status: 0, mensaje: "" },
|
||||
{ status: 1, mensaje: "" },
|
||||
{ status: 0, mensaje: '' },
|
||||
{ status: 1, mensaje: '' },
|
||||
{
|
||||
status: 2,
|
||||
mensaje:
|
||||
"Te informamos que el Área de Registro y Control de Servicio Social ha validado tu solicitud de registro de servicio social por lo que el siguiente trámite lo realizarás hasta que concluyas 480 horas en un periodo de mínimo 6 meses y obtengas tu carta de término por parte de la institución, quien se encargará de subir dicho archivo a este sistema, además de responder un cuestionario sobre tu desempeño. A su vez, deberás responder el siguiente cuestionario de evaluación del programa de servicio social en donde participaste y enviar el informe global de actividades elaborado por ti, con firma y sello de visto bueno de tu jefe inmediato. En cuanto el Área de Registro y Control de Servicio Social valide tu solicitud, podrás revisar las indicaciones del siguiente paso en el panel llamado “Liberación” Cualquier duda puedes acudir al área de Registro y Control de Servicio Social en COESI de lunes a viernes de 10:00 a 14:00 hrs. y de 16:00 a 20:00 hrs. o bien, comunicarte al 5623 1686 o al correo registross@acatlan.unam.mx",
|
||||
'Te informamos que el Área de Registro y Control de Servicio Social ha validado tu solicitud de registro de servicio social por lo que el siguiente trámite lo realizarás hasta que concluyas 480 horas en un periodo de mínimo 6 meses y obtengas tu carta de término por parte de la institución, quien se encargará de subir dicho archivo a este sistema, además de responder un cuestionario sobre tu desempeño. A su vez, deberás responder el siguiente cuestionario de evaluación del programa de servicio social en donde participaste y enviar el informe global de actividades elaborado por ti, con firma y sello de visto bueno de tu jefe inmediato. En cuanto el Área de Registro y Control de Servicio Social valide tu solicitud, podrás revisar las indicaciones del siguiente paso en el panel llamado “Liberación” Cualquier duda puedes acudir al área de Registro y Control de Servicio Social en COESI de lunes a viernes de 10:00 a 14:00 hrs. y de 16:00 a 20:00 hrs. o bien, comunicarte al 5623 1686 o al correo registross@acatlan.unam.mx'
|
||||
},
|
||||
{ status: 3, mensaje: "" },
|
||||
{ status: 3, mensaje: '' },
|
||||
{
|
||||
status: 4,
|
||||
mensaje:
|
||||
"Espera a que tus documentos sean validados por el Departamento de Servicio Social y Bolsa de Trabajo",
|
||||
'Espera a que tus documentos sean validados por el Departamento de Servicio Social y Bolsa de Trabajo'
|
||||
},
|
||||
{
|
||||
status: 5,
|
||||
mensaje:
|
||||
"Te confirmamos que has concluido con los trámites necesarios para la liberación de tu servicio social por lo que ahora sólo queda esperar a que en máximo 15 días hábiles se te notifique por correo electrónico a partir de cuándo puedes recoger la copia de tu carta de liberación en las ventanillas del Área de Registro y Control de Servicio Social. Cualquier duda puedes acudir al área de Registro y Control de Servicio Social en COESI de lunes a viernes de 10:00 a 13:00 hrs. y de 16:00 a 19:00 hrs. o bien, comunicarte al 5623 1686 o al correo registross@apolo.acatlan.unam.mx",
|
||||
'Te confirmamos que has concluido con los trámites necesarios para la liberación de tu servicio social por lo que ahora sólo queda esperar a que en máximo 15 días hábiles se te notifique por correo electrónico a partir de cuándo puedes recoger la copia de tu carta de liberación en las ventanillas del Área de Registro y Control de Servicio Social. Cualquier duda puedes acudir al área de Registro y Control de Servicio Social en COESI de lunes a viernes de 10:00 a 13:00 hrs. y de 16:00 a 19:00 hrs. o bien, comunicarte al 5623 1686 o al correo registross@apolo.acatlan.unam.mx'
|
||||
},
|
||||
{ status: 6, mensaje: "" },
|
||||
{ status: 7, mensaje: "" },
|
||||
{ status: 8, mensaje: "" },
|
||||
{ status: 9, mensaje: "" },
|
||||
],
|
||||
};
|
||||
{ status: 6, mensaje: '' },
|
||||
{ status: 7, mensaje: '' },
|
||||
{ status: 8, mensaje: '' },
|
||||
{ status: 9, mensaje: '' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.file = [];
|
||||
this.nacimiento = [];
|
||||
this.telefono = "";
|
||||
this.direccion = "";
|
||||
reset () {
|
||||
this.file = []
|
||||
this.nacimiento = []
|
||||
this.telefono = ''
|
||||
this.direccion = ''
|
||||
},
|
||||
enviarRegistro() {
|
||||
getData () {
|
||||
axios
|
||||
.get(`${process.env.api}/servicio/alumno`, {
|
||||
params: {
|
||||
idUsuario: localStorage.getItem('idUsuario')
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
console.log(resp.data)
|
||||
this.activeStep = resp.data.Status.idStatus - 1
|
||||
|
||||
this.programa.programa = resp.data.Programa.programa
|
||||
this.programa.dependencia = resp.data.Programa.dependencia
|
||||
this.programa.institucion = resp.data.Programa.institucion
|
||||
this.programa.clave = resp.data.Programa.clavePrograma
|
||||
this.programa.profesor = resp.data.profesor
|
||||
this.programa.acatlan = resp.data.Programa.acatlan
|
||||
this.programa.programaInterno = resp.data.programaInterno
|
||||
|
||||
this.alumno.creditos = parseInt(resp.data.creditos, 10)
|
||||
this.alumno.carrera = resp.data.Carrera.carrera
|
||||
this.alumno.idCarrera = resp.data.Carrera.idCarrera
|
||||
this.alumno.correo = resp.data.correo
|
||||
this.alumno.inicio = resp.data.fechaInicio
|
||||
this.alumno.fin = resp.data.fechaFin
|
||||
this.alumno.registro = resp.data.createdAt
|
||||
this.alumno.direccion = resp.data.direccion
|
||||
this.alumno.nacimiento = resp.data.fechaNacimiento
|
||||
this.alumno.telefono = resp.data.telefono
|
||||
this.alumno.idServicio = resp.data.idServicio
|
||||
this.alumno.idCuestionario = resp.data.idCuestionarioAlumno
|
||||
this.alumno.informeGlobal = resp.data.informeGlobal
|
||||
this.alumno.nombre = localStorage.getItem('nombre')
|
||||
this.alumno.cuenta = localStorage.getItem('usuario')
|
||||
|
||||
window.localStorage.setItem('idCuestionarioAlumno', resp.data.idCuestionarioAlumno)
|
||||
window.localStorage.setItem('idServicio', resp.data.idServicio)
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.message)
|
||||
})
|
||||
},
|
||||
enviarRegistro () {
|
||||
const loadingComponent = this.$buefy.loading.open({
|
||||
container: this.isFullPage ? null : this.$refs.element.$el,
|
||||
});
|
||||
container: this.isFullPage ? null : this.$refs.element.$el
|
||||
})
|
||||
|
||||
const data = {
|
||||
idServicio: this.alumno.idServicio,
|
||||
direccion: this.direccion,
|
||||
telefono: this.telefono,
|
||||
fechaNacimiento: moment(this.nacimiento),
|
||||
};
|
||||
fechaNacimiento: moment(this.nacimiento)
|
||||
}
|
||||
|
||||
axios
|
||||
.put(`${process.env.api}/servicio/registro_validado`, data)
|
||||
.then((res) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Success",
|
||||
message: "Se enviaron los datos correctamente",
|
||||
type: "is-success",
|
||||
title: 'Success',
|
||||
message: 'Se enviaron los datos correctamente',
|
||||
type: 'is-success',
|
||||
hasIcon: true,
|
||||
icon: "checkbox-marked-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
icon: 'checkbox-marked-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
|
||||
this.reset();
|
||||
location.reload();
|
||||
this.reset()
|
||||
this.getData()
|
||||
})
|
||||
.catch((error) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
title: 'Error',
|
||||
message: error.response.data.message,
|
||||
type: "is-danger",
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: "alert-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
});
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
},
|
||||
enviarInforme() {
|
||||
enviarInforme () {
|
||||
const loadingComponent = this.$buefy.loading.open({
|
||||
container: this.isFullPage ? null : this.$refs.element.$el,
|
||||
});
|
||||
container: this.isFullPage ? null : this.$refs.element.$el
|
||||
})
|
||||
const data = {
|
||||
idServicio: this.alumno.idServicio,
|
||||
};
|
||||
const formData = new FormData();
|
||||
console.log(data);
|
||||
formData.append("data", JSON.stringify(data));
|
||||
formData.append("informeGlobal", this.file);
|
||||
idServicio: this.alumno.idServicio
|
||||
}
|
||||
const formData = new FormData()
|
||||
console.log(data)
|
||||
formData.append('data', JSON.stringify(data))
|
||||
formData.append('informeGlobal', this.file)
|
||||
|
||||
axios
|
||||
.put(`${process.env.api}/servicio/informe_global`, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Success",
|
||||
message: "Se enviaron los datos correctamente",
|
||||
type: "is-success",
|
||||
title: 'Success',
|
||||
message: 'Se enviaron los datos correctamente',
|
||||
type: 'is-success',
|
||||
hasIcon: true,
|
||||
icon: "checkbox-marked-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
icon: 'checkbox-marked-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
|
||||
this.reset();
|
||||
location.reload();
|
||||
this.reset()
|
||||
this.getData()
|
||||
})
|
||||
.catch((error) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
title: 'Error',
|
||||
message: error.response.data.message,
|
||||
type: "is-danger",
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: "alert-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
});
|
||||
},
|
||||
fecha(date) {
|
||||
const fecha = moment(date);
|
||||
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
},
|
||||
fecha (date) {
|
||||
const fecha = moment(date)
|
||||
return `${fecha.year()}/${fecha.month() + 1}/${fecha.date()}`
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
steps() {
|
||||
const steps = [...this.baseSteps];
|
||||
return steps;
|
||||
},
|
||||
steps () {
|
||||
const steps = [...this.baseSteps]
|
||||
return steps
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios
|
||||
.get(`${process.env.api}/servicio/alumno`, {
|
||||
params: {
|
||||
idUsuario: localStorage.getItem("idUsuario"),
|
||||
},
|
||||
})
|
||||
.then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.activeStep = resp.data.Status.idStatus - 1;
|
||||
|
||||
this.programa.programa = resp.data.Programa.programa;
|
||||
this.programa.dependencia = resp.data.Programa.dependencia;
|
||||
this.programa.institucion = resp.data.Programa.institucion;
|
||||
this.programa.clave = resp.data.Programa.clavePrograma;
|
||||
this.programa.profesor = resp.data.profesor;
|
||||
this.programa.acatlan = resp.data.Programa.acatlan;
|
||||
this.programa.programaInterno = resp.data.programaInterno;
|
||||
|
||||
this.alumno.creditos = resp.data.creditos;
|
||||
this.alumno.carrera = resp.data.Carrera.carrera;
|
||||
this.alumno.idCarrera = resp.data.Carrera.idCarrera;
|
||||
this.alumno.correo = resp.data.correo;
|
||||
this.alumno.inicio = resp.data.fechaInicio;
|
||||
this.alumno.fin = resp.data.fechaFin;
|
||||
this.alumno.registro = resp.data.createdAt;
|
||||
this.alumno.direccion = resp.data.direccion;
|
||||
this.alumno.nacimiento = resp.data.fechaNacimiento;
|
||||
this.alumno.telefono = resp.data.telefono;
|
||||
this.alumno.idServicio = resp.data.idServicio;
|
||||
this.alumno.idCuestionario = resp.data.idCuestionarioAlumno;
|
||||
this.alumno.informeGlobal = resp.data.informeGlobal;
|
||||
this.alumno.nombre = localStorage.getItem("nombre");
|
||||
this.alumno.cuenta = localStorage.getItem("usuario");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.message);
|
||||
});
|
||||
created () {
|
||||
this.getData()
|
||||
},
|
||||
watch: {
|
||||
file() {
|
||||
console.log(this.file.size);
|
||||
file () {
|
||||
console.log(this.file.size)
|
||||
if (this.file.size >= 20000000) {
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
message: "El tamaño del archivo exede los 20MB",
|
||||
type: "is-danger",
|
||||
title: 'Error',
|
||||
message: 'El tamaño del archivo exede los 20MB',
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: "alert-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
this.file = [];
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
this.file = []
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
+3
-3
@@ -46,9 +46,9 @@ export default {
|
||||
// Build Configuration (https://go.nuxtjs.dev/config-build)
|
||||
build: {},
|
||||
env: {
|
||||
// api: 'http://localhost:3000'
|
||||
api: "https://venus.acatlan.unam.mx/ss-pruebas",
|
||||
// api: "https://890af9d598a4.ngrok.io"
|
||||
api: "http://localhost:3000",
|
||||
// api: "https://venus.acatlan.unam.mx/ss-pruebas",
|
||||
//api: "https://890af9d598a4.ngrok.io"
|
||||
// api: 'https//venus.acatlan.unam.mx/pruebas_pcpuma'
|
||||
},
|
||||
};
|
||||
|
||||
Generated
+12
-14890
File diff suppressed because it is too large
Load Diff
+377
-245
File diff suppressed because it is too large
Load Diff
+159
-162
@@ -78,8 +78,7 @@
|
||||
|
||||
<b-field label="Créditos">
|
||||
<div class="input">
|
||||
{{ alumno.creditos[1] }}{{ alumno.creditos[2]
|
||||
}}<span v-if="alumno.creditos">%</span>
|
||||
{{ alumno.creditos }}<span v-if="alumno.creditos">%</span>
|
||||
</div>
|
||||
</b-field>
|
||||
|
||||
@@ -222,256 +221,254 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import "buefy/dist/buefy.css";
|
||||
import validator from "validator";
|
||||
import axios from "axios";
|
||||
import moment from "moment";
|
||||
import 'buefy/dist/buefy.css'
|
||||
import validator from 'validator'
|
||||
import axios from 'axios'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
isFullPage: true,
|
||||
noCuenta: "",
|
||||
sizeOk: "",
|
||||
noCuenta: '',
|
||||
sizeOk: '',
|
||||
searched: false,
|
||||
minDate: new Date("2020-01-01"),
|
||||
programaSelectedID: "",
|
||||
minDate: new Date('2020-12-25'),
|
||||
programaSelectedID: '',
|
||||
file: [],
|
||||
programas: [],
|
||||
programaSelected: {
|
||||
idPrograma: null,
|
||||
institucion: "",
|
||||
dependencia: "",
|
||||
programa: "",
|
||||
clavePrograma: "",
|
||||
acatlan: "",
|
||||
activo: "",
|
||||
idUsuario: "",
|
||||
programaInterno: "",
|
||||
profesor: "",
|
||||
institucion: '',
|
||||
dependencia: '',
|
||||
programa: '',
|
||||
clavePrograma: '',
|
||||
acatlan: '',
|
||||
activo: '',
|
||||
idUsuario: '',
|
||||
programaInterno: '',
|
||||
profesor: ''
|
||||
},
|
||||
alumno: {
|
||||
cuenta: "",
|
||||
nombre: "",
|
||||
carrera: "",
|
||||
creditos: "",
|
||||
idAlumno: "",
|
||||
idCarrera: "",
|
||||
cuenta: '',
|
||||
nombre: '',
|
||||
carrera: '',
|
||||
creditos: '',
|
||||
idAlumno: '',
|
||||
idCarrera: '',
|
||||
inicio: [],
|
||||
fin: [],
|
||||
correo: "",
|
||||
},
|
||||
};
|
||||
correo: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.programaSelected.idPrograma = "";
|
||||
this.programaSelected.institucion = "";
|
||||
this.programaSelected.dependencia = "";
|
||||
this.programaSelected.programa = "";
|
||||
this.programaSelected.clavePrograma = "";
|
||||
this.programaSelected.acatlan = "";
|
||||
this.programaSelected.activo = "";
|
||||
this.programaSelected.idUsuario = "";
|
||||
this.programaSelected.programaInterno = "";
|
||||
this.programaSelected.profesor = "";
|
||||
reset () {
|
||||
this.programaSelected.idPrograma = ''
|
||||
this.programaSelected.institucion = ''
|
||||
this.programaSelected.dependencia = ''
|
||||
this.programaSelected.programa = ''
|
||||
this.programaSelected.clavePrograma = ''
|
||||
this.programaSelected.acatlan = ''
|
||||
this.programaSelected.activo = ''
|
||||
this.programaSelected.idUsuario = ''
|
||||
this.programaSelected.programaInterno = ''
|
||||
this.programaSelected.profesor = ''
|
||||
|
||||
this.alumno.cuenta = "";
|
||||
this.alumno.nombre = "";
|
||||
this.alumno.creditos = "";
|
||||
this.alumno.carrera = "";
|
||||
this.alumno.idAlumno = "";
|
||||
this.alumno.idCarrera = "";
|
||||
this.alumno.correo = "";
|
||||
this.alumno.inicio = [];
|
||||
this.alumno.fin = [];
|
||||
this.alumno.cuenta = ''
|
||||
this.alumno.nombre = ''
|
||||
this.alumno.creditos = ''
|
||||
this.alumno.carrera = ''
|
||||
this.alumno.idAlumno = ''
|
||||
this.alumno.idCarrera = ''
|
||||
this.alumno.correo = ''
|
||||
this.alumno.inicio = []
|
||||
this.alumno.fin = []
|
||||
|
||||
this.noCuenta = "";
|
||||
this.file = [];
|
||||
this.noCuenta = ''
|
||||
this.file = []
|
||||
},
|
||||
esNumero(numero) {
|
||||
const ultimaLetra = numero.length - 1;
|
||||
esNumero (numero) {
|
||||
const ultimaLetra = numero.length - 1
|
||||
|
||||
if (numero && !validator.isNumeric(numero[ultimaLetra])) {
|
||||
return numero.substr(0, ultimaLetra);
|
||||
return numero.substr(0, ultimaLetra)
|
||||
}
|
||||
return numero;
|
||||
return numero
|
||||
},
|
||||
maxLength(str, max) {
|
||||
if (str.length > max) return str.substr(0, max);
|
||||
return str;
|
||||
maxLength (str, max) {
|
||||
if (str.length > max) return str.substr(0, max)
|
||||
return str
|
||||
},
|
||||
correoValidado() {
|
||||
correoValidado () {
|
||||
if (validator.isEmail(this.alumno.correo)) {
|
||||
console.log("es correo");
|
||||
return "";
|
||||
console.log('es correo')
|
||||
return ''
|
||||
}
|
||||
},
|
||||
buscarAlumno() {
|
||||
buscarAlumno () {
|
||||
const loadingComponent = this.$buefy.loading.open({
|
||||
container: this.isFullPage ? null : this.$refs.element.$el,
|
||||
});
|
||||
container: this.isFullPage ? null : this.$refs.element.$el
|
||||
})
|
||||
axios
|
||||
.get(`${process.env.api}/usuario/escolares`, {
|
||||
params: {
|
||||
numeroCuenta: this.noCuenta,
|
||||
},
|
||||
numeroCuenta: this.noCuenta
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
|
||||
console.log(resp.data);
|
||||
this.alumno.cuenta = this.noCuenta;
|
||||
this.alumno.nombre = resp.data.nombre;
|
||||
this.alumno.carrera = resp.data.carrera;
|
||||
this.alumno.creditos = resp.data.creditos;
|
||||
this.alumno.idCarrera = resp.data.idCarrera;
|
||||
this.alumno.idAlumno = resp.data.idUsuario;
|
||||
console.log(resp.data)
|
||||
this.alumno.cuenta = this.noCuenta
|
||||
this.alumno.nombre = resp.data.nombre
|
||||
this.alumno.carrera = resp.data.carrera
|
||||
this.alumno.creditos = parseInt(resp.data.creditos, 10)
|
||||
this.alumno.idCarrera = resp.data.idCarrera
|
||||
this.alumno.idAlumno = resp.data.idUsuario
|
||||
|
||||
this.searched = true;
|
||||
this.searched = true
|
||||
})
|
||||
.catch((error) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
title: 'Error',
|
||||
message: error.response.data.message,
|
||||
type: "is-danger",
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: "alert-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
});
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
},
|
||||
Enviar() {
|
||||
Enviar () {
|
||||
const loadingComponent = this.$buefy.loading.open({
|
||||
container: this.isFullPage ? null : this.$refs.element.$el,
|
||||
});
|
||||
container: this.isFullPage ? null : this.$refs.element.$el
|
||||
})
|
||||
const data = {
|
||||
idUsuario: this.alumno.idAlumno,
|
||||
idPrograma: this.programaSelected.idPrograma,
|
||||
idCarrera: this.alumno.idCarrera,
|
||||
numeroCuenta: this.alumno.cuenta,
|
||||
creditos: this.alumno.creditos,
|
||||
creditos: (this.alumno.creditos).toString(),
|
||||
correo: this.alumno.correo,
|
||||
fechaInicio: moment(this.alumno.inicio),
|
||||
fechaFin: moment(this.alumno.fin),
|
||||
};
|
||||
const formData = new FormData();
|
||||
console.log(data);
|
||||
formData.append("alumno", JSON.stringify(data));
|
||||
formData.append("cartaAceptacion", this.file);
|
||||
fechaFin: moment(this.alumno.fin)
|
||||
}
|
||||
const formData = new FormData()
|
||||
console.log(data)
|
||||
formData.append('alumno', JSON.stringify(data))
|
||||
formData.append('cartaAceptacion', this.file)
|
||||
|
||||
axios
|
||||
.post(`${process.env.api}/servicio/nuevo`, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Success",
|
||||
message: "Se enviaron los datos correctamente",
|
||||
type: "is-success",
|
||||
title: 'Success',
|
||||
message: 'Se enviaron los datos correctamente',
|
||||
type: 'is-success',
|
||||
hasIcon: true,
|
||||
icon: "checkbox-marked-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
icon: 'checkbox-marked-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
|
||||
this.reset();
|
||||
this.reset()
|
||||
})
|
||||
.catch((error) => {
|
||||
loadingComponent.close();
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
title: 'Error',
|
||||
message: error.response.data.message,
|
||||
type: "is-danger",
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: "alert-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
});
|
||||
},
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
noCuenta() {
|
||||
noCuenta () {
|
||||
if (this.searched === false) {
|
||||
this.noCuenta = Number(this.noCuenta) < 0 ? "" : this.noCuenta;
|
||||
this.noCuenta = this.esNumero(this.noCuenta);
|
||||
this.noCuenta = this.maxLength(this.noCuenta, 9);
|
||||
this.noCuenta = Number(this.noCuenta) < 0 ? '' : this.noCuenta
|
||||
this.noCuenta = this.esNumero(this.noCuenta)
|
||||
this.noCuenta = this.maxLength(this.noCuenta, 9)
|
||||
} else {
|
||||
this.noCuenta = "";
|
||||
this.searched = false;
|
||||
this.reset();
|
||||
this.noCuenta = ''
|
||||
this.searched = false
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
programaSelectedID() {
|
||||
programaSelectedID () {
|
||||
if (this.programaSelectedID) {
|
||||
for (let i = 0; i < this.programas.length; i++) {
|
||||
if (this.programas[i].idPrograma === this.programaSelectedID) {
|
||||
this.programaSelected.idPrograma = this.programas[i].idPrograma;
|
||||
this.programaSelected.programa = this.programas[i].programa;
|
||||
this.programaSelected.institucion = this.programas[i].institucion;
|
||||
this.programaSelected.dependencia = this.programas[i].dependencia;
|
||||
this.programaSelected.clavePrograma = this.programas[
|
||||
i
|
||||
].clavePrograma;
|
||||
this.programaSelected.acatlan = this.programas[i].acatlan;
|
||||
this.programaSelected.activo = this.programas[i].activo;
|
||||
this.programaSelected.idPrograma = this.programas[i].idPrograma
|
||||
this.programaSelected.programa = this.programas[i].programa
|
||||
this.programaSelected.institucion = this.programas[i].institucion
|
||||
this.programaSelected.dependencia = this.programas[i].dependencia
|
||||
this.programaSelected.clavePrograma = this.programas[i].clavePrograma
|
||||
this.programaSelected.acatlan = this.programas[i].acatlan
|
||||
this.programaSelected.activo = this.programas[i].activo
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
file() {
|
||||
console.log(this.file.size);
|
||||
file () {
|
||||
console.log(this.file.size)
|
||||
if (this.file.size >= 20000000) {
|
||||
this.$buefy.dialog.alert({
|
||||
title: "Error",
|
||||
message: "El tamaño del archivo exede los 20MB",
|
||||
type: "is-danger",
|
||||
title: 'Error',
|
||||
message: 'El tamaño del archivo exede los 20MB',
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: "alert-circle",
|
||||
iconPack: "mdi",
|
||||
ariaRole: "alertdialog",
|
||||
ariaModal: true,
|
||||
});
|
||||
this.file = [];
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
this.file = []
|
||||
}
|
||||
},
|
||||
"alumno.inicio"() {
|
||||
this.alumno.fin = [];
|
||||
},
|
||||
'alumno.inicio' () {
|
||||
this.alumno.fin = []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(localStorage.getItem("idUsuario"));
|
||||
mounted () {
|
||||
console.log(localStorage.getItem('idUsuario'))
|
||||
axios
|
||||
.get(`${process.env.api}/programa`, {
|
||||
params: {
|
||||
idUsuario: localStorage.getItem("idUsuario"),
|
||||
},
|
||||
idUsuario: localStorage.getItem('idUsuario')
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.programas = resp.data;
|
||||
console.log(this.programas);
|
||||
console.log(resp.data)
|
||||
this.programas = resp.data
|
||||
console.log(this.programas)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.response.data.message);
|
||||
});
|
||||
console.log(error.response.data.message)
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
minDate2() {
|
||||
const min = new Date(this.alumno.inicio);
|
||||
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate());
|
||||
},
|
||||
},
|
||||
};
|
||||
minDate2 () {
|
||||
const min = new Date(this.alumno.inicio)
|
||||
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate())
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user