(window.webpackJsonp=window.webpackJsonp||[]).push([[217],{878:function(t,e,o){var content=o(913);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(122).default)("e4f1e3c2",content,!0,{sourceMap:!1})},912:function(t,e,o){"use strict";o(878)},913:function(t,e,o){var l=o(121)(!1);l.push([t.i,".title-colunas[data-v-3d8d9106]{font-size:12px;color:#4b5563}.div-colunas[data-v-3d8d9106]{height:276px;overflow:auto;border:1px solid rgba(0,0,0,.125);border-radius:5px;font-size:13px!important}",""]),t.exports=l},924:function(t,e,o){"use strict";o.r(e);var l=o(63),n=(o(38),o(25),o(15),o(888)),c={name:"CardSelecaoRelatorio",components:{draggable:o.n(n).a},props:{ficha:{type:String,required:!0},downloadExcel:{type:Function,required:!0}},data:function(){return{colunas:[],colunasSelected:[]}},mounted:function(){this.findColunas()},methods:{findColunas:function(){var t=this;this.$coreService.findEntidadeDicionario("MAM",this.ficha).then((function(e){var o=e.data||[];t.colunas=o.map((function(t){return{text:t.label,value:t.name}}))}))},closeModal:function(){this.colunasSelected=[]},toggleAll:function(){0!==this.colunas.length&&(this.colunasSelected=[].concat(Object(l.a)(this.colunasSelected),Object(l.a)(this.colunas)),this.colunas=[])},untoggleAll:function(){0!==this.colunasSelected.length&&(this.colunas=[].concat(Object(l.a)(this.colunas),Object(l.a)(this.colunasSelected)),this.colunasSelected=[])}}},r=(o(912),o(42)),component=Object(r.a)(c,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-modal",{attrs:{id:"modal-selecao-relatorio",size:"lg",centered:"","hide-header-close":"","hide-footer":"",scrollable:""},on:{shown:function(e){return t.findColunas()},hidden:function(e){return t.closeModal()}},scopedSlots:t._u([{key:"modal-header",fn:function(){return[o("div",{staticClass:"d-flex"},[o("fa-icon",{staticStyle:{"font-size":"1.2rem"},attrs:{icon:"file-excel"}}),t._v(" "),o("h4",{staticClass:"ml-2"},[t._v("Seleção de colunas do relatório")])],1)]},proxy:!0}])},[t._v(" "),o("b-row",[o("b-col",{attrs:{cols:"5"}},[o("h5",{staticClass:"title-colunas"},[t._v("Colunas Disponíveis")]),t._v(" "),o("draggable",{staticClass:"list-group div-colunas",attrs:{draggable:".item",list:t.colunas,group:"cols"}},t._l(t.colunas,(function(e){return o("div",{key:e.value,staticClass:"list-group-item cursor-move item"},[t._v("\n          "+t._s(e.text)+"\n        ")])})),0)],1),t._v(" "),o("b-col",{staticClass:"d-flex flex-column justify-content-center",attrs:{cols:"2"}},[o("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mb-2",attrs:{title:"Selecionar todas",variant:"outline-primary"},on:{click:t.toggleAll}},[o("fa-icon",{attrs:{icon:"angles-right"}})],1),t._v(" "),o("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mb-2",attrs:{title:"Deselecionar todas",variant:"outline-primary"},on:{click:t.untoggleAll}},[o("fa-icon",{attrs:{icon:"angles-left"}})],1)],1),t._v(" "),o("b-col",{attrs:{cols:"5"}},[o("h5",{staticClass:"title-colunas"},[t._v("Colunas Selecionadas")]),t._v(" "),o("draggable",{staticClass:"list-group div-colunas",attrs:{draggable:".item",list:t.colunasSelected,group:"cols"}},t._l(t.colunasSelected,(function(e){return o("div",{key:e.value,staticClass:"list-group-item cursor-move item"},[t._v("\n          "+t._s(e.text)+"\n        ")])})),0)],1)],1),t._v(" "),o("b-row",{staticClass:"mt-3"},[o("b-col",[o("b-button",{staticClass:"my-2 rounded",attrs:{size:"sm",variant:"primary"},on:{click:function(){return t.downloadExcel(t.colunasSelected.map((function(t){return t.value})))}}},[o("fa-icon",{attrs:{icon:"file-excel"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Baixar")])],1),t._v(" "),o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:function(e){return t.$bvModal.hide("modal-selecao-relatorio")}}},[o("fa-icon",{attrs:{icon:"times"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Fechar")])],1)],1)],1)],1)}),[],!1,null,"3d8d9106",null);e.default=component.exports}}]);
//# sourceMappingURL=b41ec6b-1.2.11.js.map