casi todo
This commit is contained in:
+111
-40
@@ -5,7 +5,7 @@
|
||||
.col-4.offset-2.left
|
||||
h1 Dictamen
|
||||
.col-4.right
|
||||
button.btn.btn-danger(type="button") Salir
|
||||
button.btn.btn-danger(type="button" v-on:click="salir") Salir
|
||||
.row
|
||||
.col-8.offset-2.left
|
||||
br
|
||||
@@ -15,30 +15,29 @@
|
||||
thead
|
||||
tr
|
||||
td Resumen
|
||||
td Extenso
|
||||
//- td Extenso
|
||||
td Nombre del trabajo
|
||||
td Nombre del aspirante
|
||||
td Aceptado
|
||||
td Rechaado
|
||||
td Publicado
|
||||
td Pagado
|
||||
//- td Publicado
|
||||
//- td Pagado
|
||||
tbody
|
||||
each row in [1,2,3,4,5,6]
|
||||
tr
|
||||
td
|
||||
button.btn.btn-primary(type="button") ver
|
||||
td
|
||||
button.btn.btn-info(type="button") ver
|
||||
td= 'Trabajo '+row
|
||||
td= 'Aspirante '+row
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
tr(v-for="i in ponencias")
|
||||
td
|
||||
a.btn.btn-primary(:href="`https://venus.acatlan.unam.mx/coloquioeducacion/descargar_ponencia?id_persona=${i.id_persona}`" download="ponencia" ) ver
|
||||
//- td
|
||||
//- button.btn.btn-info(type="button") ver
|
||||
td {{i.nombre_trabajo}}
|
||||
td {{i.autor_principal}}
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
//- td.center
|
||||
//- input.form-check-input(type="checkbox")
|
||||
//- td.center
|
||||
//- input.form-check-input(type="checkbox")
|
||||
br
|
||||
br
|
||||
.row
|
||||
@@ -50,35 +49,107 @@
|
||||
thead
|
||||
tr
|
||||
td Resumen
|
||||
td Extenso
|
||||
//- td Extenso
|
||||
td Nombre del trabajo
|
||||
td Nombre del aspirante
|
||||
td Aceptado
|
||||
td Rechaado
|
||||
td Publicado
|
||||
td Pagado
|
||||
//- td Publicado
|
||||
//- td Pagado
|
||||
tbody
|
||||
each row in [1,2,3,4,5,6]
|
||||
tr
|
||||
td
|
||||
button.btn.btn-primary(type="button") ver
|
||||
td
|
||||
button.btn.btn-info(type="button") ver
|
||||
td= 'Trabajo '+row
|
||||
td= 'Aspirante '+row
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
tr(v-for="j in carteles")
|
||||
td
|
||||
button.btn.btn-primary(type="button") ver
|
||||
//- td
|
||||
//- button.btn.btn-info(type="button") ver
|
||||
td {{j.nombre_trabajo}}
|
||||
td {{j.autor_principal}}
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
td.center
|
||||
input.form-check-input(type="checkbox")
|
||||
//- td.center
|
||||
//- input.form-check-input(type="checkbox")
|
||||
//- td.center
|
||||
//- input.form-check-input(type="checkbox")
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ponencias: {},
|
||||
carteles: {},
|
||||
id_admin: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
salir: function() {
|
||||
window.localStorage.removeItem('id')
|
||||
window.localStorage.removeItem('mesa')
|
||||
this.$router.push('/loginadmin')
|
||||
},
|
||||
ponenciafile: function(id) {
|
||||
axios
|
||||
.get(
|
||||
`https://venus.acatlan.unam.mx/coloquioeducacion/descargar_ponencia?id_persona=${id}`
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response)
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
cartelfile: function(id) {
|
||||
axios
|
||||
.get(
|
||||
`https://venus.acatlan.unam.mx/coloquioeducacion/descargar_cartel?id_persona=${id}`
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response)
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
},
|
||||
created: function() {
|
||||
this.id_admin = window.localStorage.id
|
||||
axios
|
||||
.get(
|
||||
`https://venus.acatlan.unam.mx/coloquioeducacion/llenar_ponencia?id_admin=${this.id_admin}`
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response.data.dat)
|
||||
this.ponencias = response.data.dat
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error)
|
||||
})
|
||||
axios
|
||||
.get(
|
||||
`https://venus.acatlan.unam.mx/coloquioeducacion/llenar_cartel?id_admin=${this.id_admin}`
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response.data.dat)
|
||||
this.carteles = response.data.dat
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
app-menu
|
||||
br
|
||||
br
|
||||
br
|
||||
br
|
||||
.row
|
||||
.col-4.offset-4
|
||||
h1 Iniciar Sesión
|
||||
br
|
||||
br
|
||||
form
|
||||
.form-group.left
|
||||
label(for="email") Email
|
||||
input#email.form-control(type="email")
|
||||
.form-group.left
|
||||
label(for="email") Contraseña
|
||||
input#email.form-control(type="email")
|
||||
button.btn.btn-primary(type="submit") Iniciar Sesión
|
||||
br
|
||||
br
|
||||
br
|
||||
br
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import webMenu from '../estetica/menu.vue'
|
||||
export default {
|
||||
components: {
|
||||
appMenu: webMenu,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template lang="pug">
|
||||
div
|
||||
br
|
||||
br
|
||||
br
|
||||
br
|
||||
.row
|
||||
.col-4.offset-4
|
||||
h1 Iniciar Sesión
|
||||
br
|
||||
br
|
||||
form
|
||||
.form-group.left
|
||||
label(for="text") Usuario
|
||||
input#email.form-control(type="text" v-model="user")
|
||||
.form-group.left
|
||||
label(for="email") Contraseña
|
||||
input#email.form-control(type="password" v-model="pass")
|
||||
button.btn.btn-primary(type="submit" v-on:click="Login") Iniciar Sesión
|
||||
br
|
||||
br
|
||||
br
|
||||
br
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pass: '',
|
||||
user: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
Login: function(e) {
|
||||
e.preventDefault()
|
||||
axios
|
||||
.post(
|
||||
`https://venus.acatlan.unam.mx/coloquioeducacion/loggin_admin`,
|
||||
{
|
||||
usuario: this.user,
|
||||
password: this.pass,
|
||||
}
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response.data)
|
||||
window.localStorage.mesa = response.data.mesa
|
||||
window.localStorage.id = response.data.id_admin
|
||||
|
||||
this.$router.push('/admin')
|
||||
})
|
||||
.catch(error => {
|
||||
// eslint-disable-next-line
|
||||
console.log(error.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
+124
-23
@@ -1,33 +1,32 @@
|
||||
<template lang="pug">
|
||||
.container-fluid
|
||||
div
|
||||
app-menu
|
||||
br
|
||||
h1 Registro Ponencia
|
||||
.row
|
||||
.col-6.offset-2
|
||||
br
|
||||
.form-group
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Nombre del Autor pricipal')
|
||||
input#exampleInputEmail1.form-control(type='text' aria-describedby='emailHelp' v-model="autor" placeholder='Nombre del Autor pricipal')
|
||||
.form-group
|
||||
input#exampleInputPassword1.form-control(type='password' placeholder='Nombre del segundo autor')
|
||||
input#exampleInputPassword1.form-control(type='text' v-model="autorsegundo" placeholder='Nombre del segundo autor')
|
||||
.row
|
||||
.col-8.offset-2.left
|
||||
.form-check
|
||||
input#exampleRadios1.form-check-input(type='radio' name='exampleRadios' value='option1' checked='')
|
||||
input#exampleRadios1.form-check-input(type='checkbox' name='exampleRadios' v-model="ponencia" checked='')
|
||||
label.form-check-label(for='exampleRadios1')
|
||||
| Ponencia
|
||||
.row
|
||||
.row(v-if="ponencia")
|
||||
.col-8.offset-2
|
||||
.form-group
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Nombre de la Ponencia')
|
||||
input#exampleInputEmail1.form-control(type='text' aria-describedby='emailHelp' placeholder='Nombre de la Ponencia' v-model="nombrepon")
|
||||
.form-group
|
||||
select.custom-select
|
||||
option(selected='') Seleccione la mesa
|
||||
option(value='1') One
|
||||
option(value='2') Two
|
||||
option(value='3') Three
|
||||
option(selected='' v-model="mesapon") Seleccione la mesa
|
||||
option(v-for="mesa in mesas" value="mesa") {{mesa}}
|
||||
.custom-file
|
||||
input#validatedCustomFile.custom-file-input(type='file' required='')
|
||||
label.custom-file-label(for='validatedCustomFile') Seleccionar Archivo
|
||||
input.custom-file-input(type='file' required='' @change="previewPonencia" accept=".doc,.docx")
|
||||
label.custom-file-label( ref="ponenciafile" for='validatedCustomFile') Seleccionar Archivo
|
||||
small#emailHelp.form-text.text-muted
|
||||
| Instrucciones: Subir el archivo resumen de 250 palabras en word de acuerdo a
|
||||
| la convocatoria
|
||||
@@ -35,22 +34,20 @@
|
||||
.row
|
||||
.col-8.offset-2.left
|
||||
.form-check
|
||||
input#exampleRadios1.form-check-input(type='radio' name='exampleRadios' value='option1' checked='')
|
||||
input#exampleRadios1.form-check-input(type='checkbox' v-model="cartel" name='exampleRadios' value='option1' checked='')
|
||||
label.form-check-label(for='exampleRadios1')
|
||||
| Cartel
|
||||
.row
|
||||
.row(v-if="cartel")
|
||||
.col-8.offset-2
|
||||
.form-group
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Nombre de la Cartel')
|
||||
input#exampleInputEmail1.form-control(type='text' aria-describedby='emailHelp' placeholder='Nombre de la Cartel' v-model="nombrecartel")
|
||||
.form-group
|
||||
select.custom-select
|
||||
select.custom-select(v-model="mesacartel")
|
||||
option(selected='') Seleccione la mesa
|
||||
option(value='1') One
|
||||
option(value='2') Two
|
||||
option(value='3') Three
|
||||
option(v-for="mesa in mesas" value="mesa") {{mesa}}
|
||||
.custom-file
|
||||
input#validatedCustomFile.custom-file-input(type='file' required='')
|
||||
label.custom-file-label(for='validatedCustomFile') Seleccionar Archivo
|
||||
input.custom-file-input(type='file' required='' @change="previewCarta" accept=".doc,.docx")
|
||||
label.custom-file-label( ref="cartelfile" for='validatedCustomFile') Seleccionar Archivo
|
||||
small#emailHelp.form-text.text-muted
|
||||
| Instrucciones: Subir el archivo resumen de 250 palabras en word de acuerdo a
|
||||
| la convocatoria
|
||||
@@ -58,14 +55,118 @@
|
||||
.row
|
||||
.col-8.offset-2
|
||||
br
|
||||
button.btn.btn-primary(type='submit') Enviar
|
||||
button.btn.btn-primary(type='submit' v-on:click="registrar()") Enviar
|
||||
br
|
||||
br
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
import axios from 'axios'
|
||||
import Swal from 'sweetalert2'
|
||||
import webMenu from '../estetica/menu.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ponencia: false,
|
||||
cartel: false,
|
||||
autor: '',
|
||||
autorsegundo: '',
|
||||
nombrepon: '',
|
||||
nombrecartel: '',
|
||||
mesacartel: '',
|
||||
mesapon: '',
|
||||
cartelfile: '',
|
||||
ponenciafile: '',
|
||||
data: {},
|
||||
mesas: [
|
||||
'Educación inclusiva',
|
||||
'Educación y género',
|
||||
'Ética, valores y formación socioemocial',
|
||||
'Experiencias de innovación e intervención en la educación',
|
||||
'Las TIC y las TAC en la educación',
|
||||
'Lectura y escritura en la formación académica',
|
||||
'Propuestas de transformación curricular',
|
||||
'Políticas públicas para la innovación y transformación educativa',
|
||||
'Educación ambiental y bioética',
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
previewCarta(event) {
|
||||
this.cartelfile = event.target.files[0]
|
||||
// eslint-disable-next-line
|
||||
console.log(this.cartelfile.name)
|
||||
this.$refs.cartelfile.innerText = this.cartelfile.name
|
||||
},
|
||||
previewPonencia(event) {
|
||||
this.ponenciafile = event.target.files[0]
|
||||
this.$refs.ponenciafile.innerText = this.ponenciafile.name
|
||||
},
|
||||
registrar: function() {
|
||||
var formData = new FormData()
|
||||
this.data.id_persona = this.$route.params.id
|
||||
if (this.ponencia) {
|
||||
// eslint-disable-next-line
|
||||
console.log('entre')
|
||||
this.data.ponencia = {}
|
||||
this.data.ponencia.autor_principal = this.autor
|
||||
this.data.ponencia.segundo_autor = this.autorsegundo
|
||||
this.data.ponencia.nombre_trabajo = this.nombrepon
|
||||
this.data.ponencia.mesa = this.mesapon
|
||||
|
||||
formData.append('ponencia', JSON.stringify(this.data.ponencia))
|
||||
formData.append('ponencia', this.ponenciafile)
|
||||
}
|
||||
if (this.cartel) {
|
||||
this.data.cartel = {}
|
||||
this.data.cartel.autor_principal = this.autor
|
||||
this.data.cartel.segundo_autor = this.autorsegundo
|
||||
this.data.cartel.nombre_trabajo = this.nombrecartel
|
||||
this.data.cartel.mesa = this.mesacartel
|
||||
|
||||
formData.append('cartel', JSON.stringify(this.data.cartel))
|
||||
formData.append('cartel', this.cartelfile)
|
||||
}
|
||||
|
||||
formData.append('id_persona', this.$route.params.id)
|
||||
|
||||
// eslint-disable-next-line
|
||||
console.log(formData)
|
||||
axios
|
||||
.post(
|
||||
'https://venus.acatlan.unam.mx/coloquioeducacion/registro_ponencia',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response)
|
||||
Swal.fire({
|
||||
title: 'Exito',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'Aceptar',
|
||||
onClose: () => {
|
||||
this.$router.push({
|
||||
path: `/`,
|
||||
})
|
||||
},
|
||||
})
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error.response)
|
||||
})
|
||||
},
|
||||
},
|
||||
components: {
|
||||
appMenu: webMenu,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
+86
-32
@@ -1,5 +1,6 @@
|
||||
<template lang="pug">
|
||||
.container-fluid
|
||||
div
|
||||
app-menu
|
||||
.row
|
||||
.col-12
|
||||
br
|
||||
@@ -11,103 +12,156 @@
|
||||
form
|
||||
.row
|
||||
.col-4
|
||||
input.form-control(type='text' placeholder='Nombre')
|
||||
input.form-control(type='text' placeholder='Nombre' v-model="data.nombre")
|
||||
.col-4
|
||||
input.form-control(type='text' placeholder='Apellido Paterno')
|
||||
input.form-control(type='text' placeholder='Apellido Paterno' v-model="data.apellido_p")
|
||||
.col-4
|
||||
input.form-control(type='text' placeholder='Apellido Materno')
|
||||
input.form-control(type='text' placeholder='Apellido Materno' v-model="data.apellido_m")
|
||||
.row
|
||||
.col-8.offset-2.left
|
||||
br
|
||||
h2 Tipo de Participación
|
||||
h2 Tipo de Participación
|
||||
br
|
||||
.row
|
||||
.col-6
|
||||
.row
|
||||
.col-12
|
||||
.form-check.form-check-inline
|
||||
input#inlineRadio1.form-check-input(type='radio' name='inlineRadioOptions' value='option1')
|
||||
input#inlineRadio1.form-check-input(type='radio' v-model="data.tipo_participacion" name='inlineRadioOptions' value='ponente')
|
||||
label.form-check-label(for='inlineRadio1') Ponente
|
||||
.row
|
||||
.row(v-if="data.tipo_participacion=='ponente'")
|
||||
.col-11.offset-1
|
||||
.form-check
|
||||
input#exampleRadios1.form-check-input(type='radio' name='exampleRadios' value='option1' checked='')
|
||||
input#exampleRadios1.form-check-input(type='radio' v-model="data.comunidad" value='interna' checked='')
|
||||
label.form-check-label(for='exampleRadios1')
|
||||
| Comunidad Interna
|
||||
.form-check
|
||||
input#exampleRadios2.form-check-input(type='radio' name='exampleRadios' value='option2')
|
||||
input#exampleRadios2.form-check-input(type='radio' v-model="data.comunidad" value='externa')
|
||||
label.form-check-label(for='exampleRadios2')
|
||||
| Comunidad Externa
|
||||
.col-6
|
||||
.row
|
||||
.col-12
|
||||
.form-check.form-check-inline
|
||||
input#inlineRadio2.form-check-input(type='radio' name='inlineRadioOptions' value='option2')
|
||||
input#inlineRadio2.form-check-input(type='radio' v-model="data.tipo_participacion" name='inlineRadioOptions' value='asistente')
|
||||
label.form-check-label(for='inlineRadio2') Asistente
|
||||
.row
|
||||
.row(v-if="data.tipo_participacion=='asistente'")
|
||||
.col-12.offset-1
|
||||
.form-check
|
||||
input#exampleRadios1.form-check-input(type='radio' name='exampleRadios' value='option1' checked='')
|
||||
input#exampleRadios1.form-check-input(type='radio' v-model="data.comunidad" value='interna' checked='')
|
||||
label.form-check-label(for='exampleRadios1')
|
||||
| Comunidad Interna
|
||||
.form-check
|
||||
input#exampleRadios2.form-check-input(type='radio' name='exampleRadios' value='option2')
|
||||
input#exampleRadios2.form-check-input(type='radio' v-model="data.comunidad" value='externa')
|
||||
label.form-check-label(for='exampleRadios2')
|
||||
| Comunidad Externa
|
||||
.row
|
||||
.row(v-if="data.comunidad=='externa'")
|
||||
.col-8.offset-2
|
||||
br
|
||||
form
|
||||
.form-row
|
||||
.col-8
|
||||
input.form-control(type='text' placeholder='Insttitución')
|
||||
input.form-control(type='text' placeholder='Institución' v-model="data.institucion")
|
||||
.form-group.col-4
|
||||
select#inputState.form-control
|
||||
select#inputState.form-control(v-model="data.pais")
|
||||
option(selected='') Pais
|
||||
option ...
|
||||
option(v-for="pais in paises" :value="pais.nombre_pais") {{pais.nombre_pais}}
|
||||
.row
|
||||
.col-8.offset-2
|
||||
br
|
||||
.row
|
||||
.col-6.left
|
||||
h2 Situación Escolar
|
||||
h2 Situación Escolar
|
||||
.form-check
|
||||
input#exampleRadios1.form-check-input(type='radio' name='exampleRadios' value='option1' checked='')
|
||||
label.form-check-label(for='exampleRadios1')
|
||||
| Estudiante
|
||||
input#exampleRadios1.form-check-input(type='radio' name='exampleRadios' value='Profesor' v-model="data.situacion_academica" checked='')
|
||||
label.form-check-label(for='exampleRadios1') Profesor
|
||||
.form-check
|
||||
input#exampleRadios2.form-check-input(type='radio' name='exampleRadios' value='option2')
|
||||
label.form-check-label(for='exampleRadios2')
|
||||
| Estudiante de Licenciatura
|
||||
input#exampleRadios2.form-check-input(type='radio' name='exampleRadios' v-model="data.situacion_academica" value='Estudiante de Licenciatura')
|
||||
label.form-check-label(for='exampleRadios2') Estudiante de Licenciatura
|
||||
.form-check
|
||||
input#exampleRadios3.form-check-input(type='radio' name='exampleRadios' value='option3')
|
||||
label.form-check-label(for='exampleRadios3')
|
||||
| Estudiante de Posgrado
|
||||
.col-6
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Numero de Cuenta')
|
||||
input#exampleRadios3.form-check-input(type='radio' name='exampleRadios' v-model="data.situacion_academica" value='Estudiante de Posgrado')
|
||||
label.form-check-label(for='exampleRadios3') Estudiante de Posgrado
|
||||
.col-6(v-if="data.comunidad=='interna' & (data.situacion_academica=='Estudiante de Licenciatura' || data.situacion_academica=='Estudiante de Posgrado')")
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Numero de Cuenta' v-model="data.numero_cuenta")
|
||||
.row
|
||||
.col-4.offset-2
|
||||
br
|
||||
.form-group
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Correo')
|
||||
input#exampleInputEmail1.form-control(type='email' aria-describedby='emailHelp' placeholder='Correo' v-model="data.correo")
|
||||
.form-group
|
||||
input#exampleInputPassword1.form-control(type='password' placeholder='Contraseña')
|
||||
input#exampleInputPassword1.form-control(type='password' placeholder='Contraseña' v-model="data.password")
|
||||
.form-group
|
||||
input#exampleInputPassword1.form-control(type='password' placeholder='Repita la contraseña')
|
||||
.row
|
||||
.col-8.offset-2
|
||||
br
|
||||
button.btn.btn-primary(type='submit') Enviar
|
||||
button.btn.btn-primary(type='submit' v-on:click="registro()") Enviar
|
||||
br
|
||||
br
|
||||
</template>
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import Swal from 'sweetalert2'
|
||||
import webMenu from '../estetica/menu.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
msj: 'holaa',
|
||||
paises: [],
|
||||
data: {},
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
axios
|
||||
.get('https://venus.acatlan.unam.mx/coloquioeducacion/traer_pais')
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
//console.log(response.data.paises)
|
||||
this.paises = response.data.paises
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
registro: function() {
|
||||
// eslint-disable-next-line
|
||||
console.log(this.data)
|
||||
axios
|
||||
.post(
|
||||
'https://venus.acatlan.unam.mx/coloquioeducacion/registro',
|
||||
this.data
|
||||
)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
console.log(response.data)
|
||||
Swal.fire({
|
||||
title: 'Exito',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'Aceptar',
|
||||
onClose: () => {
|
||||
if (this.data.tipo_participacion == 'asistente') {
|
||||
this.$router.push({
|
||||
path: `/`,
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$router.push({
|
||||
path: `/ponencia/${response.data.id_persona}`,
|
||||
})
|
||||
},
|
||||
})
|
||||
})
|
||||
.catch(function(error) {
|
||||
// eslint-disable-next-line
|
||||
console.log(error.response)
|
||||
})
|
||||
},
|
||||
},
|
||||
components: {
|
||||
appMenu: webMenu,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user