"use strict";(this.webpackChunk_lingxiteam_pcfactory=this.webpackChunk_lingxiteam_pcfactory||[]).push([[21],{63260:function(e,n,o){o.r(n);var t=o(7896),a=o(33028),l=o(31461),c=o(70247),r=o(72779),i=o.n(r),u=o(90359),d=o.n(u),s=o(92849),p=o(19631),m=o(52754),f=o(5006),g=o(76264),w=o(21853),S=o(84707),v=o(43753),C=o(80693),R=o(71942),b=o(39708),h=o(18565),D=["dataSource","visible","style","className","onChange","$$componentItem","getEngineApis","backgroundType","innerDataSource","currentRowKey","outerDataSource","setInnerDataSource","selectedRows","onRowSelected","colServiceData","loading","rowSelection","innerClassName","isBordered","expandable","onRowSelectClick"],y=d().forwardRef((function(e,n){e.dataSource;var o=e.visible,r=void 0===o||o,y=e.style,k=e.className,I=e.onChange,x=e.$$componentItem,Z=e.getEngineApis,E=e.backgroundType,W=e.innerDataSource,N=e.currentRowKey,B=e.outerDataSource,T=e.setInnerDataSource,L=e.selectedRows,M=e.onRowSelected,A=e.colServiceData,K=e.loading,_=e.rowSelection,$=e.innerClassName,F=e.isBordered,Y=e.expandable,z=e.onRowSelectClick,J=(0,l.Z)(e,D),O=x.uid,j=c.Form.useForm()[0],q=null==Z?void 0:Z(),G=q||{},H=G.sandBoxSafeRun,P=G.dataState,Q=(0,S.b)(q).getLocale,U=(0,f.B)(H,Q),V=(null==e?void 0:e.appId)||(null==x?void 0:x.appId),X=(null==e?void 0:e.pageId)||(null==x?void 0:x.pageId),ee=(0,C.Z)({backgroundType:E,engineApis:q,appId:null==x?void 0:x.appId,mode:"engine"}).backgroundStyle,ne=(0,v.Jg)((function(){var e=new Map;return{getRealIndexById:function(n){if(e.has(n))return e.get(n);var o=(W||[]).findIndex((function(e){return e[N]===n}));return-1!==o&&e.set(n,o),o}}}),[W,N]).getRealIndexById,oe=(0,g.at)((0,a.Z)((0,a.Z)({},e),{},{funcExpExecute:U,innerDataSource:W,outerDataSource:B,setInnerDataSource:T,currentRowKey:N,selectedRows:L,onRowSelected:M,engineApis:q})),te=oe.onRowDeleteClick,ae=oe.onRowEditClick,le=oe.onRowDetailClick,ce=oe.onRowClick,re=oe.onRowDoubleClick,ie=(0,g.S_)((0,a.Z)((0,a.Z)({},e),{},{sandBoxSafeRun:H,funcExpExecute:U,engineApis:q,form:j,appId:V,pageId:X,compId:O,innerDataSource:W,currentRowKey:N,colServiceData:A,onRowDetailClick:le,onRowDeleteClick:te,onRowEditClick:ae,loading:K,rowSelection:_,getLocale:Q,getRealIndexById:ne})),ue=ie.tableRef,de=ie.finalcolumns,se=ie.columnWidth,pe=ie.setColumnWidth,me=ie.initLoadColWidth,fe=ie.customCols,ge=ie.hasLevelData,we=(0,g.vO)((0,a.Z)((0,a.Z)({},e),{},{initLoadColWidth:me,finalcolumns:de,columnWidth:se,setColumnWidth:pe,sortDataSource:W})),Se=we.scroll,ve=we.tableWrapRef,Ce=we.initTableWrapWidthRef,Re=we.getTableWrapWidth,be=we.scrollClassName,he=(0,u.useRef)();he.current||(he.current={});var De={};null!=y&&y.overflowY&&(De.overflowY=y.overflowY);var ye=(0,u.useMemo)((function(){var e=(0,a.Z)((0,a.Z)({},ee),y),n=Re();if(ve.current&&n){var o=n>=Ce.current-10?Ce.current-9:n;e.width="".concat(o,"px")}return e}),[se,ee]),ke=(0,u.useMemo)((function(){return function(e){return d().createElement(p.Z,(0,t.Z)({},e,{tableData:W,childrenColumnName:Y.childrenColumnName}))}}),[W,Y.childrenColumnName]),Ie=(0,b.Z)({visibleColumns:fe,hasLevelData:ge}).levelTableColSpanMap;return r?d().createElement(R.W,{loading:K,levelTableColSpanMap:Ie},d().createElement("div",{"data-compid":null==e?void 0:e["data-compid"],style:ye,className:i()("ued-table-wrap",k,be),ref:ve},d().createElement(m.Z,(0,t.Z)({},J,{source:"engine",columns:[],sandBoxSafeRun:H,engineApis:q})),d().createElement(c.Form,{form:j},d().createElement(c.Table,{locale:{emptyText:d().createElement(w.Z,{dataState:P,getLocale:Q})},ref:ue,bordered:F,className:$,style:De,components:{body:{cell:s.Z,row:h.Z},header:{cell:ke}},columns:de,rowKey:N,scroll:Se,onChange:function(e,n,o,t){"function"==typeof I&&I(e,n,o,t)},onRow:function(e,n){return{onClick:function(o){!ce(o,e,n)&&z(e,n)},onDoubleClick:function(o){re(o,e,n)},onContextMenu:function(e){},onMouseEnter:function(e){},onMouseLeave:function(e){},clickActive:"function"==typeof ce}},rowSelection:_,dataSource:W,expandable:Y,pagination:!1,size:J.size})))):null}));n.default=y}}]);