(window.webpackJsonp=window.webpackJsonp||[]).push([[784],{1378:function(t,e,o){"use strict";o.r(e);o(25),o(4),o(8),o(208);var r=o(70),n=o(370),c=o(393),l=o(391);Object(r.a)([n.a,c.a,l.a]);var d={props:{chartData:{type:Array,required:!0},getChartSerie:{type:Function,required:!0},handleSelect:{type:Function,default:function(){return null}},tipoAtivo:{type:String,default:function(){return"???"}},subtitulo:{type:String,default:function(){return""}}},data:function(){return{updateCount:0}},computed:{chartOption:function(){var t=this,option={title:{text:"Monitoração"},legend:{top:"bottom"},tooltip:{trigger:"item"},xAxis:[{type:"category",data:[]}],yAxis:[{type:"value"}],series:[]};return void 0!==this.subtitulo&&""!==this.subtitulo&&(option.yAxis[0].name=this.getNameSubTitulo(this.subtitulo),option.yAxis[0].nameGap=30,option.yAxis[0].nameLocation="center"),this.chartData.forEach((function(e){var o=e.classificacao,r=e.categoria,n=e.horasDisponiveis,c=e.horasIndisponiveis;console.log("kilometro ==> ",r),console.log("classificacao ==> ",o),option.xAxis[0].data.push(r);var l=option.xAxis[0].data.findIndex((function(t){return t===r}));if(void 0!==n){console.log("horasDisponiveis->",n);var d=t.getChartSerie("horasDisponiveis");void 0===d.data&&(d.data=[]),d.data[l]=n,option.series.push(d)}if(void 0!==c){console.log("horasIndisponiveis->",c);var h=t.getChartSerie("horasIndisponiveis");void 0===h.data&&(h.data=[]),h.data[l]=c,option.series.push(h)}console.log("option.series=>",option.series)})),option}},watch:{chartData:function(){this.updateCount++}},methods:{getNameSubTitulo:function(t){var text="";return"PAV"===this.tipoAtivo&&("ATR"===t?text="Flechas nas trilhas de roda":"TRI"===t?text="Percentual de área trincada":"FC2"===t?text="Áreas afetadas por trincas interligadas":"IRI"===t?text="IRI 1000m":"DC"===t?text="FWD":"IGG"===t?text="IGG":"DEG"===t?text="Degrau":"HS"===t?text="Aderência (HS)":"VRD"===t?text="Aderência (VRD)":"ICP"===t&&(text="ICP")),text}}},h=o(42),component=Object(h.a)(d,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-card",[0===t.chartData.length?o("b-alert",{attrs:{show:"",variant:"info"}},[o("fa-icon",{staticClass:"mr-1",staticStyle:{"font-size":"1.2rem"},attrs:{icon:"circle-info"}}),t._v(" "),o("span",[t._v(" Não há dados para o filtro informado. ")])],1):t._e(),t._v(" "),o("v-chart",{key:t.updateCount,staticClass:"chart",attrs:{option:t.chartOption,autoresize:""},on:{click:t.handleSelect}})],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=2046508-1.2.11.js.map