(window.webpackJsonp=window.webpackJsonp||[]).push([[283],{1871:function(e,t,c){"use strict";c.r(t);c(6),c(5),c(7),c(4),c(12),c(8),c(13);var n=c(2),r=(c(15),c(78));function o(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(object);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,c)}return t}function l(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?o(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):o(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var m={name:"InfoWindowMapAmbiental",props:{itemSelected:{type:Object,default:null}},data:function(){return{urlAnexo:"",images:[]}},computed:l(l({},Object(r.c)({empresa:"empresa/empresaAtual"})),{},{detailLink:function(){var e;if(null===(e=this.itemSelected)||void 0===e||!e.informacao)return!1;var t=this.itemSelected.informacao,path="/#/ambiental/fichas/";if("RAC"===t.tipoFicha)path+="rac/"+t.idRac;else{if("INSPECAO"!==t.tipoFicha)return!1;path+="inspecaoAmbiental/"+t.idInspecao}return path}}),watch:{itemSelected:function(){this.itemSelected.informacao.ultimaFicha&&this.getUltimoAnexo()}},methods:{openImage:function(){this.images=[];var e=[];e.push({url:"".concat(this.urlAnexo)}),this.images=e,this.$imageViewer.images(e),this.$imageViewer.show()},getUltimoAnexo:function(){var e=this,t=this.itemSelected.informacao.ultimaFicha;this.$fichasRacService.findAnexosFicha(this.empresa.sigla,t.id.idRac,t.id.sequencia).then((function(t){var n=t.data,r=n[n.length-1];r.anexo.uuid.length>30?e.urlAnexo="".concat("/api","/api/downloads/").concat(e.empresa.sigla,"/thumbs/MAM/").concat(r.anexo.uuid):e.urlAnexo="".concat(c(845))}))}}},d=c(42),component=Object(d.a)(m,(function(){var e=this,t=e.$createElement,c=e._self._c||t;return e.itemSelected?c("b-row",[c("b-col",{attrs:{md:"12"}},[e.itemSelected.descricao?c("div",[c("div",{staticClass:"iw-subTitle"},[e._v("Descrição")]),e._v(" "),c("p",[e._v("\n        "+e._s(e.itemSelected.descricao.length>500?e.itemSelected.descricao.slice(0,500)+"...":e.itemSelected.descricao)+"\n      ")])]):e._e()]),e._v(" "),c("b-col",{attrs:{md:"12"}},[e.itemSelected.informacao.inpecao?c("div",[c("div",{staticClass:"iw-subTitle"},[e._v("Data Inspeção")]),e._v(" "),c("p",[e._v("\n        "+e._s(e._f("formatDate")(e.itemSelected.informacao.inpecao))+"\n      ")])]):e._e()]),e._v(" "),c("b-col",{attrs:{md:"12"}},[e.itemSelected.informacao.prazo?c("div",[c("div",{staticClass:"iw-subTitle"},[e._v("Prazo")]),e._v(" "),c("p",[e._v("\n        "+e._s(e.itemSelected.informacao.prazo)+"\n      ")])]):e._e()]),e._v(" "),e.itemSelected.informacao.ultimaFicha?c("b-col",{attrs:{md:"12"}},[c("div",{staticClass:"iw-subTitle"},[e._v("Última Imagem da Ficha")]),e._v(" "),c("div",{staticClass:"d-flex justify-content-center"},[c("b-img",{staticStyle:{width:"auto",height:"140px",border:"solid 1px black"},attrs:{src:e.urlAnexo},on:{click:function(t){return e.openImage()}}})],1)]):e._e(),e._v(" "),e.detailLink?c("b-col",{attrs:{md:"12"}},[c("div",{staticClass:"d-flex justify-content-center mt-4"},[c("a",{attrs:{href:e.detailLink,target:"_blank"}},[c("b-button",{staticClass:"rounded",attrs:{size:"sm",variant:"primary"}},[c("fa-icon",{attrs:{icon:"info-circle"}}),e._v(" "),c("span",{staticClass:"ml-1"},[e._v("Detalhes")])],1)],1)])]):e._e()],1):e._e()}),[],!1,null,null,null);t.default=component.exports},845:function(e,t,c){e.exports=c.p+"img/img_white.e28690e-1.2.11.png"}}]);
//# sourceMappingURL=adf0c71-1.2.11.js.map