alumno aun no completado
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<button
|
||||
:disabled="nacimiento=='' || telefono=='' || direccion==''"
|
||||
class="button is-success is-medium"
|
||||
@click="open"
|
||||
@click="enviar2()"
|
||||
>
|
||||
Enviar
|
||||
</button>
|
||||
@@ -164,34 +164,43 @@ Te confirmamos que has concluido con los trámites necesarios para la liberació
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <pre class="my-6">{{$data}}</pre> -->
|
||||
<pre class="my-6">{{$data}}</pre>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'buefy/dist/buefy.css'
|
||||
import validator from 'validator'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
activeStep: 1,
|
||||
activeStep: '',
|
||||
file: [],
|
||||
nacimiento: '',
|
||||
nacimiento: [],
|
||||
telefono: '',
|
||||
direccion: '',
|
||||
|
||||
alumno: {
|
||||
carrera: 'Matematicas Aplicadas',
|
||||
nombre: 'Jose Jose Lopez Lopez',
|
||||
cuenta: '123456789',
|
||||
correo: 'ejmplo@eje.com',
|
||||
direccion: 'avenida 21 estado de mexico',
|
||||
nacimiento: "16/04/2000",
|
||||
telefono: '5511223344',
|
||||
carrera: '',
|
||||
nombre: 'X',
|
||||
cuenta: 'X',
|
||||
correo: '',
|
||||
direccion: '',
|
||||
nacimiento: '',
|
||||
telefono: '',
|
||||
cuestionario: true,
|
||||
informe: true
|
||||
informe: true,
|
||||
idAlumno: '',
|
||||
idCarrera: '',
|
||||
idServicio: '',
|
||||
inicio: [],
|
||||
fin: []
|
||||
|
||||
},
|
||||
programa:{
|
||||
programa: {
|
||||
nombre: 'programa 1',
|
||||
institucion: 'institucion 1',
|
||||
dependencia: 'dependecia 1',
|
||||
@@ -205,6 +214,48 @@ export default {
|
||||
container: this.isFullPage ? null : this.$refs.element.$el
|
||||
})
|
||||
setTimeout(() => loadingComponent.close(), 3 * 1000)
|
||||
},
|
||||
enviar2 () {
|
||||
const loadingComponent = this.$buefy.loading.open({
|
||||
container: this.isFullPage ? null : this.$refs.element.$el
|
||||
})
|
||||
|
||||
const data = {
|
||||
idServicio: this.alumno.idServicio,
|
||||
fechaNacimiento: this.alumno.nacimiento,
|
||||
direccion: this.alumno.direccion,
|
||||
telefono: this.alumno.telefono
|
||||
}
|
||||
|
||||
axios.post(`${process.env.api}/servicio/registro_validado`, data)
|
||||
.then(res => {
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Success',
|
||||
message: 'Se enviaron los datos correctamente',
|
||||
type: 'is-success',
|
||||
hasIcon: true,
|
||||
icon: 'checkbox-marked-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
|
||||
this.reset()
|
||||
})
|
||||
.catch(error => {
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: error.response.data.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
iconPack: 'mdi',
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -237,6 +288,35 @@ export default {
|
||||
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.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.direccion = resp.data.direccion
|
||||
this.alumno.nacimiento = resp.data.fechaNacimiento
|
||||
this.alumno.telefono = resp.data.telefono
|
||||
this.alumno.idServicio = resp.data.idServicio
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error.message)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ export default {
|
||||
},
|
||||
env: {
|
||||
//api: 'http://localhost:3000'
|
||||
api: 'https://10578525f0f3.ngrok.io'
|
||||
api: 'https://676239f84128.ngrok.io'
|
||||
//api: 'https//venus.acatlan.unam.mx/pruebas_pcpuma'
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ export default {
|
||||
window.localStorage.setItem('idUsuario', resp.data.Usuario.idUsuario)
|
||||
window.localStorage.setItem('token', resp.data.token)
|
||||
window.localStorage.setItem('nombre', resp.data.Usuario.nombre)
|
||||
window.localStorage.setItem('idTipoUsuario', resp.data.Usuario.TipoUsuario.tipoUsuario)
|
||||
window.localStorage.setItem('idTipoUsuario', resp.data.Usuario.TipoUsuario.idTipoUsuario)
|
||||
window.localStorage.setItem('tipoUsuario', resp.data.Usuario.TipoUsuario.tipoUsuario)
|
||||
|
||||
this.$router.push(`/${resp.data.Usuario.TipoUsuario.tipoUsuario}`)
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: error.message,
|
||||
message: error.response.data.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
|
||||
@@ -283,7 +283,7 @@ export default {
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: error.message,
|
||||
message: error.response.data.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
@@ -337,7 +337,7 @@ export default {
|
||||
loadingComponent.close()
|
||||
this.$buefy.dialog.alert({
|
||||
title: 'Error',
|
||||
message: error.message,
|
||||
message: error.response.data.message,
|
||||
type: 'is-danger',
|
||||
hasIcon: true,
|
||||
icon: 'alert-circle',
|
||||
@@ -396,7 +396,7 @@ export default {
|
||||
console.log(this.programas)
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
console.log(error.response.data.message)
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user