Skip to content

Instantly share code, notes, and snippets.

@roberGzt
Created January 31, 2019 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roberGzt/655c8e0433dececc40056e21535d6af8 to your computer and use it in GitHub Desktop.
Save roberGzt/655c8e0433dececc40056e21535d6af8 to your computer and use it in GitHub Desktop.
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