Created
January 31, 2019 19:00
-
-
Save roberGzt/655c8e0433dececc40056e21535d6af8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('form-datos-evento', { | |
props: { | |
evento: Object | |
}, | |
data: function () { | |
return { | |
riesgos: [] | |
}; | |
}, | |
watch: { | |
evento: { | |
handler: function () { | |
this.$parent.$emit("eventoChange", this.evento); | |
}, | |
deep: true | |
}, | |
estructuraOrganizativaId: { | |
handler: function () { | |
} | |
}, | |
'evento.estructuraOrganizativaId': { | |
handler: function () { | |
console.log("buscando riesgos"); | |
ro.ui.service.riesgoService | |
.obtenerPorEstructuraOrganizativaId(this.evento.estructuraOrganizativaId) | |
.done((_riesgos) => { | |
this.riesgos.splice(0, this.riesgos.length); | |
Object.assign(this.riesgos, _riesgos); | |
}); | |
} | |
} | |
}, | |
methods: { | |
}, | |
created: function () { | |
}, | |
template: document.getElementById("pnt-template-form-datos-evento").innerHTML | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment