(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41c24df2"],{"0af7":function(t,e,n){},"28b8":function(t,e,n){"use strict";n("0af7")},3647:function(t,e,n){},a12e:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"tableWarp",staticClass:"tableWarp"},[t._t("extra_",null,{slot:"extra"}),n("div",{staticClass:"table-operator"},[n("a-row",{attrs:{type:"flex",gutter:24,justify:"space-between"}},[n("a-col",{attrs:{xl:16,lg:16,md:16,sm:16}},[n("a-button",{attrs:{type:"primary",icon:"download"}},[t._v("导出")]),n("h5",{staticStyle:{display:"inline-block"}},[t._v(t._s(t.cggraphreportData.head.annotation))])],1),n("a-col",{staticStyle:{"text-align":"end"},attrs:{xl:4,lg:4,md:4,sm:4}},[n("a-switch",{attrs:{"checked-children":"分页","un-checked-children":"分页"},model:{value:t.ipagination,callback:function(e){t.ipagination=e},expression:"ipagination"}})],1)],1)],1),n("a-table",{attrs:{size:"middle",bordered:"",rowKey:function(t,e){return e},columns:t.columns,"data-source":t.getTableAddTotalRow,pagination:t.ipagination,scroll:{x:t.getTableScroll}},scopedSlots:t._u([t._l(Object.keys(t.customRender),(function(e,a){return{key:e,fn:function(i,r,o){return[n("div",{key:a,staticClass:"custom-render",domProps:{innerHTML:t._s(t.customRender[e](i,r))},on:{click:function(e){return t.addComment(i,r,o,e)}}})]}}}))],null,!0)})],2)},i=[],r=n("d346"),o=r["a"],s=(n("c050"),n("28b8"),n("2877")),c=Object(s["a"])(o,a,i,!1,null,"5995f912",null);e["default"]=c.exports},c050:function(t,e,n){"use strict";n("3647")},d346:function(module,__webpack_exports__,__webpack_require__){"use strict";var _components_dict_JDictSelectUtil__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("89f2");function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}__webpack_exports__["a"]={name:"GraphreportAutoTable",computed:{getTableAddTotalRow:function(){var t;if("json"===this.cggraphreportData.head.dataType?t=JSON.parse(JSON.stringify(this.chartData)):"sql"!==this.cggraphreportData.head.dataType&&"bean"!==this.cggraphreportData.head.dataType||(t=JSON.parse(JSON.stringify(this.cggraphreportData.data.data))),!this.isTotal)return t;var e="rowIndex",n=_defineProperty({},e,"合计");return this.columns.forEach((function(a){var i=a.key,r=a.dataIndex;if(![i,r].includes(e)){var o=0;t.forEach((function(t){o+=/^\d+\.?\d?$/.test(t[r])?Number.parseFloat(t[r]):Number.NaN})),!Number.isNaN(o)&&a.isTotal||(o="-"),n[r]=o}})),t.push(n),t},getTableScroll:function(){var t=100*this.columns.length-40;return t<this.tableWarpWidth&&this.columns.forEach((function(t){"rowIndex"!==t.dataIndex&&delete t.width})),t>this.tableWarpWidth&&t}},data:function(){return{columns:[],rowIndexColumns:{title:"#",dataIndex:"rowIndex",width:60,align:"center",fixed:"left",customRender:function(t,e,n){return parseInt(n)+1}},rowIndexTotalColumns:{title:"#",dataIndex:"rowIndex",width:60,align:"center",fixed:"left",customRender:function(t,e,n){return"合计"!==t?parseInt(n)+1:t}},customRender:{},ipagination:!0,spinning:!0,tableWarpWidth:0,isTotal:!1}},props:["items","cggraphreportData","chartData"],watch:{items:{handler:function(t,e){this.getColunms()},deep:!0}},mounted:function(){var t=this;this.$nextTick((function(){t.$refs.tableWarp&&(t.tableWarpWidth=t.$refs.tableWarp.offsetWidth),t.getColunms()}))},methods:{getColunms:function getColunms(){var _this2=this,that=this;that.columns=[this.rowIndexColumns];var items=JSON.parse(JSON.stringify(this.items));items.sort((function(t,e){return t.orderNum-e.orderNum})),items.forEach((function(item,i){if(item.isShow){var column={title:item.fieldTxt,align:"center",dataIndex:item.fieldName,isTotal:item.isTotal,width:item.fieldWidth||100};if(item.dictCode&&(column.customRender=function(t,e,n){return Object(_components_dict_JDictSelectUtil__WEBPACK_IMPORTED_MODULE_0__["b"])(item.dictCode,t)}),item.jsEnhance){column.scopedSlots={customRender:column.dataIndex};var obj=eval("("+item.jsEnhance+")");that.customRender[column.dataIndex]=obj.customRender}that.columns.push(column)}item.isTotal&&(_this2.isTotal=!0)})),this.isTotal&&that.columns.splice(0,1,this.rowIndexTotalColumns),that.getTableScroll?this.rowIndexColumns.fixed="left":this.rowIndexColumns.fixed=!1},addComment:function addComment(text,record,index,$event){var domClick=$event.target.getAttribute("@click");domClick&&(domClick=eval("("+domClick+")"),domClick.call(this,text,record,index))}}}}}]);