(window.webpackJsonp=window.webpackJsonp||[]).push([[769],{2026:function(t,e,n){"use strict";n.r(e);var o={props:{idDrenagem:{type:String,default:function(){return""}},dadosAnexos:{type:Array,default:function(){return[]}}},data:function(){return{fieldsAnexos:[{key:"nome",label:"Nome",thStyle:{width:"90% !important"}},{key:"actions",label:"Ações",thStyle:{width:"10% !important"}}]}},computed:{anexos:{get:function(){return this.dadosAnexos},set:function(t){return this.$emit("update:dadosAnexos",t)}}},methods:{openModalAnexo:function(){this.$bvModal.show("modalAnexo")}}},r=n(42),component=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-card",{staticClass:"mt-2"},[n("div",{attrs:{slot:"header"},slot:"header"},[n("h4",{staticClass:"primary mt-4"},[t._v("Imagens/Anexos")])]),t._v(" "),n("b-row",[n("b-col",{attrs:{cols:"9"}}),t._v(" "),n("b-col",{attrs:{cols:"3"}},[n("div",{staticClass:"d-flex justify-content-end"},[n("b-button",{staticClass:"rounded",attrs:{size:"sm",variant:"primary"},on:{click:t.openModalAnexo}},[n("fa-icon",{attrs:{icon:"file"}}),t._v(" "),n("span",{staticClass:"ml-2"},[t._v("Adicionar")])],1)],1)])],1),t._v(" "),n("b-row",[n("b-col",{attrs:{cols:"12"}},[n("b-table",{staticClass:"mt-2",attrs:{striped:"",hover:"",fields:t.fieldsAnexos,items:t.anexos,"show-empty":!0,"empty-text":"Não há anexos/imagens incluídas."},scopedSlots:t._u([{key:"table-busy",fn:function(){return[n("div",{staticClass:"text-center text-info my-2"},[n("b-spinner",{staticClass:"align-middle"}),t._v(" "),n("strong",[t._v("Carregando...")])],1)]},proxy:!0},{key:"cell(nome)",fn:function(e){return[t._v(t._s(e.item.anexo.nome))]}},{key:"cell(actions)",fn:function(e){return[n("b-button",{staticClass:"btn-table",attrs:{variant:"outline-primary",title:"Visualizar Imagem"},on:{click:function(n){return t.viewImagem(e.item.idAnexo)}}},[n("fa-icon",{staticClass:"text-primary btn-table-text",attrs:{icon:"image"}})],1),t._v(" "),n("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-table",attrs:{variant:"outline-danger",title:"Excluir Anexo"},on:{click:function(n){return t.deleteFile(e.item)}}},[n("fa-icon",{staticClass:"text-danger btn-table-text",attrs:{icon:"trash-alt"}})],1)]}}])}),t._v(" "),n("drenagem-anexo",{attrs:{"find-anexos":t.findAnexos,"id-ativo":t.idDrenagem},model:{value:t.anexos,callback:function(e){t.anexos=e},expression:"anexos"}})],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=aeccd86-1.2.11.js.map