carta termino y cuestionario listos
This commit is contained in:
@@ -33,11 +33,9 @@
|
||||
</div>
|
||||
|
||||
<b-field class="column is-4">
|
||||
<b-select
|
||||
placeholder="Seleccionar"
|
||||
v-model="retroalimentacion[i]"
|
||||
expanded
|
||||
>
|
||||
<b-select v-model="retroalimentacion[i]" expanded>
|
||||
<option value="" disabled>Seleccionar</option>
|
||||
|
||||
<option v-for="(sR, i) in selectRespuestas" :key="i" :value="i + 1">
|
||||
{{ sR }}
|
||||
</option>
|
||||
@@ -96,7 +94,7 @@ export default {
|
||||
p7: '',
|
||||
idServicio: null,
|
||||
actividades: [],
|
||||
retroalimentacion: [],
|
||||
retroalimentacion: ['', '', '', '', ''],
|
||||
selectRespuestas: ['Deficiente', 'Regular', 'Bueno', 'Excelente'],
|
||||
unoAlCinco: [
|
||||
'Conocimiento teóricos para las funciones encomendadas.',
|
||||
|
||||
@@ -41,6 +41,7 @@ import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
idServicio: { type: Number, required: true },
|
||||
path: { type: String, required: true },
|
||||
tipoCarta: { type: String, required: true },
|
||||
variableName: { type: String, required: true },
|
||||
@@ -52,7 +53,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
idServicio: null,
|
||||
file: {},
|
||||
}
|
||||
},
|
||||
@@ -90,9 +90,6 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.idServicio = Number(localStorage.getItem('idServicio'))
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
path="carta_termino"
|
||||
tipoCarta="termino"
|
||||
variableName="cartaTermino"
|
||||
: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: {},
|
||||
}
|
||||
},
|
||||
@@ -54,6 +57,21 @@ 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',
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user