(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{1531:function(t,e,r){"use strict";r.r(e);r(11),r(10),r(5),r(12),r(13);var n=r(1),o=(r(4),r(8),r(203),r(74));function c(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function l(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var d={name:"CardTabela",props:{dados:{type:Object,default:function(){},required:!0},dadosEstrutura:{type:Array,default:function(){return[]},required:!0},dadosTabela:{type:Array,default:function(){return[]},required:!0}},data:function(){return{pesos:[]}},computed:l(l({},Object(o.c)({empresa:"empresa/empresaAtual"})),{},{dadosComputados:{get:function(){return this.dados},set:function(t){this.$emit("update:dados",t)}},dadosComputadosTabela:{get:function(){return this.dadosTabela},set:function(t){this.$emit("update:dadosTabela",t)}},tableRows:function(){var t=this,e=[];return this.dadosEstrutura.forEach((function(r,o){var c=e.findIndex((function(t){return t.numero===r.numero}));c>=0?e[c][o]=r.valorCalculado:e.push(Object(n.a)({numero:r.numero,idFicha:r.idFicha},o,r.valorCalculado)),t.pesos.push(r.peso)})),e}}),methods:{getPeso:function(t){return void 0===t?"":"A"===t||"C"===t?"1":"N"===t||"N/C"===t?"-1":"N/A"===t?"0":t},openChecklist:function(t){var path="";if("MAM"===this.moduloAtual&&(path="/ambiental/fichas/checklist/".concat(t.idCheckList)),path){var e=this.$router.resolve({path:path});window.open(e.href,"_blank")}}}},f=r(37),component=Object(f.a)(d,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-card",[r("div",{staticClass:"mt-4",attrs:{slot:"header"},slot:"header"},[r("b-row",[r("b-col",{staticClass:"d-flex justify-content-start"},[r("fa-icon",{staticStyle:{"font-size":"1.3rem"},attrs:{icon:"table"}}),t._v(" "),r("h3",{staticClass:"ml-3"},[t._v("Itens verificáveis")])],1)],1)],1),t._v(" "),r("b-row",[r("b-col",[r("b-table-simple",{ref:"table",staticStyle:{"overflow-x":"scroll"},attrs:{responsive:"sm",bordered:"",hover:""}},[r("b-thead",{attrs:{"head-variant":"light"}},[r("b-tr",[r("b-th",{attrs:{colspan:2}}),t._v(" "),r("b-th",{attrs:{colspan:2+t.dadosEstrutura.length}},[t._v("IQMA")])],1),t._v(" "),r("b-tr",[r("b-th",{attrs:{colspan:2}}),t._v(" "),t._l(t.pesos,(function(e,n){return r("b-th",{key:e+n},[t._v("\n              "+t._s(e)+"\n            ")])}))],2)],1),t._v(" "),r("b-tbody",t._l(t.tableRows,(function(e,n){return r("b-tr",{key:e+n},[r("b-th",{attrs:{colspan:2}},[r("div",{staticClass:"d-flex flex-column mb-1"},[r("a",{attrs:{href:"#/ambiental/fichas/checklist/"+e.idFicha,target:"_blank",rel:"noopener noreferrer"}},[t._v("\n                  "+t._s(e.numero)+"\n                ")])])]),t._v(" "),t._l(t.pesos,(function(n,o){return r("b-td",{key:"td"+o},[r("span",[t._v(t._s(t.getPeso("N")))]),r("br"),t._v(" "),r("span",[t._v(t._s(e[o]))])])}))],2)})),1)],1)],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=d06105d-1.2.10.js.map