(window.webpackJsonp=window.webpackJsonp||[]).push([[365],{1902:function(e,t,r){"use strict";r.r(t);r(6),r(5),r(7),r(4),r(12),r(8),r(13);var o=r(2),n=r(78);function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}var d={name:"Indicador",data:function(){return{indicadores:[],fieldsIndicadores:[{key:"tipo",label:"Tipo"},{key:"subtipo",label:"Subtipo"},{key:"kmInicialIndicadores",label:"KM Inicial"},{key:"kmFinalIndicadores",label:"KM Final"},{key:"quantidadeOcorrencias",label:"Quantidade/Ocorrências"},{key:"cadastro",label:"Cadastro"},{key:"alteracao",label:"Alteração"}],selectMode:"single",busy:!1,sortDesc:!1,currentPage:1,perPage:5}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(t){Object(o.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({rows:function(){return this.indicadores.length}},Object(n.c)({empresa:"empresa/empresaAtual",idTrecho:"cadastros/trechos/idTrecho",rodovia:"cadastros/trechos/rodovia"})),watch:{idTrecho:function(){null!==this.idTrecho&&this.findCoordenadas()}},mounted:function(){this.findCoordenadas()},methods:{findCoordenadas:function(){var e=this;this.$rodoviaService.findCoordenadas(this.empresa.sigla,this.rodovia).then((function(t){e.indicadores=t.data})).catch((function(t){e.$notify({title:"Erro",text:t.response?t.response.data.message:t,type:"error"})}))},editIndicador:function(){}}},l=d,f=r(42),component=Object(f.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("b-row",[r("b-col",{attrs:{cols:"12"}},[r("b-table",{staticClass:"mt-3",staticStyle:{"overflow-x":"scroll"},attrs:{fields:e.fieldsIndicadores,items:e.indicadores,responsive:"sm",selectable:"","empty-text":"Não há dados disponíveis.","show-empty":"","current-page":e.currentPage,"per-page":e.perPage,"sort-desc":e.sortDesc,"select-mode":e.selectMode,busy:e.busy},on:{"update:sortDesc":function(t){e.sortDesc=t},"update:sort-desc":function(t){e.sortDesc=t},"row-clicked":e.editIndicador},scopedSlots:e._u([{key:"table-busy",fn:function(){return[r("div",{staticClass:"text-center text-info my-2"},[r("b-spinner",{staticClass:"align-middle"}),e._v(" "),r("strong",[e._v("Carregando...")])],1)]},proxy:!0}])}),e._v(" "),e.indicadores.length>0?r("b-row",[r("b-col",{attrs:{"align-self":"end"}},[r("div",{staticClass:"text-right"},[r("b",[e._v("Itens:")]),e._v(" "+e._s(e.indicadores.length))])])],1):e._e(),e._v(" "),e.indicadores.length>5?r("b-pagination",{attrs:{"total-rows":e.rows,"per-page":e.perPage,align:"center",pills:""},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)}),[],!1,null,null,null);t.default=component.exports}}]);
//# sourceMappingURL=01cac2c-1.2.11.js.map