tipo de entrada y programas
This commit is contained in:
parent
6ab72d0a07
commit
af592df9a9
@ -9,7 +9,7 @@
|
||||
:key="index"
|
||||
:value="s.id_status"
|
||||
v-show="equipo.id_equipo"
|
||||
:disabled="disabled('status', equi.id_equipo)"
|
||||
:disabled="disabledS(s.id_status, equipo.status.id_status)"
|
||||
>
|
||||
{{ s.status }}
|
||||
</option>
|
||||
@ -25,9 +25,10 @@
|
||||
<option
|
||||
v-for="(tipoEntrada, index) in tipoEntradas"
|
||||
:key="index"
|
||||
:value="tipoEntrada.tipoEntrada.id_tipo_entrada"
|
||||
:value="tipoEntrada.id_tipo_entrada"
|
||||
:disabled="disabledT(tipoEntrada.id_tipo_entrada)"
|
||||
>
|
||||
{{ tipoEntrada.tipoEntrada.tipo_entrada }}
|
||||
{{ tipoEntrada.tipo_entrada }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
@ -37,9 +38,10 @@
|
||||
<option
|
||||
v-for="(programa, index) in programas"
|
||||
:key="index"
|
||||
:value="programa.programa.id_programa"
|
||||
:value="programa.id_programa"
|
||||
:disabled="disabledP(programa.id_programa)"
|
||||
>
|
||||
{{ programa.programa.programa }}
|
||||
{{ programa.programa }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
@ -121,7 +123,26 @@ export default {
|
||||
return false
|
||||
return true
|
||||
},
|
||||
disabled(tipo, id) {},
|
||||
disabledS(idStatus, idStatusEquipo) {
|
||||
if (idStatus > 1 && idStatus < 4) return true
|
||||
if (idStatusEquipo === 2 || idStatusEquipo === 3) return true
|
||||
else return false
|
||||
},
|
||||
disabledT(idTipoEntrada) {
|
||||
for (let i = 0; i < this.equipo.tiposEntradas.length; i++) {
|
||||
if (
|
||||
this.equipo.tiposEntradas[i].tipoEntrada.id_tipo_entrada ===
|
||||
idTipoEntrada
|
||||
)
|
||||
return true
|
||||
}
|
||||
},
|
||||
disabledP(idPrograma) {
|
||||
for (let i = 0; i < this.equipo.programas.length; i++) {
|
||||
if (this.equipo.programas[i].programa.id_programa === idPrograma)
|
||||
return true
|
||||
}
|
||||
},
|
||||
updateInformacion() {
|
||||
if (
|
||||
this.idStatus != this.equipo.status.id_status ||
|
||||
@ -231,10 +252,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoProgramas() {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-programa/programas-mostrar?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.operador.token
|
||||
)
|
||||
.get(`${process.env.api}/institucion-programa`, this.operador.token)
|
||||
.then((res) => {
|
||||
this.programas = res.data
|
||||
})
|
||||
@ -244,10 +262,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoTipoEntradas() {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-entrada/tipos-entrada-mostrar?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.operador.token
|
||||
)
|
||||
.get(`${process.env.api}/institucion-tipo-entrada`, this.operador.token)
|
||||
.then((res) => {
|
||||
this.tipoEntradas = res.data
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user