All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.kuangkie.hydrogen.bundle.25a62f68f692e3578fbc.js Maven / Gradle / Ivy

The newest version!
/*! For license information please see bundle.25a62f68f692e3578fbc.js.LICENSE.txt */
"use strict";(self.webpackChunkhydrogen_react=self.webpackChunkhydrogen_react||[]).push([[777],{59099:function(t,e,i){i.d(e,{Z:function(){return gt}});var n=i(35466),r=i(68992),o=i(65675),s=i(80056),a=i(2855),l=i(79310),d=i(35143),c=i(92444),u=i(49624),h=i(40137),p=i(65223),f=i(15778),m=i(87706),g=i(47333),y=i(36563),v=i(17292),b=i(98307),E=i(72186),S=i(62135),w=i(56976),C=i(91569),T=i(17508),D=i(63730),x=i(60513),Z=i(19596),I=i(41980),R=i(65604),P=i(71572),N=i(69993),O=i(79546),k=i(53125),A=i(24238),q=i(83426),B=i(21561),L=i(23642),M=i(15246),V=i(44564),K=i(39544),H=i(67188),j=i(33086),F=i(18971);const z=(0,j.W8)((({value:t,index:e,disabledColIds:i})=>n.createElement(h.Z,{key:e,span:24},n.createElement(c.Z,{disabled:i.includes(t.id),value:t.id},n.createElement(U,null)," ",t.title)))),U=(0,j.W6)((()=>n.createElement(g.Z,{style:{cursor:"grab",color:"#999"}}))),_=(0,j.JN)((({items:t,selected:e,onChange:i,disabledColIds:r})=>n.createElement(c.Z.Group,{value:e,onChange:i},n.createElement(u.Z,{style:{width:"148px"}},t.map(((t,e)=>n.createElement(z,{key:`item-${t.id}`,index:e,value:t,disabledColIds:r})))))));class Y extends n.PureComponent{constructor(){super(...arguments),this.onChange=t=>{const{onChangeHiddenCols:e,columns:i,ignoredColIds:n}=this.props,r=[];for(let e of i)0==t.length||t.includes(e.id)||n.includes(e.id)||r.push(e.id);e(r)},this.onSortEnd=({oldIndex:t,newIndex:e})=>{const{columns:i,onChangeColSort:n}=this.props;t!==e&&n((0,F.q)([].concat(i),t,e).filter((t=>!!t)))}}render(){const{hiddenColIds:t,columns:e,disabledColIds:i}=this.props,r=[];if(e)for(let i of e)t&&t.includes(i.id)||r.push(i.id);return n.createElement(_,{disabledColIds:i,helperClass:"row-dragging",items:e,selected:r,onChange:this.onChange,onSortEnd:this.onSortEnd})}}Y.defaultProps={ignoredColIds:[]};var G=Y,Q=i(86703),W=i(94616),$=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class J extends n.PureComponent{constructor(){super(...arguments),this.state={pageNo:void 0,pageSize:void 0,ltmplConfigRes:void 0,criteriaData:{}},this.loadData=t=>$(this,void 0,void 0,(function*(){const{sourceId:e,serverKey:i}=this.props;let n=yield W.Z.requestL2LtmplConfig(i,e);this.setState({ltmplConfigRes:n,criteriaData:t})})),this.doSearch=t=>{const{sourceId:e,innerQueryKey:i}=this.props;let n=Object.assign({},t);const{}=this.state;n.innerQueryKey=i,n.sourceId=e,this.setState({criteriaData:n})},this.onChangePage=(t,e)=>{this.setState({pageNo:t,pageSize:e})}}componentDidMount(){return $(this,void 0,void 0,(function*(){const{criteriaData:t}=this.state,{sourceId:e,innerQueryKey:i}=this.props;t.innerQueryKey=i,t.sourceId=e,this.loadData(t)}))}componentDidUpdate(t){return $(this,void 0,void 0,(function*(){const{sourceId:e,innerQueryKey:i}=this.props;let{sourceId:n,innerQueryKey:r}=t,{criteriaData:o}=this.state;if(e&&e!=n){let t={};t.innerQueryKey=i,t.sourceId=e,this.loadData(t)}else if(i!=r){let t=Object.assign({},o);t.innerQueryKey=i,this.setState({criteriaData:t})}}))}render(){let{ltmplConfigRes:t,criteriaData:e,pageNo:i,pageSize:r}=this.state,{sourceId:o,serverKey:s}=this.props;return t?n.createElement(gt,{serverKey:s,pageSize:r,pageNo:i,onChangePage:this.onChangePage,doSearch:this.doSearch,level:"l2",criteriaData:e,sourceId:o,ltmplConfig:t.ltmplConfig}):""}}var X=J,tt=i(14096),et=i(43790),it=i(81826),nt=i(52552),rt=i(22572);class ot extends n.PureComponent{constructor(){super(...arguments),this.state={popoverOpen:!1,loading:!1},this.formRef=n.createRef(),this.onRestat=t=>{return e=this,i=void 0,r=function*(){const{sourceId:e,onfinish:i,serverKey:n}=this.props;this.setState({loading:!0}),yield L.Z.increCalc(n,e,t),this.setState({loading:!1}),i()},new((n=void 0)||(n=Promise))((function(t,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(s,a)}l((r=r.apply(e,i||[])).next())}));var e,i,n,r}}render(){const{popoverOpen:t,loading:e}=this.state,{fields:i,value:r,serverKey:l}=this.props;return n.createElement(d.Z,{open:t,content:n.createElement(p.Z,{loading:e,style:{width:1e3},title:"重新统计",bodyStyle:{overflow:"auto"},extra:n.createElement(n.Fragment,null,n.createElement(a.Z,{size:[8,0]},n.createElement(s.ZP,{type:"primary",onClick:()=>{this.formRef.current.submit()}},"确定"),n.createElement(s.ZP,{onClick:()=>{this.setState({popoverOpen:!1})}},n.createElement(it.Z,null))))},n.createElement(et.Z,{labelWrap:!0,ref:this.formRef,name:"control-hooks",onFinish:this.onRestat},n.createElement(rt.Z,{serverKey:l,nameAttr:"id",fields:i,valueMap:r}))),placement:"bottomLeft",trigger:"click"},n.createElement(o.Z,{title:"重新统计"},n.createElement(s.ZP,{onClick:()=>{this.setState({popoverOpen:!t})}},n.createElement(nt.Z,null))))}}ot.defaultProps={};var st=ot,at=i(19186),lt=i(69703),dt=i(43736),ct=i(49803),ut=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const ht=(0,j.W6)((()=>n.createElement(g.Z,{style:{cursor:"grab",color:"#999"}}))),{Panel:pt}=r.default,ft=["20000","10000"];class mt extends n.PureComponent{constructor(){super(...arguments),this.state={sortedColConfigs:void 0,queryKey:void 0,loading:!0,disableCols:void 0,hiddenColIds:ft,selectedRows:[],selectedDatas:[],hiddenRowCodes:[],viewModels:[],drillingColIds:void 0,disabledColIds:void 0,showL2ActTable:!1,showL2Chart:!1},this.loadData=(t,e,i)=>ut(this,void 0,void 0,(function*(){const{sourceId:n,criteriaData:r,ltmplConfig:o,mainCode:s,level:a,pageNo:l,pageSize:d,serverKey:c}=this.props;if(!o)return;this.setState({loading:!0});let u=[],h=[...t];if(r&&r.drillingColIds){let t=[...r.drillingColIds];o.columns.forEach((e=>{"dimension"!=e.statColType||t.includes(e.id)||h.includes(e.id)||(h.push(e.id),u.push(e.id)),"dimension"!=e.statColType||t.includes(e.id)||u.includes(e.id)||u.push(e.id)})),h=h.filter((e=>!t.includes(e)))}o.columns.forEach((t=>{t.hidden&&h.push(t.id)}));const{defaultPageSize:p}=o;let f,m={pageNo:l||1,pageSize:d||p||10,virtualEndPageNo:void 0};f=a&&"l2"==a?yield L.Z.requestL2LtmplQueryKey(c,n,Object.assign(Object.assign(Object.assign({},r),m),{mainCode:s})):yield L.Z.requestLtmplQueryKey(c,n,Object.assign(Object.assign(Object.assign({},r),m),{mainCode:s})),this.setState({disabledColIds:u,hiddenColIds:h,hiddenRowCodes:e,sortedColConfigs:i,queryKey:f,loading:!1,showL2Chart:!1,selectedRows:[],selectedDatas:[],viewModels:this.state.viewModels.length>0?this.state.viewModels:["table"]})})),this.buildTableColumns=(t,e,i,r)=>{const{showView:d,doEdit:c,doRAction:u,customEditable:h,serverKey:p,readOnly:f,sourceId:m}=this.props,{buttons:g}=t;let D=[],x=0;return(r||t.columns).forEach((r=>{let Z={};e&&e.includes(r.id)||D.push(Z),Z.title=r.title,Z.dataIndex=r.id,x++;let I=B.Z.getSupportControlType(r);x<10&&"操作"!=r.title&&"序号"!=r.title&&e.includes("10000")&&q.Z.sort(Z,I),"序号"===r.title?(Z.render=(t,e,i)=>n.createElement("label",null,i+1),r.sorter=void 0):"10000"==r.id?(Z.title=n.createElement(o.Z,{title:"拖拽排序"},r.title),Z.width=30,Z.dataIndex=r.id,Z.className="drag-visible",Z.render=()=>n.createElement(ht,null)):"20000"==r.id?(Z.align="center",Z.width=14,Z.title=n.createElement(n.Fragment,null,i.length>0?n.createElement(o.Z,{title:"取消隐藏"},n.createElement(s.ZP,{style:{marginRight:"0px"},size:"small",shape:"circle",icon:n.createElement(y.Z,null),type:"text",onClick:()=>this.unHiden()})):""),Z.render=(t,e)=>n.createElement(o.Z,{title:"隐藏"}," ",n.createElement(s.ZP,{style:{marginRight:"0px"},icon:n.createElement(v.Z,null),type:"dashed",size:"small",onClick:()=>this.onHide(e.code)}))):"操作"===r.title?(Z.fixed="right",Z.align="center",Z.className="opsColumn",Z.title=n.createElement(n.Fragment,null,"操 作"),Z.render=(e,i)=>n.createElement(a.Z,{size:[0,4],wrap:!0},g.includes("detail")&&d?n.createElement(s.ZP,{size:"small",type:"primary",icon:n.createElement(b.Z,null),onClick:()=>d(i.code)}):"",g.includes("customDetail")&&d?n.createElement(s.ZP,{size:"small",type:"primary",icon:n.createElement(E.Z,null),onClick:()=>d(i.code,!0)}):"",!g.includes("dtmplEdit")||!c||f||t.editAction&&!at.Z.isShow(t.editAction,[i],void 0)?"":n.createElement(s.ZP,{size:"small",type:"dashed",icon:n.createElement(S.Z,null),onClick:()=>c(i.code,"update")}),!g.includes("dtmplCustomEdit")&&!h||!c||f||t.editAction&&!at.Z.isShow(t.editAction,[i],void 0)?"":n.createElement(s.ZP,{size:"small",type:"dashed",icon:n.createElement(w.Z,null),onClick:()=>c(i.code,"update",!0)}),g.includes("copy")&&c&&!f?n.createElement(o.Z,{title:"复制"},n.createElement(s.ZP,{size:"small",type:"dashed",icon:n.createElement(C.Z,null),onClick:()=>ut(this,void 0,void 0,(function*(){let t=!1;(g.includes("dtmplCustomEdit")||h)&&(t=!0);let e=yield L.Z.doCopy(p,m,i.code);e&&c(e,"update",t)}))})):"",t.ractions&&!f?t.ractions.map((t=>n.createElement(s.ZP,{key:t.id,size:"small",type:"dashed",onClick:()=>u(t.id,i.code)},t.title))):"",t.rowActions&&!f&&t.rowActions.length>0?t.rowActions.map((t=>n.createElement(tt.Z,{serverKey:p,iconType:"icon",key:t.id,data:[i],actionConfig:t,doAction:this.doRowAction,buttonSize:"small",serial:1}))):"",t.rowJumps&&t.rowJumps.length>0&&!f?t.rowJumps.map((t=>n.createElement(s.ZP,{key:t.id,size:"small",type:"dashed",onClick:()=>this.doRowJump(t,i)},t.title))):"",t.rowCQuerys&&t.rowCQuerys.length>0&&!f?t.rowCQuerys.map((t=>n.createElement(lt.Z,{serverKey:p,key:t.id,size:"small",pageType:"drawer",cQueryConfig:t,mainCode:t.mainCodeColId?i[t.mainCodeColId]:i.code}))):"",!g.includes("singleDelete")||f||t.deleteAction&&!at.Z.isShow(t.deleteAction,[i],void 0)?"":n.createElement(l.Z,{placement:"rightBottom",title:"确定要【删除】此数据吗?",onConfirm:()=>{this.doDeleteByCode(i.code)},okText:"确定",cancelText:"取消",okType:"danger"},n.createElement(s.ZP,{size:"small",type:"dashed",danger:!0},n.createElement(T.Z,null))))):(Z.className="opsColumn",Z.render=(t,e)=>n.createElement(K.Z,{serverKey:p,fieldConfig:r,value:e[r.id],holderType:"table"}))})),D},this.handleShowChart=()=>{this.setState({showL2Chart:!this.state.showL2Chart})},this.handleDataAnalysis=()=>{this.setState({showL2ActTable:!this.state.showL2ActTable})},this.unHiden=()=>{const{ltmplConfig:t}=this.props,{hiddenColIds:e,sortedColConfigs:i}=this.state;this.setState({hiddenRowCodes:[]})},this.onHide=t=>{const{ltmplConfig:e}=this.props,{hiddenRowCodes:i,hiddenColIds:n,sortedColConfigs:r}=this.state;let o=[...i,t];this.setState({hiddenRowCodes:o})},this.changeViewModel=t=>{this.setState({viewModels:t})},this.changeHiddenColumns=t=>{const{}=this.props,{}=this.state;this.setState({showL2Chart:!1,hiddenColIds:t})},this.doSelectedAction=(t,e,i)=>ut(this,void 0,void 0,(function*(){const{selectedRows:e}=this.state;this.doAction(t,e,i)})),this.doAction=(t,e,i)=>ut(this,void 0,void 0,(function*(){const{serverKey:n}=this.props,{hiddenColIds:r,hiddenRowCodes:o,sortedColConfigs:s}=this.state;this.setState({loading:!0}),(yield L.Z.postActions(n,t,e,i))?this.loadData(r,o,s):this.setState({loading:!1})})),this.doRowAction=(t,e,i)=>ut(this,void 0,void 0,(function*(){this.doAction(t,[{title:void 0,code:e[0]}],i)})),this.doDelete=()=>ut(this,void 0,void 0,(function*(){const{sourceId:t,serverKey:e}=this.props,{selectedRows:i,hiddenColIds:n,hiddenRowCodes:r,sortedColConfigs:o}=this.state;this.setState({loading:!0}),(yield L.Z.deleteData(e,t,i))?this.loadData(n,r,o):this.setState({loading:!1})})),this.doDeleteByCode=t=>ut(this,void 0,void 0,(function*(){const{sourceId:e,serverKey:i}=this.props,{hiddenColIds:n,hiddenRowCodes:r,sortedColConfigs:o}=this.state;this.setState({loading:!0}),(yield L.Z.deleteByCode(i,e,[t]))?this.loadData(n,r,o):this.setState({loading:!1})})),this.doSelectedCQuery=t=>ut(this,void 0,void 0,(function*(){})),this.doJump=(t,e)=>ut(this,void 0,void 0,(function*(){let i=e.fieldMap?e.fieldMap:e,n=null,r=t.path;r||(r="/"),0==r.indexOf("#")||0==n.indexOf("/#")?n="":0==r.indexOf("http://")||0==r.indexOf("HTTP://")||0==r.indexOf("https://")||0==r.indexOf("HTTPS://")?(n=r.split("//")[0]+"//",r=r.split("//")[1]):n=new URL(window.location.href).pathname;let o=r.split("/"),s=t.routeParams;if(s){for(let t=0;t0&&(n.indexOf("?")!=n.length-1&&(n+="?"),n+=l.join("&")),0==n.indexOf("#")||0==n.indexOf("/#")||0==n.indexOf("//#")?window.location.hash=n.substring(n.indexOf("#")+1):window.open(n)})),this.doRowJump=(t,e)=>ut(this,void 0,void 0,(function*(){this.doJump(t,e)})),this.doSelectedJump=t=>ut(this,void 0,void 0,(function*(){const{selectedDatas:e}=this.state;1==e.length&&this.doJump(t,e[0])})),this.changeRowSelection=(t,e)=>{this.setState({selectedRows:t,selectedDatas:e})},this.onChangeColSort=t=>{const{ltmplConfig:e}=this.props,{hiddenRowCodes:i,hiddenColIds:n}=this.state;this.setState({sortedColConfigs:t})},this.getAddTmplButton=t=>t&&t.length<1?"没有分类添加按钮":t.map((t=>n.createElement("p",null,n.createElement(s.ZP,{size:"small",type:"text",onClick:()=>this.props.doCreate(t.id,!1)},t.title)))),this.renderHeaderButtons=()=>{let{hiddenColIds:t,queryKey:e,viewModels:i,sortedColConfigs:r,disabledColIds:l,showL2Chart:p,showL2ActTable:f}=this.state;const{ltmplConfig:m,sourceId:g,doCreate:y,doSearch:v,menuId:b,funcMode:E,customCreatable:S,serverKey:w,readOnly:C}=this.props;let{buttons:T}=m;return n.createElement(n.Fragment,null,n.createElement(a.Z,null,"common"==E&&this.criteriaFormUseful()?n.createElement(d.Z,{trigger:"click",content:this.renderCriteriaForm()},n.createElement(s.ZP,null,n.createElement(D.Z,null))):null,T.includes("dtmplAdd")&&y&&!C?m.classifiedAddConfigs&&m.classifiedAddConfigs.length>0?n.createElement(d.Z,{arrow:!1,content:this.getAddTmplButton(m.classifiedAddConfigs),placement:"bottomRight"},n.createElement(o.Z,null,n.createElement(s.ZP,null,n.createElement(x.Z,null)))):n.createElement(o.Z,{title:"创建"},n.createElement(s.ZP,{onClick:()=>y(null,!1)},n.createElement(x.Z,null))," "):"",(T.includes("dtmplCustomAdd")||S)&&y&&!C?n.createElement(o.Z,{title:"创建"},n.createElement(s.ZP,{onClick:()=>y(null,!0)},n.createElement(Z.Z,null))):"",T.includes("importLtmplExcel")&&!C?n.createElement(o.Z,{title:"导入"}," ",n.createElement(s.ZP,{href:`#/${g}/importer?menuId=${b}`,target:"_blank"},n.createElement(I.Z,null))):"",T.includes("exportLtmplExcel")&&!C?n.createElement(d.Z,{content:n.createElement(Q.Z,{serverKey:w,queryKey:e,title:m.title}),title:"导出",placement:"bottomRight",trigger:"click"},n.createElement(o.Z,{title:"导出"},n.createElement(s.ZP,{style:{display:T.includes("exportLtmplExcel")&&!C?"inline":"none",marginLeft:"5px"}},n.createElement(R.Z,null)))):"",T.includes("showChart")?n.createElement(o.Z,{title:p?"隐藏图表":"展示图表"},n.createElement(s.ZP,{onClick:this.handleShowChart},n.createElement(P.Z,null))):"",T.includes("analysis")?n.createElement(o.Z,{title:f?"隐藏数据分析":"展示数据分析"},n.createElement(s.ZP,{onClick:this.handleDataAnalysis},n.createElement(N.Z,null))):"",T.includes("reStat")&&!C?n.createElement(st,{serverKey:w,fields:m.reStatParams,sourceId:g,onfinish:()=>v(null)}):"",n.createElement(d.Z,{content:n.createElement(c.Z.Group,{value:i,onChange:this.changeViewModel},n.createElement(u.Z,{style:{width:"120px"}},n.createElement(h.Z,{span:24},n.createElement(c.Z,{value:"table"},"表格")),n.createElement(h.Z,{span:24},n.createElement(c.Z,{value:"verticalList"},"纵向列表")))),title:"视图",placement:"bottomRight",trigger:"click"},n.createElement(o.Z,{title:"选择视图"},n.createElement(s.ZP,null,n.createElement(O.Z,null)))),n.createElement(d.Z,{content:n.createElement(G,{columns:r,disabledColIds:l,hiddenColIds:t,onChangeColSort:this.onChangeColSort,onChangeHiddenCols:this.changeHiddenColumns}),title:"排序和选择列",placement:"bottomRight",trigger:"click"},n.createElement(o.Z,{title:"点击排序和选择列"},n.createElement(s.ZP,null,n.createElement(k.Z,null)))),v?n.createElement(s.ZP,{className:"hoverbig",title:"刷新",onClick:()=>{v(null)}},n.createElement(A.Z,null)):""))},this.criteriaFormUseful=()=>{const{ltmplConfig:t}=this.props;let{buttons:e,criterias:i}=t;return!!(e.includes("query")&&(i&&i.length>0||e.includes("drilling"))||this.checkBoxUseful())},this.checkBoxUseful=()=>{const{ltmplConfig:t}=this.props;let{buttons:e,jumps:i,actions:n}=t;return!!(e.includes("batchDelete")||n&&n.length>0||i&&i.length>0)},this.renderCriteriaForm=()=>{let{loading:t,selectedRows:e,selectedDatas:i}=this.state,{ltmplConfig:r,doSearch:o,criteriaData:s,serverKey:a}=this.props;return n.createElement(V.Z,{serverKey:a,loading:t,selectedDatas:i,selectedRows:e,ltmplConfig:r,data:s,doCQuery:this.doSelectedCQuery,doAction:this.doSelectedAction,doDelete:this.doDelete,doJump:this.doSelectedJump,doSearch:o})},this.renderContent=()=>{let{queryKey:t,loading:e,selectedRows:i,hiddenRowCodes:r,viewModels:o,sortedColConfigs:s,hiddenColIds:a,showL2ActTable:l}=this.state,{sourceId:d,ltmplConfig:c,funcMode:u,title:h,collapsible:g,pageSize:y,pageNo:v,onChangePage:b,serverKey:E}=this.props;if(!c||!d)return n.createElement(n.Fragment,null,n.createElement(p.Z,{loading:e}),n.createElement(f.Z,{loading:e}));let S=this.buildTableColumns(c,a,r,s),{buttons:w}=c,C=!1;"simple"==u||"common"==u?C=!1:this.criteriaFormUseful()&&(C=!0);let T=[];if(s)for(let t of s)a.includes(t.id)||T.push(t);return n.createElement(n.Fragment,null,w.includes("analysis")&&l?n.createElement("div",null,n.createElement(X,{serverKey:E,innerQueryKey:t.key,sourceId:d}),n.createElement(m.Z,{dashed:!0,style:{borderTopColor:"#40a9ff"},plain:!0})):"",n.createElement("div",{className:"actTable"},"complete"==u||"common"==u?g?null:n.createElement("span",null,c.header?n.createElement("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:c.header}}):null,n.createElement("h3",null,"  ",h||c.title,n.createElement("p",{className:"fr"},this.renderHeaderButtons()))):null,C?this.renderCriteriaForm():null,e?"":n.createElement(M.Z,{serverKey:E,onChangePage:b,viewModels:o,primaryColumn:c.primaryColumn,columnConfigs:T,maxSelectedRows:this.checkBoxUseful()?1e4:-1,selectedRows:i,columns:S,hiddenRowCodes:r,pageInfo:{pageNo:v||1,pageSize:y||c.defaultPageSize},queryKey:t,onChangeRowSelection:this.changeRowSelection}),c.footer?n.createElement("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:c.footer}}):null))}}componentDidMount(){return ut(this,void 0,void 0,(function*(){const{ltmplConfig:t}=this.props;let e;t&&(e=[{id:"10000",title:"排序"},...t.columns,{id:"20000",title:"隐藏"}]),this.loadData(ft,[],e)}))}componentDidUpdate(t){return ut(this,void 0,void 0,(function*(){const{sourceId:e,criteriaData:i,ltmplConfig:n}=this.props;let{ltmplConfig:r,criteriaData:o,sourceId:s}=t,{hiddenColIds:a,sortedColConfigs:l}=this.state;if(e&&s!=e||n&&(!r||n.id!=r.id)||H.Z.transQueryParamsToStr(i,!1,["pageSize","pageNo"])!=H.Z.transQueryParamsToStr(o,!1,["pageSize","pageNo"]))if(n.id==r.id)this.loadData(a,[],l);else{let t;n&&(t=[{id:"10000",title:"排序"},...n.columns,{id:"20000",title:"隐藏"}]),this.setState({viewModels:["table"]}),this.loadData(ft,[],t)}}))}render(){let{queryKey:t,loading:e}=this.state,{sourceId:i,ltmplConfig:r,title:o,collapsible:s,initCollapse:a,tip:l}=this.props;return r&&i?n.createElement(n.Fragment,null," ",s?n.createElement(dt.Z,{initCollapse:a,title:n.createElement(n.Fragment,null,o||r.title,n.createElement(ct.Z,{content:l||(r?r.tip:null)})),id:t+r.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:e,bodyStyle:{padding:"6px"},extra:this.renderHeaderButtons()},this.renderContent()):n.createElement(n.Fragment,null,this.renderContent())):n.createElement(n.Fragment,null,n.createElement(p.Z,{loading:e}),n.createElement(f.Z,{loading:e}))}}mt.defaultProps={criteriaData:{},funcMode:"complete",collapsible:!1,initCollapse:!1,readOnly:!1};var gt=mt},15246:function(t,e,i){i.d(e,{Z:function(){return S}});var n=i(35466),r=i(68992),o=i(74614),s=i(15778),a=i(65223),l=i(79041),d=i(23642),c=i(50843);class u extends n.PureComponent{render(){const{queryTotal:t,pageInfo:e,total:i,pageTo:r,touchEnd:o}=this.props;if(!e)return n.createElement(n.Fragment,null);let s,a=!0,l="";return i&&i>=0?(s=i,a=!0,i>0&&(l=`共${i}条`)):(a=!1,s=e.virtualEndPageNo*e.pageSize+1,l="点击查看总数"),!s||sr(t,e),onShowSizeChange:(t,e)=>r(t,e),hideOnSinglePage:0===i,total:s}))}}var h=u,p=i(33086),f=i(18971),m=i(39544),g=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const{Panel:y}=r.default,v=(0,p.W8)((t=>n.createElement("tr",Object.assign({},t)))),b=(0,p.JN)((t=>n.createElement("tbody",Object.assign({},t))));class E extends n.PureComponent{constructor(){super(...arguments),this.state={queryDataCache:void 0,virtualEndPageNo:void 0,dataSource:void 0,loading:!0,touchEnd:void 0,total:void 0},this.DraggableContainer=t=>n.createElement(b,Object.assign({useDragHandle:!0,disableAutoscroll:!0,helperClass:"row-dragging",onSortEnd:this.onSortEnd},t)),this.DraggableBodyRow=t=>{var{className:e,style:i}=t,r=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);rt.key===r["data-row-key"]));return n.createElement(v,Object.assign({key:t,index:t},r))}return n.createElement(n.Fragment,null)},this.onSortEnd=({oldIndex:t,newIndex:e})=>{const{dataSource:i}=this.state;if(t!==e){const n=(0,f.q)([].concat(i),t,e).filter((t=>!!t));this.setState({dataSource:n})}},this.loadData=(t,e,i)=>g(this,void 0,void 0,(function*(){this.setState({loading:!0});let n,{queryDataCache:r}=this.state,{serverKey:o}=this.props;if(i||!r?(n=new Map,this.setState({total:void 0})):n=r,n.has(e.pageNo+"_"+e.pageSize)){let t=n.get(e.pageNo+"_"+e.pageSize);this.setState({dataSource:t.dataSource,virtualEndPageNo:t.pageInfo.virtualEndPageNo,loading:!1})}else{let i=yield d.Z.requestQueryData(o,t,e),r=[];e=i.pageInfo,i.entities.forEach(((t,e)=>{let i=Object.assign(Object.assign({key:t.code,code:t.code},t.fieldMap),{index:e});r.push(i)}));let s=i.touchEnd;n.set(e.pageNo+"_"+e.pageSize,{dataSource:r,pageInfo:e}),this.setState({dataSource:r,virtualEndPageNo:e.virtualEndPageNo,queryDataCache:n,touchEnd:s,loading:!1})}})),this.pageTo=(t,e)=>g(this,void 0,void 0,(function*(){const{onChangePage:i}=this.props,{virtualEndPageNo:n}=this.state;let r={pageNo:t,pageSize:e||10,virtualEndPageNo:n};const{queryKey:o}=this.props;yield this.loadData(o.key,r),i(t,e)})),this.queryTotal=()=>g(this,void 0,void 0,(function*(){const{queryKey:t,serverKey:e}=this.props;let i=yield d.Z.requestQueryCount(e,t.key);this.setState({total:i})})),this.getRowSelection=()=>{const{columns:t,onChangeRowSelection:e,selectedRows:i,maxSelectedRows:n,primaryColumn:r}=this.props;let{dataSource:o}=this.state,s=[];for(let t of i)s.push(t.code);const a=[];if(o)for(let t of o)a.push(t.code);if(-1==n)return null;const l={fixed:!0,type:1==n?"radio":"checkbox",selectedRowKeys:s,onChange:(i,n)=>{let o=[],s=[],l=null==r?void 0:r.id;l||t.forEach((t=>{"序号"==t.title||null!=l||(l=t.dataIndex)})),n.forEach((t=>{o.push({code:t.code,title:t[l]}),s.push(t)})),e&&e(o,s,a)}};return l},this.getUnHidenDataSource=()=>{const{dataSource:t}=this.state,{hiddenRowCodes:e}=this.props;let i=[];if(t)for(let n of t)e.includes(n.code)||i.push(n);return i},this.initViewList=t=>{const{columns:e,columnConfigs:i,serverKey:r}=this.props,s=[];return i.length>0&&i.forEach(((e,i)=>{if("10000"!=e.id&&"操作"!=e.title&&"20000"!=e.id){const a=e.title;let l=t?t[e.id]:void 0;"序号"==a&&(l=t.index),l=l||(e.defaultValue?e.defaultValue:void 0),e.id,Math.random();const d=n.createElement(o.Z.Item,{label:e.title,key:i,className:"labelcss"},n.createElement(m.Z,{serverKey:r,holderType:"table",value:l,fieldConfig:e}));s.push(d)}})),s}}componentDidMount(){return g(this,void 0,void 0,(function*(){const{queryKey:t,pageInfo:e}=this.props;t&&(yield this.loadData(t.key,e))}))}componentWillUnmount(){this.setState=()=>!1}componentDidUpdate(t){return g(this,void 0,void 0,(function*(){const{queryKey:e,pageInfo:i}=t,{queryKey:n,pageInfo:r}=this.props,{total:o}=this.state;n&&((null==e?void 0:e.key)!=n.key?yield this.loadData(n.key,r,!0):(null==i?void 0:i.pageNo)==r.pageNo&&(null==i?void 0:i.pageSize)==r.pageSize||(yield this.loadData(n.key,r,!1)))}))}render(){const{pageInfo:t,columns:e,viewModels:i}=this.props,{touchEnd:r,total:d,loading:c,virtualEndPageNo:u}=this.state;return n.createElement(n.Fragment,null,i.includes("table")?n.createElement(s.Z,{size:"middle",rowSelection:this.getRowSelection(),columns:e||[],dataSource:this.getUnHidenDataSource(),bordered:!0,pagination:!1,style:{display:e?"block":"none"},loading:c,components:{body:{wrapper:this.DraggableContainer,row:this.DraggableBodyRow}}}):"",n.createElement(h,{touchEnd:r,pageInfo:Object.assign(Object.assign({},t),{virtualEndPageNo:u}),pageTo:this.pageTo,queryTotal:this.queryTotal,total:d}),i.includes("verticalList")?n.createElement(a.Z,{style:{marginTop:"10px"}},n.createElement(l.Z,{dataSource:this.getUnHidenDataSource(),renderItem:t=>n.createElement(l.Z.Item,{key:t.id},n.createElement(a.Z,{size:"small",bodyStyle:{padding:"4px"}},n.createElement(o.Z,{column:4},this.initViewList(t))))})):"")}}E.defaultProps={pageInfo:{pageNo:1,pageSize:10,virtualEndPageNo:void 0},hiddenRowCodes:[],selectedRows:[],viewModels:["table"]};var S=E},42712:function(t,e,i){i.d(e,{Z:function(){return U}});var n=i(35466),r=i(43790),o=i(97912),s=i(80056),a=i(65675),l=i(43318),d=i(49624),c=i(40137),u=i(2855),h=i(35143),p=i(15778),f=i(98307),m=i(56976),g=i(62135),y=i(17508),v=i(51886),b=i(72873),E=i(21561),S=i(83426),w=i(39544),C=i(23855),T=i(20968),D=i(46885),x=i(94616),Z=i(23642),I=i(15246),R=i(44564),P=i(6755);class N extends n.PureComponent{constructor(){super(...arguments),this.handleClose=t=>{const{onChange:e,value:i}=this.props;if(e){const n=[];for(let e of i)e.code!=t.code&&n.push(e);e(n)}},this.renderTag=()=>{const{value:t}=this.props,e=[];return t?(t.forEach(((t,i)=>{let r=t.title instanceof Array?t.title[0]:t.title;e.push(n.createElement(P.Z,{key:i,style:{fontSize:14},color:"geekblue",closable:!0,onClose:e=>{e.preventDefault(),this.handleClose(t)}},r&&r.includes("@R@")?r.split("@R@")[1]:t.title))})),e):""}}render(){return n.createElement("div",null,n.createElement("h3",null,"查询点选:",this.renderTag()))}}var O=N,k=i(49762),A=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class q extends n.PureComponent{constructor(){super(...arguments),this.state={selectConfig:void 0,columns:void 0,queryKey:void 0,loading:!0,criteriaData:void 0,pageNo:void 0,pageSize:void 0,disableCols:void 0,selectedRows:[]},this.loadData=(t,e)=>A(this,void 0,void 0,(function*(){this.setState({loading:!0});const{pageNo:i,pageSize:n}=this.state,{defaultPageSize:r}=t;let o={pageNo:i,pageSize:n||r,virtualEndPageNo:void 0};const{sourceId:s,exceptCodes:a,serverKey:l,mainCode:d}=this.props;let c=yield Z.Z.requestLtmplQueryKey(l,s,Object.assign(Object.assign(Object.assign({exceptCodes:a},e),o),{mainCode:d}));this.setState({queryKey:c,criteriaData:e,loading:!1})})),this.loadConfig=()=>A(this,void 0,void 0,(function*(){const{sourceId:t,exceptCodes:e,serverKey:i}=this.props;this.setState({loading:!0});let r=yield x.Z.requestSelectConfig(i,t),o=[],s=0;return r.columns.forEach((t=>{let e={};"操作"!=t.title&&o.push(e),e.title=t.title,e.dataIndex=t.id,s++;let r=E.Z.getSupportControlType(t);s<10&&S.Z.sort(e,r),"序号"===t.title?(e.render=(t,e,i)=>n.createElement("label",null,i+1),t.sorter=void 0):e.render=(e,r)=>n.createElement(w.Z,{serverKey:i,fieldConfig:t,value:r[t.id],holderType:"table"})})),this.setState({columns:o,selectConfig:r,loading:!1}),r})),this.doSearch=t=>A(this,void 0,void 0,(function*(){const{selectConfig:e}=this.state;let i=Object.assign({},t);yield this.loadData(e,i)})),this.onChangePage=(t,e)=>{this.setState({pageNo:t,pageSize:e})},this.handleOk=()=>{this.props.onOK(this.state.selectedRows),this.setState({selectedRows:[],queryKey:void 0})},this.handleCancel=()=>{this.setState({queryKey:void 0}),this.props.onCancel()},this.changeRowSelection=(t,e,i)=>{let{maxSelectedRows:n}=this.props;if(i){const{selectedRows:e}=this.state;let r=[],o=[];1!=n&&o.push(...e);let s=!1;for(let e of t){s=!1;for(let t of o)e.code==t.code&&(s=!0);s||o.push(e),r.push(e.code)}let a=[];a.push(...o);for(let t of o)if(i.includes(t.code)&&!r.includes(t.code))for(let e in a)a[e].code==t.code&&a.splice(Number(e),1);this.setState({selectedRows:a})}else this.setState({selectedRows:t})}}componentDidMount(){return A(this,void 0,void 0,(function*(){const{sourceId:t,open:e}=this.props;t&&e&&(yield this.loadData(yield this.loadConfig(),{}))}))}componentDidUpdate(t){return A(this,void 0,void 0,(function*(){const{exceptCodes:e,open:i}=this.props,{selectConfig:n,criteriaData:r,queryKey:o,loading:s}=this.state,{exceptCodes:a,open:l}=t;let d=n;i&&(d||(d=yield this.loadConfig()),o||s||(yield this.loadData(d,r)))}))}render(){let{open:t,maxSelectedRows:e,serverKey:i}=this.props,{queryKey:r,columns:o,selectConfig:s,criteriaData:a,loading:l,selectedRows:d,pageSize:c,pageNo:u}=this.state;if(!s)return n.createElement(n.Fragment,null);let{buttons:h,criterias:p,jumps:f,actions:m}=s,g=!1;return(h.includes("batchDelete")||h.includes("query")&&p&&p.length>0||m&&m.length>0||f&&f.length>0)&&!0,n.createElement(D.Z,{open:t,title:n.createElement(O,{value:d,onChange:this.changeRowSelection}),width:1150,destroyOnClose:!0,centered:!0,bodyStyle:{height:"80vh",overflow:"auto"},onCancel:this.handleCancel,onOk:this.handleOk},n.createElement(k.ZP,{style:{height:"80vh"},autoHide:!0,autoHideTimeout:1e3},n.createElement("div",{className:"actTable"},n.createElement(R.Z,{serverKey:i,selectedRows:d,ltmplConfig:s,data:a,doSearch:this.doSearch,loading:l}),n.createElement(I.Z,{serverKey:i,pageInfo:{pageNo:u||1,pageSize:c||s.defaultPageSize},onChangePage:this.onChangePage,maxSelectedRows:e,selectedRows:d,primaryColumn:s.primaryColumn,columns:o,queryKey:r,onChangeRowSelection:this.changeRowSelection}))," "))}}var B=q,L=i(43736),M=i(81898),V=i(14096),K=i(6444),H=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const j=r.Z.Item,{Text:F}=o.default;class z extends n.PureComponent{constructor(){super(...arguments),this.state={showDtmplView:!1,selectedCode:void 0,showSelectTable:!1,showDtmplEdit:!1,tableLoading:!1,showRowEdit:!1,selectedDtmplData:void 0,filterStr:void 0,pageSize:10,addTmplId:void 0},this.buildDataSource=()=>{const{filterStr:t}=this.state,{value:e}=this.props;let i;return e&&(i=[],e.forEach(((e,n)=>{let r=!0;if(t){r=!1;for(let i of Object.values(e.fieldMap))i&&i.toString().indexOf(t)>=0&&(r=!0)}if(r){let t=Object.assign({key:n,relationLabel:e.relationLabel,code:e.code},e.fieldMap);i.push(t)}}))),i},this.buildColumns=()=>{const{viewOrEdit:t,value:e,fieldGroupConfig:i,serverKey:r}=this.props,{title:o,buttons:l,fields:d,showRelationName:c,relationNames:u,showRowNum:h,disabled:p}=i;let v=[],b=0;if(d.forEach((t=>{let e={};v.push(e),e.title=t.title,e.dataIndex=t.id,b++;let i=E.Z.getControlType(t,null);b<10&&S.Z.sort(e,i),e.render=(e,i)=>n.createElement(w.Z,{serverKey:r,holderType:"table",fieldConfig:t,value:i[t.id]})})),c){let t={dataIndex:"relationLabel",name:"relation",title:"关系",type:"relation",editable:!0,fieldAvailable:!0,id:"10000",options:u};v.unshift(t)}const C=l.includes("detail"),T=l.includes("rowEdit"),D=l.includes("dtmplEdit"),x=l.includes("singleDelete");if("edit"==t&&(C||T||D||x)){const t={};v.push(t),t.title="操作",t.fixed="right",t.key="action",t.render=t=>n.createElement("div",{className:"actionbtn"},C?n.createElement(s.ZP,{disabled:p,title:"当前实体",type:"primary",icon:n.createElement(f.Z,null),size:"small",onClick:()=>this.showEntityView(t)}):"",D?n.createElement(s.ZP,{disabled:p,title:"编辑当实体",icon:n.createElement(m.Z,null),size:"small",onClick:()=>this.showEditDtmplModel(t)}):"",i.rowActions&&i.rowActions.length>0?i.rowActions.map((e=>n.createElement(V.Z,{serverKey:r,disabled:p,key:e.id,data:[t],actionConfig:e,doAction:this.doRowAction,buttonSize:"small"}))):"",T?n.createElement(M.Z,{serverKey:r,disabled:p,buttonIcon:n.createElement(g.Z,null),dtmplData:this.getRowEditData(t.code),fieldGroupConfig:i,onOk:this.handleRowEdit,tooltipTitle:"编辑当前行"}):"",x?n.createElement(a.Z,{placement:"right",title:"删除当前行"},n.createElement(s.ZP,{disabled:p,danger:!0,type:"primary",icon:n.createElement(y.Z,null),size:"small",onClick:()=>this.delete(t)})):"")}else if("view"==t&&C){const t={};v.push(t),t.title="操作",t.fixed="right",t.key="action",t.render=t=>n.createElement("div",{className:"actionbtn"},C?n.createElement(s.ZP,{disabled:p,title:"当前实体",type:"primary",icon:n.createElement(f.Z,null),size:"small",onClick:()=>this.showEntityView(t)}):"")}return v},this.doRowAction=(t,e,i)=>H(this,void 0,void 0,(function*(){yield this.doAction(t,[{title:void 0,code:e[0]}],i),this.handleDtmplEdit(e[0])})),this.doAction=(t,e,i)=>H(this,void 0,void 0,(function*(){this.setState({tableLoading:!0});let{serverKey:n}=this.props;yield Z.Z.postActions(n,t,e,i),this.setState({tableLoading:!1})})),this.showEntityView=t=>{this.setState({selectedCode:t.code,showDtmplView:!0})},this.hiddenEntityView=()=>{this.setState({showDtmplView:!1})},this.hiddenEntityEdit=()=>{this.setState({showDtmplEdit:!1})},this.editRow=t=>{},this.delete=t=>{const{value:e,fieldGroupConfig:i,onChange:n}=this.props,r=[];if(e)for(let i of e)i.code!=t.code&&r.push(i);n(i,r)},this.searchValue=t=>{this.setState({filterStr:t})},this.tabChange=t=>{this.setState({pageSize:t.pageSize})},this.showSelect=()=>{this.setState({showSelectTable:!0})},this.select=t=>H(this,void 0,void 0,(function*(){if(this.setState({showSelectTable:!1}),!t||t.length<=0)return;const e=[];for(let i of t)e.push(i.code);yield this.add(e)})),this.add=t=>H(this,void 0,void 0,(function*(){const{value:e,fieldGroupConfig:i,onChange:n,serverKey:r}=this.props,{relationNames:o}=i;this.setState({tableLoading:!0});let s=yield Z.Z.requestSelectedData(r,i.id,t);if(s)for(let t of s)t.relationLabel=o[0];e&&s.unshift(...e),n(i,s),this.setState({tableLoading:!1})})),this.getRowEditData=t=>{const{value:e}=this.props;let i;if(t)for(let n of e)if(t==n.code){i=n;break}return i},this.handleDtmplAdd=t=>H(this,void 0,void 0,(function*(){this.setState({showDtmplEdit:!1}),yield this.add([t])})),this.handleDtmplEdit=t=>H(this,void 0,void 0,(function*(){const{value:e,fieldGroupConfig:i,onChange:n}=this.props,{title:r,fields:o,showRelationName:s,relationNames:a,showRowNum:l,serverKey:d}=i;this.setState({tableLoading:!0,showDtmplEdit:!1});let c=(yield Z.Z.requestSelectedData(d,i.id,[t]))[0],u=[...e];if(u&&c)for(let t of u)t.code==c.code&&(t.fieldMap=c.fieldMap);n(i,u),this.setState({tableLoading:!1})})),this.handleRowEdit=t=>{const{value:e,fieldGroupConfig:i,onChange:n}=this.props;let r=[];e&&(r=[...e]);let o=!0;for(let e of r)if(e.code==t.code){o=!1,e.editStatus=t.editStatus,e.fieldMap=t.fieldMap,e.relationLabel=t.relationLabel;break}o&&r.unshift(t),n(i,r),o?l.ZP.success("已添加"):l.ZP.success("已修改")},this.showAddDtmplModel=t=>{this.setState({showDtmplEdit:!0,addTmplId:t,selectedCode:void 0})},this.showEditDtmplModel=t=>{this.setState({showDtmplEdit:!0,addTmplId:void 0,selectedCode:t.code})},this.getAddTmplButton=t=>t&&t.length<1?"没有分类添加按钮":t.map((t=>n.createElement("p",null,n.createElement(s.ZP,{size:"small",type:"text",onClick:()=>this.showAddDtmplModel(t.id)},t.title)))),this.buildButtons=()=>{const{fieldGroupConfig:t,viewOrEdit:e,value:i,serverKey:r}=this.props,{buttons:o,disabled:l}=t,{showRowEdit:p}=this.state,f=l||!!t.max&&t.max<=(i?i.length:0);return"edit"==e?n.createElement(d.Z,null,n.createElement(c.Z,{span:20},n.createElement(u.Z,null,o.includes("rowAdd")?n.createElement(M.Z,{serverKey:r,disabled:f,buttonStyle:{marginBottom:10},buttonTitle:"新建一行",fieldGroupConfig:t,onOk:this.handleRowEdit}):"",o.includes("dtmplAdd")?t.classifiedAddConfigs&&t.classifiedAddConfigs.length>0?n.createElement(h.Z,{arrow:!1,content:this.getAddTmplButton(t.classifiedAddConfigs),placement:"bottomRight"},n.createElement(a.Z,null,n.createElement(s.ZP,{icon:n.createElement(v.Z,null)},"新增"))):n.createElement(s.ZP,{disabled:f,icon:n.createElement(v.Z,null),size:"small",onClick:()=>this.showAddDtmplModel(),style:{marginBottom:10}},"新增"):"",o.includes("selectAdd")?n.createElement(s.ZP,{disabled:f,type:"primary",icon:n.createElement(b.Z,null),size:"small",onClick:this.showSelect,style:{marginBottom:10}},"选择"):"",t.min&&(!i||i.length<=0)?n.createElement(F,{style:{color:"red"}},"请选择或添加",t.title):null,n.createElement(j,{name:"$virtual"+t.id,style:{margin:0,maxHeight:"32px"},rules:t.min?[{required:!0,message:""}]:null},n.createElement(K.Z,{min:t.min+"",style:{marginBottom:10},count:i?i.length:0}))))):""}}componentDidMount(){return H(this,void 0,void 0,(function*(){}))}componentDidUpdate(t){return H(this,void 0,void 0,(function*(){const{fieldGroupConfig:e}=this.props,{fieldGroupConfig:i}=t;e.disabled==i.disabled&&e.mainCode==i.mainCode||this.setState({filterStr:""})}))}render(){const{fieldGroupConfig:t,value:e,parentId:i,loading:r,initCollapse:o,mainCode:s,serverKey:a,showRightNav:l}=this.props,{pageSize:d,selectedCode:c,showDtmplView:u,showSelectTable:h,showDtmplEdit:f,addTmplId:m,tableLoading:g,showRowEdit:y,selectedDtmplData:v}=this.state,{buttons:b}=t;let E=t.mainCode?t.mainCode:s||i,S={pageSize:d,hideOnSinglePage:!0,defaultCurrent:1,total:e?e.length:void 0,showTotal:t=>`共${t}条`},w=[];if(e)for(let t of e)w.push(t.code);return t.displayConfig.includes("nonDataNonDisplayed")&&(!e||e.length<=0)?"":n.createElement(n.Fragment,null,n.createElement(L.Z,{showRightNav:l,initCollapse:o||t.displayConfig.includes("folded"),title:t.title,tip:t.tip,id:i+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:r,bodyStyle:{padding:"6px"}},n.createElement("div",{className:"editTableList"},this.buildButtons(),n.createElement(p.Z,{size:"small",locale:{emptyText:n.createElement("div",{style:{textAlign:"center",width:"100%"}},n.createElement(F,{disabled:!0},"暂无数据..."))},bordered:!0,loading:g,dataSource:this.buildDataSource(),columns:this.buildColumns(),pagination:S,onChange:this.tabChange}))),b.includes("detail")?n.createElement(C.Z,{serverKey:a,mainCode:E,open:u,onCancel:this.hiddenEntityView,sourceId:t.id,code:c}," "):"",b.includes("dtmplEdit")||b.includes("dtmplAdd")?n.createElement(T.Z,{addTmplId:m,serverKey:a,mainCode:E,open:f,onCancel:this.hiddenEntityEdit,sourceId:t.id,code:c,onOk:c?this.handleDtmplEdit:this.handleDtmplAdd}):"",b.includes("selectAdd")?n.createElement(B,{serverKey:a,maxSelectedRows:t.max,open:h,onOK:this.select,onCancel:()=>{this.setState({showSelectTable:!1})},exceptCodes:w,mainCode:E,sourceId:t.id}):"")}}z.defaultProps={};var U=z},98353:function(t,e,i){var n=i(35466),r=i(83426),o=i(21561),s=i(94616),a=i(23642),l=i(15246),d=i(44564),c=i(39544),u=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class h extends n.PureComponent{constructor(){super(...arguments),this.state={selectConfig:void 0,columns:void 0,queryKey:void 0,loading:!0,criteriaData:void 0,disableCols:void 0,pageNo:1,pageSize:void 0},this.loadData=(t,e)=>u(this,void 0,void 0,(function*(){this.setState({loading:!0});const{mainCode:i,serverKey:n,sourceId:r}=this.props,{pageNo:o,pageSize:s}=this.state,{defaultPageSize:l}=t;let d={pageNo:o,pageSize:s||l||10,virtualEndPageNo:void 0},c=yield a.Z.requestLtmplQueryKey(n,r,Object.assign(Object.assign(Object.assign({},e),d),{mainCode:i}));this.setState({queryKey:c,criteriaData:e,loading:!1})})),this.loadConfig=()=>u(this,void 0,void 0,(function*(){const{sourceId:t,serverKey:e}=this.props;this.setState({loading:!0});let i=yield s.Z.requestSelectConfig(e,t),a=[],l=0;return i.columns.forEach((t=>{let i={};"操作"!=t.title&&a.push(i),i.title=t.title,i.dataIndex=t.id,l++;let s=o.Z.getSupportControlType(t);l<10&&r.Z.sort(i,s),"序号"===t.title?(i.render=(t,e,i)=>n.createElement("label",null,i+1),t.sorter=void 0):i.render=(i,r)=>n.createElement(c.Z,{serverKey:e,holderType:"table",fieldConfig:t,value:r[t.id]})})),this.setState({columns:a,selectConfig:i,loading:!1}),i})),this.doSearch=t=>u(this,void 0,void 0,(function*(){const{selectConfig:e}=this.state;let i=Object.assign({},t);yield this.loadData(e,i)})),this.changeRowSelection=(t,e,i)=>{let n,r=[];const{selectedRows:o,selectedDatas:s,onChange:a,maxSelectedRows:l}=this.props;if(i){let e=[],r=[];1!=l&&r.push(...o);let s=!1;for(let i of t){s=!1;for(let t of r)i.code==t.code&&(s=!0);s||r.push(i),e.push(i.code)}let a=[];a.push(...r);for(let t of r)if(i.includes(t.code)&&!e.includes(t.code))for(let e in a)a[e].code==t.code&&a.splice(Number(e),1);n=a}else n=t;let d=[...s,...e];for(let t of n)for(let e of d)e.code==t.code&&r.push(e);a(n,r)},this.onChangePage=(t,e)=>{this.setState({pageNo:t,pageSize:e})}}componentDidMount(){return u(this,void 0,void 0,(function*(){yield this.loadData(yield this.loadConfig(),{})}))}componentDidUpdate(t){return u(this,void 0,void 0,(function*(){const{}=this.props,{selectConfig:e,criteriaData:i,queryKey:n,loading:r}=this.state,{exceptCodes:o,open:s}=t;let a=e;a||(a=yield this.loadConfig()),n||r||(yield this.loadData(a,i))}))}render(){let{maxSelectedRows:t,selectedRows:e,selectedDatas:i,serverKey:r}=this.props,{queryKey:o,columns:s,selectConfig:a,criteriaData:c,loading:u,pageNo:h,pageSize:p}=this.state;if(!a)return n.createElement(n.Fragment,null);let{buttons:f,criterias:m,jumps:g,actions:y}=a,v=!1;return(f.includes("batchDelete")||f.includes("query")&&m&&m.length>0||y&&y.length>0||g&&g.length>0)&&!0,n.createElement("div",{className:"actTable"},n.createElement(d.Z,{serverKey:r,selectedRows:e,selectedDatas:i,ltmplConfig:a,data:c,doSearch:this.doSearch,loading:u}),n.createElement(l.Z,{serverKey:r,maxSelectedRows:t,selectedRows:e,primaryColumn:a.primaryColumn,columns:s,pageInfo:{pageNo:h,pageSize:p||a.defaultPageSize},onChangePage:this.onChangePage,queryKey:o,onChangeRowSelection:this.changeRowSelection}))}}h.defaultProps={maxSelectedRows:1e3,selectedDatas:[]},e.Z=h},83426:function(t,e){e.Z={sort(t,e,i){let n=t.dataIndex;t.sorter="decimal"==e||"int"==e||"float"==e||"double"==e?(t,e)=>t[n]-e[n]:"text"==e||"textarea"==e||"date"==e||"datetime"==e?(t,e)=>t[n]?t[n].localeCompare(e[n],"zh-CN"):-1:(t,e)=>t[n]&&e[n]&&t[n].localeCompare?t[n]?t[n].localeCompare(e[n],"zh-CN"):-1:1,i&&(t.defaultSortOrder=i),t.showSorterTooltip=!1}}},21561:function(t,e,i){var n=i(5416);const r=new Set;function o(){}r.add("date-YY"),r.add("daterange-YY"),r.add("date-M1"),r.add("daterange-M1"),r.add("date"),r.add("daterange"),r.add("datetime-HH"),r.add("datetimerange-HH"),r.add("datetime-mm"),r.add("datetimerange-mm"),r.add("datetime"),r.add("datetimerange"),r.add("timestamp"),r.add("time-HH"),r.add("timerange-HH"),r.add("time-mm"),r.add("timerange-mm"),r.add("time"),r.add("timerange"),r.add("text"),r.add("textarea"),r.add("html"),r.add("steps"),r.add("progress"),r.add("password"),r.add("preselect"),r.add("select"),r.add("multiselect"),r.add("checkbox"),r.add("radio"),r.add("yes-no-radio"),r.add("yes-no-switch"),r.add("caselect"),r.add("relation"),r.add("file"),r.add("picture"),r.add("chemstruc"),r.add("sql-code-editor"),r.add("video"),r.add("takeVideo"),r.add("signature"),r.add("non-download-file"),r.add("decimal"),r.add("float"),r.add("double"),r.add("int"),r.add("relselect"),r.add("refselect"),r.add("range"),r.add("intrange"),r.add("decimalrange"),r.add("texttags"),r.add("entity-select"),r.add("table-entity-select"),r.add("modal-entity-select"),r.add("color"),r.add("url"),r.add("hidden"),r.add("lab-tree-select"),o.isSupport=function(t){return!!t&&(!!n.cB.getCustomViewControl(t)||r.has(t))},o.getSupportControlType=function(t){return this.isSupport(t.extControlType)?t.extControlType:this.isSupport(t.controlType)?t.controlType:"text"},o.getControlType=function(t,e){let i;return i=this.getSupportControlType(t),e&&"string"==typeof e&&-1===e.indexOf("@R@")&&"relselect"===i&&-1!=e.indexOf("download-files/")&&(i="file"),i},e.Z=o},94616:function(t,e,i){var n=i(23642),r=i(21561),o=i(43318),s=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const a=[];let l;const d=new Map,c=new Map,u=new Map,h=new Map,p=new Map,f=new Map,m=new Map,g=new Map,y=new Map,v=new Map;function b(t){const e=[];return t&&t.forEach((t=>{let i=r.Z.getSupportControlType(t);"caselect"!=i&&"select"!=i&&"multiselect"!=i&&"steps"!=i&&"preselect"!=i&&"checkbox"!=i&&"radio"!=i||c.has(t.mstrucId)||e.push(t.mstrucId)})),e}function E(t){const e=[];return t&&t.forEach((t=>{let i=b(t.writes);w(e,i),i=b(t.preposes),w(e,i)})),e}function S(t,e){return s(this,void 0,void 0,(function*(){const i=[];if(e){e.groups&&e.groups.forEach((t=>{let e=b(t.fields);w(i,e)}));let n=E(e.actions);w(i,n),yield T(t,i)}}))}function w(t,e){return e&&e.forEach((e=>{t.includes(e)||t.push(e)})),t}function C(t,e){return s(this,void 0,void 0,(function*(){const i=[];if(!e)return;let n=b(e.columns);w(i,n),n=b(e.criterias),w(i,n),n=b(e.drillingParams),w(i,n),n=b(e.reStatParams),w(i,n),n=E(e.actions),w(i,n),n=E(e.rowActions),w(i,n),yield T(t,i)}))}function T(t,e,i){return s(this,void 0,void 0,(function*(){if(e&&e.length>0){let r=yield n.Z.requestEnum(t,e,i);for(let t in r){let e=r[t];for(let t of e)t.css&&(t.color=t.css.color);c.set(t,e)}}}))}function D(){}D.loadEnumOfFields=function(t,e){return s(this,void 0,void 0,(function*(){const i=b(e);yield T(t,i)}))},D.loadEnumOfFieldsWithPath=function(t,e,i){return s(this,void 0,void 0,(function*(){const n=b(e);yield T(t,n,i)}))},D.getOptions=function(t,e){return s(this,void 0,void 0,(function*(){if(!e)return null;if(!c.has(e)){let i=yield n.Z.requestOptions(t,e)[e];if(null!=i){for(let t of i)t.css&&(t.color=t.css.color);c.set(e,i)}}return c.get(e)}))},D.requestLtmplConfig=function(t,e){return s(this,void 0,void 0,(function*(){if(!h.has(e)){h.set(e,yield n.Z.requestLtmplConfig(t,e));let i=h.get(e);yield C(t,i.ltmplConfig)}return h.get(e)}))},D.requestL2LtmplConfig=function(t,e){return s(this,void 0,void 0,(function*(){if(!p.has(e)){p.set(e,yield n.Z.requestL2LtmplConfig(t,e));let i=p.get(e);yield C(t,i.ltmplConfig)}return p.get(e)}))},D.requestSelectConfig=function(t,e){return s(this,void 0,void 0,(function*(){return u.has(e)||(u.set(e,yield n.Z.requestSelectConfig(t,e)),yield function(t,e){return s(this,void 0,void 0,(function*(){const i=[];let n=b(e.columns);w(i,n),n=b(e.criterias),w(i,n),yield T(t,i)}))}(t,u.get(e))),u.get(e)}))},D.requestDtmplConfig=function(t,e,i){return s(this,void 0,void 0,(function*(){if(!f.has(e)){let r=yield n.Z.requestDtmplConfig(t,e,i);if(!r||r.dynamic)return r;f.set(e,r),yield S(t,r)}return f.get(e)}))},D.requestTtmplConfig=function(t,e){return s(this,void 0,void 0,(function*(){if(!m.has(e)){let i=yield n.Z.requestTtmplConfig(t,e);m.set(e,i),m.set(i.id,i)}return m.get(e)}))},D.requestViewDtmplConfig=function(t,e){return s(this,void 0,void 0,(function*(){return g.has(e)||(g.set(e,yield n.Z.requestViewDtmplConfig(t,e)),yield S(t,g.get(e))),g.get(e)}))},D.requestAddDtmplConfig=function(t,e,i){return s(this,void 0,void 0,(function*(){let r=i||e;return y.has(r)||(y.set(r,yield n.Z.requestAddDtmplConfig(t,e,i)),yield S(t,y.get(r))),y.get(r)}))},D.getEnums=function(t){return c.get(t)},D.getEnumOption=function(t,e){if(!e)return null;let i,n=this.getEnums(t);return n&&n.forEach((t=>{t.value!==e||(i=t)})),i},D.getEnumValueColor=(t,e)=>{let i=D.getEnumOption(t,e);return i?i.color:void 0},D.requestBlocks=(t,e)=>s(void 0,void 0,void 0,(function*(){let i;if(a.length<1){let r=yield n.Z.requestBlocks(t||void 0,e||void 0);if(r){for(let t of r.blocks)a.push(t);l=r.programName,i={blocks:r.blocks,l2MenuId:r.l2MenuId,blockId:r.blockId,programName:r.programName}}}else i={blocks:a,blockId:e,l2MenuId:t,programName:l};return i})),D.initfastMenu=()=>s(void 0,void 0,void 0,(function*(){if(d.size<1){let t=yield n.Z.requestFastMenu();if(t)for(let e in t)d.set(e,t[e])}})),D.fastMenu=t=>s(void 0,void 0,void 0,(function*(){return d.size<1&&(yield D.initfastMenu()),d.get(t)})),D.reload=function(t){return s(this,void 0,void 0,(function*(){"success"==(yield n.Z.reload()).status&&(this.clear(),o.ZP.success("执行成功"))}))},D.cache=function(t){t&&v.set(t.code,t)},D.getFromCache=function(t){return v.get(t)},D.clear=function(){return s(this,void 0,void 0,(function*(){d.clear(),c.clear(),h.clear(),f.clear(),g.clear(),y.clear(),u.clear(),p.clear(),a.splice(0,a.length),v.clear()}))},e.Z=D},23642:function(t,e,i){i.d(e,{Z:function(){return vt}});var n=i(67188),r=i(17696),o=i(43318),s=i(71406),a=i.n(s),l="0123456789abcdefghijklmnopqrstuvwxyz";function d(t){return l.charAt(t)}function c(t,e){return t&e}function u(t,e){return t|e}function h(t,e){return t^e}function p(t,e){return t&~e}function f(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function m(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var g,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function v(t){var e,i,n="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),n+=y.charAt(i>>6)+y.charAt(63&i);for(e+1==t.length?(i=parseInt(t.substring(e,e+1),16),n+=y.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),n+=y.charAt(i>>2)+y.charAt((3&i)<<4));(3&n.length)>0;)n+="=";return n}function b(t){var e,i="",n=0,r=0;for(e=0;e>2),r=3&o,n=1):1==n?(i+=d(r<<2|o>>4),r=15&o,n=2):2==n?(i+=d(r),i+=d(o>>2),r=3&o,n=3):(i+=d(r<<2|o>>4),i+=d(15&o),n=0))}return 1==n&&(i+=d(r<<2)),i}var E,S={decode:function(t){var e;if(void 0===E){for(E=Object.create(null),e=0;e<64;++e)E["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(E["-"]=62,E._=63,e=0;e<9;++e)E["= \f\n\r\t \u2028\u2029".charAt(e)]=-1}var i=[],n=0,r=0;for(e=0;e=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,r=0):n<<=6}}switch(r){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=S.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return S.decode(t)}},w=1e13,C=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var i,n,r=this.buf,o=r.length;for(i=0;i0&&(r[i]=e)},t.prototype.sub=function(t){var e,i,n=this.buf,r=n.length;for(e=0;e=0;--n)i+=(w+e[n]).toString().substring(1);return i},t.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*w+t[i];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),T=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,D=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function x(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var Z,I=function(){function t(e,i){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=i)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,i){for(var n="",r=t;r176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var i="",n=t;n191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(n++)):String.fromCharCode((15&r)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return i},t.prototype.parseStringBMP=function(t,e){for(var i,n,r="",o=t;o127,o=r?255:0,s="";n==o&&++t4){for(s=n,i<<=3;0==(128&(+s^o));)s=+s<<1,--i;s="("+i+" bit)\n"}r&&(n-=256);for(var a=new C(n),l=t+1;l=l;--d)o+=a>>d&1?"1":"0";if(o.length>i)return r+x(o,i)}return r+o},t.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return x(this.parseStringISO(t,e),i);var n=e-t,r="("+n+" byte)\n";n>(i/=2)&&(e=t+i);for(var o=t;oi&&(r+="…"),r},t.prototype.parseOID=function(t,e,i){for(var n="",r=new C,o=0,s=t;si)return x(n,i);r=new C,o=0}}return o>0&&(n+=".incomplete"),n},t}(),R=function(){function t(t,e,i,n,r){if(!(n instanceof P))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=n,this.sub=r}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return x(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return x(this.stream.parseStringISO(e,e+i),t);case 30:return x(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+="  ";for(var i=0,n=this.sub.length;i6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===i)return null;e=0;for(var n=0;n>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var i=new C;do{e=t.get(),i.mulAdd(128,127&e)}while(128&e);this.tagNumber=i.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],O=(1<<26)/N[N.length-1],k=function(){function t(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,n=(1<0)for(a>a)>0&&(r=!0,o=d(i));s>=0;)a>(a+=this.DB-e)):(i=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),i>0&&(r=!0),r&&(o+=d(i));return r?o:"0"},t.prototype.negate=function(){var e=M();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var i=M();return this.abs().divRemTo(e,null,i),this.s<0&&i.compareTo(t.ZERO)>0&&e.subTo(i,i),i},t.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new q(e):new B(e),this.exp(t,i)},t.prototype.clone=function(){var t=M();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,n=this.DB-t*this.DB%8,r=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[r++]=i|this.s<=0;)n<8?(i=(this[t]&(1<>(n+=this.DB-8)):(i=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==r&&(128&this.s)!=(128&i)&&++r,(r>0||i!=this.s)&&(e[r++]=i);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=M();return this.bitwiseTo(t,c,e),e},t.prototype.or=function(t){var e=M();return this.bitwiseTo(t,u,e),e},t.prototype.xor=function(t){var e=M();return this.bitwiseTo(t,h,e),e},t.prototype.andNot=function(t){var e=M();return this.bitwiseTo(t,p,e),e},t.prototype.not=function(){for(var t=M(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var c=M();for(n.sqrTo(s[1],c);a<=d;)s[a]=M(),n.mulTo(c,s[a-2],s[a]),a+=2}var u,h,p=t.t-1,f=!0,m=M();for(r=_(t[p])-1;p>=0;){for(r>=l?u=t[p]>>r-l&d:(u=(t[p]&(1<0&&(u|=t[p-1]>>this.DB+r-l)),a=i;0==(1&u);)u>>=1,--a;if((r-=a)<0&&(r+=this.DB,--p),f)s[u].copyTo(o),f=!1;else{for(;a>1;)n.sqrTo(o,m),n.sqrTo(m,o),a-=2;a>0?n.sqrTo(o,m):(h=o,o=m,m=h),n.mulTo(m,s[u],o)}for(;p>=0&&0==(t[p]&1<=0?(n.subTo(r,n),i&&o.subTo(a,o),s.subTo(l,s)):(r.subTo(n,r),i&&a.subTo(o,a),l.subTo(s,l))}return 0!=r.compareTo(t.ONE)?t.ZERO:l.compareTo(e)>=0?l.subtract(e):l.signum()<0?(l.addTo(e,l),l.signum()<0?l.add(e):l):l},t.prototype.pow=function(t){return this.exp(t,new A)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var n=e;e=i,i=n}var r=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(r0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),(r=i.getLowestSetBit())>0&&i.rShiftTo(r,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},t.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=N[N.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,i){var n;if(16==i)n=4;else if(8==i)n=3;else if(256==i)n=8;else if(2==i)n=1;else if(32==i)n=5;else{if(4!=i)return void this.fromRadix(e,i);n=2}this.t=0,this.s=0;for(var r=e.length,o=!1,s=0;--r>=0;){var a=8==n?255&+e[r]:z(e,r);a<0?"-"==e.charAt(r)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&+e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var i=t;i=0;--a)e[a+o+1]=this[a]>>n|s,s=(this[a]&r)<=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var n=t%this.DB,r=this.DB-n,o=(1<>n;for(var s=i+1;s>n;n>0&&(e[this.t-i-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;i>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[i++]=this.DV+n:n>0&&(e[i++]=n),e.t=i,e.clamp()},t.prototype.multiplyTo=function(e,i){var n=this.abs(),r=e.abs(),o=n.t;for(i.t=o+r.t;--o>=0;)i[o]=0;for(o=0;o=0;)t[i]=0;for(i=0;i=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,i,n){var r=e.abs();if(!(r.t<=0)){var o=this.abs();if(o.t0?(r.lShiftTo(d,s),o.lShiftTo(d,n)):(r.copyTo(s),o.copyTo(n));var c=s.t,u=s[c-1];if(0!=u){var h=u*(1<1?s[c-2]>>this.F2:0),p=this.FV/h,f=(1<=0&&(n[n.t++]=1,n.subTo(v,n)),t.ONE.dlShiftTo(c,v),v.subTo(s,s);s.t=0;){var b=n[--g]==u?this.DM:Math.floor(n[g]*p+(n[g-1]+m)*f);if((n[g]+=s.am(0,b,n,y,0,c))0&&n.rShiftTo(d,n),a<0&&t.ZERO.subTo(n,n)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,i){if(e>4294967295||e<1)return t.ONE;var n=M(),r=M(),o=i.convert(this),s=_(e)-1;for(o.copyTo(n);--s>=0;)if(i.sqrTo(n,r),(e&1<0)i.mulTo(r,o,n);else{var a=n;n=r,r=a}return i.revert(n)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),n=U(i),r=M(),o=M(),s="";for(this.divRemTo(n,r,o);r.signum()>0;)s=(i+o.intValue()).toString(t).substr(1)+s,r.divRemTo(n,r,o);return o.intValue().toString(t)+s},t.prototype.fromRadix=function(e,i){this.fromInt(0),null==i&&(i=10);for(var n=this.chunkSize(i),r=Math.pow(i,n),o=!1,s=0,a=0,l=0;l=n&&(this.dMultiply(r),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(i,s)),this.dAddOffset(a,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,i,n){if("number"==typeof i)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),u,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(i);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var r=[],o=7&e;r.length=1+(e>>3),i.nextBytes(r),o>0?r[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;i>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[i++]=n:n<-1&&(e[i++]=this.DV+n),e.t=i,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,i){var n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(var r=i.t-this.t;n=0;)i[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)i=this[0]%t;else for(var n=this.t-1;n>=0;--n)i=(e*i+this[n])%t;return i},t.prototype.millerRabin=function(e){var i=this.subtract(t.ONE),n=i.getLowestSetBit();if(n<=0)return!1;var r=i.shiftRight(n);(e=e+1>>1)>N.length&&(e=N.length);for(var o=M(),s=0;s0&&(i.rShiftTo(s,i),n.rShiftTo(s,n));var a=function(){(o=i.getLowestSetBit())>0&&i.rShiftTo(o,i),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),i.compareTo(n)>=0?(i.subTo(n,i),i.rShiftTo(1,i)):(n.subTo(i,n),n.rShiftTo(1,n)),i.signum()>0?setTimeout(a,0):(s>0&&n.lShiftTo(s,n),setTimeout((function(){e(n)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,i,n,r){if("number"==typeof i)if(e<2)this.fromInt(1);else{this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),u,this),this.isEven()&&this.dAddOffset(1,0);var o=this,s=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(t.ONE.shiftLeft(e-1),o),o.isProbablePrime(i)?setTimeout((function(){r()}),0):setTimeout(s,0)};setTimeout(s,0)}else{var a=[],l=7&e;a.length=1+(e>>3),i.nextBytes(a),l>0?a[0]&=(1<=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),B=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=M();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),L=function(){function t(t){this.m=t,this.r2=M(),this.q3=M(),k.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=M();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function M(){return new k(null)}function V(t,e){return new k(t,e)}var K="undefined"!=typeof navigator;K&&"Microsoft Internet Explorer"==navigator.appName?(k.prototype.am=function(t,e,i,n,r,o){for(var s=32767&e,a=e>>15;--o>=0;){var l=32767&this[t],d=this[t++]>>15,c=a*l+d*s;r=((l=s*l+((32767&c)<<15)+i[n]+(1073741823&r))>>>30)+(c>>>15)+a*d+(r>>>30),i[n++]=1073741823&l}return r},Z=30):K&&"Netscape"!=navigator.appName?(k.prototype.am=function(t,e,i,n,r,o){for(;--o>=0;){var s=e*this[t++]+i[n]+r;r=Math.floor(s/67108864),i[n++]=67108863&s}return r},Z=26):(k.prototype.am=function(t,e,i,n,r,o){for(var s=16383&e,a=e>>14;--o>=0;){var l=16383&this[t],d=this[t++]>>14,c=a*l+d*s;r=((l=s*l+((16383&c)<<14)+i[n]+r)>>28)+(c>>14)+a*d,i[n++]=268435455&l}return r},Z=28),k.prototype.DB=Z,k.prototype.DM=(1<>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}k.ZERO=U(0),k.ONE=U(1);var Y,G,Q=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,i,n;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[i],this.S[i]=n;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),W=null;if(null==W){W=[],G=0;var $=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var J=new Uint32Array(256);for(window.crypto.getRandomValues(J),$=0;$=256||G>=256)window.removeEventListener?window.removeEventListener("mousemove",tt,!1):window.detachEvent&&window.detachEvent("onmousemove",tt);else try{var e=t.x+t.y;W[G++]=255&e,X+=1}catch(t){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",tt,!1):window.attachEvent&&window.attachEvent("onmousemove",tt))}function et(){if(null==Y){for(Y=new Q;G<256;){var t=Math.floor(65536*Math.random());W[G++]=255&t}for(Y.init(W),G=0;G0&&e.length>0?(this.n=V(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=function(t,e){if(e=0&&e>0;){var r=t.charCodeAt(n--);r<128?i[--e]=r:r>127&&r<2048?(i[--e]=63&r|128,i[--e]=r>>6|192):(i[--e]=63&r|128,i[--e]=r>>6&63|128,i[--e]=r>>12|224)}i[--e]=0;for(var o=new it,s=[];e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);i[--e]=s[0]}return i[--e]=2,i[--e]=0,new k(i)}(t,e);if(null==i)return null;var n=this.doPublic(i);if(null==n)return null;for(var r=n.toString(16),o=r.length,s=0;s<2*e-o;s++)r="0"+r;return r},t.prototype.setPrivate=function(t,e,i){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=V(t,16),this.e=parseInt(e,16),this.d=V(i,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,i,n,r,o,s,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=V(t,16),this.e=parseInt(e,16),this.d=V(i,16),this.p=V(n,16),this.q=V(r,16),this.dmp1=V(o,16),this.dmq1=V(s,16),this.coeff=V(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var i=new it,n=t>>1;this.e=parseInt(e,16);for(var r=new k(e,16);;){for(;this.p=new k(t-n,1,i),0!=this.p.subtract(k.ONE).gcd(r).compareTo(k.ONE)||!this.p.isProbablePrime(10););for(;this.q=new k(n,1,i),0!=this.q.subtract(k.ONE).gcd(r).compareTo(k.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(k.ONE),a=this.q.subtract(k.ONE),l=s.multiply(a);if(0==l.gcd(r).compareTo(k.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(l),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=V(t,16),i=this.doPrivate(e);return null==i?null:function(t,e){for(var i=t.toByteArray(),n=0;n=i.length)return null;for(var r="";++n191&&o<224?(r+=String.fromCharCode((31&o)<<6|63&i[n+1]),++n):(r+=String.fromCharCode((15&o)<<12|(63&i[n+1])<<6|63&i[n+2]),n+=2)}return r}(i,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,i){var n=new it,r=t>>1;this.e=parseInt(e,16);var o=new k(e,16),s=this,a=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(k.ONE),n=s.q.subtract(k.ONE),r=e.multiply(n);0==r.gcd(o).compareTo(k.ONE)?(s.n=s.p.multiply(s.q),s.d=o.modInverse(r),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(n),s.coeff=s.q.modInverse(s.p),setTimeout((function(){i()}),0)):setTimeout(a,0)},l=function(){s.q=M(),s.q.fromNumberAsync(r,1,n,(function(){s.q.subtract(k.ONE).gcda(o,(function(t){0==t.compareTo(k.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(l,0)}))}))},d=function(){s.p=M(),s.p.fromNumberAsync(t-r,1,n,(function(){s.p.subtract(k.ONE).gcda(o,(function(t){0==t.compareTo(k.ONE)&&s.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(d,0)}))}))};setTimeout(d,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,i){var n=function(t,e){if(e15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+i).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},st.asn1.DERAbstractString=function(t){st.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},ot.lang.extend(st.asn1.DERAbstractString,st.asn1.ASN1Object),st.asn1.DERAbstractTime=function(t){st.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,i){var n=this.zeroPadding,r=this.localDateToUTC(t),o=String(r.getFullYear());"utc"==e&&(o=o.substr(2,2));var s=o+n(String(r.getMonth()+1),2)+n(String(r.getDate()),2)+n(String(r.getHours()),2)+n(String(r.getMinutes()),2)+n(String(r.getSeconds()),2);if(!0===i){var a=r.getMilliseconds();if(0!=a){var l=n(String(a),3);s=s+"."+(l=l.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,i,n,r,o){var s=new Date(Date.UTC(t,e-1,i,n,r,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},ot.lang.extend(st.asn1.DERAbstractTime,st.asn1.ASN1Object),st.asn1.DERAbstractStructured=function(t){st.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},ot.lang.extend(st.asn1.DERAbstractStructured,st.asn1.ASN1Object),st.asn1.DERBoolean=function(){st.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},ot.lang.extend(st.asn1.DERBoolean,st.asn1.ASN1Object),st.asn1.DERInteger=function(t){st.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=st.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new k(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},ot.lang.extend(st.asn1.DERInteger,st.asn1.ASN1Object),st.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=st.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}st.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7=2?(n[n.length]=r,r=0,o=0):r<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n}(t):S.unarmor(t),r=R.decode(n);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){e=r.sub[1].getHexStringValue(),this.n=V(e,16),i=r.sub[2].getHexStringValue(),this.e=parseInt(i,16);var o=r.sub[3].getHexStringValue();this.d=V(o,16);var s=r.sub[4].getHexStringValue();this.p=V(s,16);var a=r.sub[5].getHexStringValue();this.q=V(a,16);var l=r.sub[6].getHexStringValue();this.dmp1=V(l,16);var d=r.sub[7].getHexStringValue();this.dmq1=V(d,16);var c=r.sub[8].getHexStringValue();this.coeff=V(c,16)}else{if(2!==r.sub.length)return!1;if(r.sub[0].sub){var u=r.sub[1].sub[0];e=u.sub[0].getHexStringValue(),this.n=V(e,16),i=u.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else e=r.sub[0].getHexStringValue(),this.n=V(e,16),i=r.sub[1].getHexStringValue(),this.e=parseInt(i,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new st.asn1.DERInteger({int:0}),new st.asn1.DERInteger({bigint:this.n}),new st.asn1.DERInteger({int:this.e}),new st.asn1.DERInteger({bigint:this.d}),new st.asn1.DERInteger({bigint:this.p}),new st.asn1.DERInteger({bigint:this.q}),new st.asn1.DERInteger({bigint:this.dmp1}),new st.asn1.DERInteger({bigint:this.dmq1}),new st.asn1.DERInteger({bigint:this.coeff})]};return new st.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return v(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new st.asn1.DERSequence({array:[new st.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new st.asn1.DERNull]}),e=new st.asn1.DERSequence({array:[new st.asn1.DERInteger({bigint:this.n}),new st.asn1.DERInteger({int:this.e})]}),i=new st.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new st.asn1.DERSequence({array:[t,i]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return v(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var i="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(i,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(nt),ut=null===(lt={})||void 0===lt?void 0:lt.npm_package_version,ht=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new ct(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(b(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return v(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,i){try{return v(this.getKey().sign(t,e,i))}catch(t){return!1}},t.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,b(e),i)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new ct,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=ut,t}();class pt{static aesEncrypt(t,e){e=e||"kuangkie";var i=a().enc.Utf8.parse(e),n=a().enc.Utf8.parse(t);return a().AES.encrypt(n,i,{mode:a().mode.ECB,padding:a().pad.Pkcs7}).toString()}static aesDecrypt(t,e){let i=e||"kuangkie";var n=a().enc.Utf8.parse(i),r=a().AES.decrypt(t,n,{mode:a().mode.ECB,padding:a().pad.Pkcs7});return a().enc.Utf8.stringify(r).toString()}static rsaEncrypt(t,e){const i=new ht;return i.setPublicKey(e),i.encrypt(t)}static rsaDecrypt(t,e){const i=new ht;return i.setPrivateKey(e),i.decrypt(t)}}var ft=i(97076),mt=i.n(ft),gt=i(5416),yt=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class vt{static requestEnum(t,e,i){return yt(this,void 0,void 0,(function*(){return i?yield this.requestEnumWithPath(t,e,i):yield this.requestEnumWithPath(t,e,"/enum")}))}static requestEnumWithPath(t,e,i){return yt(this,void 0,void 0,(function*(){return e.length>0?(yield r.Z.super({url:n.Z.joinPath("/v3",i),serverKey:t,query:{mstrucIds:e}})).enumMap:{}}))}static requestOptions(t,e){return yt(this,void 0,void 0,(function*(){return yield this.requestEnum(t,[e],null)}))}static requestDtmplConfig(t,e,i){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/dtmpl/config",serverKey:t,method:"GET",query:{sourceId:e,code:i}})).dtmplConfig}))}static requestTtmplConfig(t,e){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/ttmpl/config",serverKey:t,method:"GET",query:{sourceId:e}})).ttmplConfig}))}static requestViewDtmplConfig(t,e){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/view-dtmpl/config",serverKey:t,method:"GET",query:{sourceId:e}})).dtmplConfig}))}static requestAddDtmplConfig(t,e,i){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/add-dtmpl/config",serverKey:t,method:"GET",query:{sourceId:e,addTmplId:i}})).dtmplConfig}))}static requestSelectConfig(t,e){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/select/config",serverKey:t,method:"GET",query:{sourceId:e}})).selectConfig}))}static requestLtmplConfig(t,e){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"/v3/ltmpl/config",serverKey:t,method:"GET",query:{sourceId:e}})}))}static requestL2LtmplConfig(t,e){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"/v3/l2/ltmpl/config",serverKey:t,method:"GET",query:{sourceId:e}})}))}static requestLtmplQueryKey(t,e,i){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"/v3/ltmpl/query/key",serverKey:t,method:"GET",query:Object.assign(Object.assign({},i),{sourceId:e})})}))}static requestLtmplQueryTop(t,e,i){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonLtmplQueryTop(t,e,i,"/v3/ltmpl/top-data")}))}static requestTtmplRootData(t,e,i){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonLtmplQueryTop(t,e,i,"/v3/ttmpl/root-data")}))}static requestMstrucLtmplQueryTop(t,e,i){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonLtmplQueryTop(t,e,i,"/v3/mstruc/ltmpl/top-data")}))}static queryTop1(t,e){return yt(this,void 0,void 0,(function*(){let i=yield this.requestMstrucLtmplQueryTop(t,e,{top:1}),n=null;return i&&i.entities&&i.entities[0]&&(n=i.entities[0].code),n}))}static requestCommonLtmplQueryTop(t,e,i,n){return yt(this,void 0,void 0,(function*(){if(e)return yield r.Z.super({url:n,serverKey:t,method:"GET",query:Object.assign(Object.assign({},i),{sourceId:e})});o.ZP.error("SourceId is undefined!")}))}static requestSelectedData(t,e,i){return yt(this,void 0,void 0,(function*(){if(!i)return o.ZP.warning("没有选择实体"),null;let n=yield r.Z.super({url:"/v3/field-group/data/selected",serverKey:t,query:{codes:i,sourceId:e},method:"GET"});return"success"===n.status?n.entities:(o.ZP.error("没有找到实体!"),null)}))}static requestVersionList(t,e,i){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/dtmpl/data/versions",serverKey:t,query:{pageNo:1,sourceId:e,code:i},method:"GET"})).versions}))}static requestCommonDtmplData(t,e,i,n,s){return yt(this,void 0,void 0,(function*(){let a=yield r.Z.super({url:s,serverKey:t,query:{code:i,versionId:n,sourceId:e},method:"GET"});return"success"===a.status?a.entity:(o.ZP.error("实体不存在!"),null)}))}static requestDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonDtmplData(t,e,i,n,"/v3/dtmpl/data")}))}static getDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){let r;return t&&t.dynamic&&(r=t.entity),r||(r=yield this.requestDtmplData(e,i,n,null)),r}))}static requestMstrucDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonDtmplData(t,e,i,n,"/v3/mstruc/dtmpl/data")}))}static requestViewDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonDtmplData(t,e,i,n,"/v3/view-dtmpl/data")}))}static requestMstrucViewDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){return yield this.requestCommonDtmplData(t,e,i,n,"/v3/mstruc/view-dtmpl/data")}))}static postCommonDtmplData(t,e,i,n,o){return yt(this,void 0,void 0,(function*(){const s=new FormData;for(let t in i)t.startsWith("$virtual")||s.append(t,i[t]||0==i[t]?i[t]:"");s.append("sourceId",e.toString());let a=yield r.Z.super({url:o,serverKey:t,data:s,method:"POST"},"formdata"),l=null;return a?"success"===a.status&&(n&&(a.message?n.warning("保存成功! "+a.message,4):n.success("保存成功! ",1)),l=a.entityCode?a.entityCode:a.code):n&&n.error("保存失败"),{code:l,status:a?a.status:"error"}}))}static postDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){return yield this.postCommonDtmplData(t,e,i,n,"/v3/dtmpl/data")}))}static postMstrucDtmplData(t,e,i,n){return yt(this,void 0,void 0,(function*(){return yield this.postCommonDtmplData(t,e,i,n,"/v3/mstruc/dtmpl/data")}))}static postFileAction(t,e){return n.Z.joinPath(n.Z.api(t),"/v3/upload")}static requestL2LtmplQueryKey(t,e,i){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"v3/l2/ltmpl/query/key",serverKey:t,method:"GET",query:Object.assign(Object.assign({},i),{sourceId:e})})}))}static requestLtmplCount(t,e){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/ltmpl/data/count",serverKey:t,query:{sourceId:e},method:"GET"})).count}))}static requestQueryData(t,e,i){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"/v3/ltmpl/query/data",serverKey:t,method:"GET",query:Object.assign({queryKey:e},i)})}))}static getCodesOfSelectedRows(t){let e=[];if(t&&!(t.length<1)){for(let i of t)i.code?e.push(i.code):o.ZP.error("没找到所选数据的Code!!");return e.length<1&&o.ZP.error("没找到所选数据的Code!!"),e}}static deleteData(t,e,i){return yt(this,void 0,void 0,(function*(){const n=this.getCodesOfSelectedRows(i);return yield this.deleteByCode(t,e,n)}))}static deleteByCode(t,e,i){return yt(this,void 0,void 0,(function*(){return"success"==(yield r.Z.super({url:"/v3/ltmpl/data",serverKey:t,data:{codes:i,sourceId:e},method:"DELETE"})).status?(o.ZP.success("删除成功",1),!0):(o.ZP.error("删除失败"),!1)}))}static requestQueryCount(t,e){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:"/v3/ltmpl/query/count",serverKey:t,method:"GET",query:{queryKey:e}})).count}))}static postActions(t,e,i,n){return yt(this,void 0,void 0,(function*(){const o=this.getCodesOfSelectedRows(i),s=new FormData;for(let t in n)s.append(t,n[t]?n[t]:"");return s.append("sourceId",e.toString()),s.append("codes",o.join(",")),yield r.Z.super({url:"/v3/action",serverKey:t,data:s,method:"POST"},"formdata",null)}))}static increCalc(t,e,i={}){return yt(this,void 0,void 0,(function*(){let n=yield r.Z.super({url:"/v3/stat/increcalc",serverKey:t,method:"POST",data:Object.assign(Object.assign({},i),{sourceId:e})});return"success"===n.status?o.ZP.success("统计成功",1):o.ZP.error("统计失败"),n}))}static doCopy(t,e,i,n,s){return yt(this,void 0,void 0,(function*(){let a=yield r.Z.super({url:"/v3/mstruc/copy-data",serverKey:t,method:"POST",query:{sourceId:e,code:i,copyRelation:n,copyOpp2One:s}},null,null);return"success"==a.status&&a.message&&o.ZP.info("提示信息:"+a.message,4),a.entityCode}))}static queryCode(t,e,i){return yt(this,void 0,void 0,(function*(){let n;return e&&("listop"==e?(n=yield this.queryTop1(i,t),n||(n="bad-code")):"listop-new"==e?n=yield this.queryTop1(i,t):"new"==e&&(n=null)),n}))}static download(t,e){let i=e.split("/"),r=i[i.length-1];n.Z.downloadFile(this.getFileUrl(t,e)+"&disposition=attachment",r)}static openfile(t,e,i){let r=e.split("/"),o=r[r.length-1];n.Z.openFile(this.getFileUrl(t,e),o,i)}static getFileUrl(t,e){const i=n.Z.hydrocarbonToken();return n.Z.joinPath(n.Z.api(t),n.Z.joinPath("/v3/files",e))+`?@token=${i}&@programToken=${n.Z.programCode()}`}static getFileTxtUrl(t,e){const i=n.Z.hydrocarbonToken();return n.Z.joinPath(n.Z.api(t),n.Z.joinPath("/v3/files/text",e))+`?@token=${i}&@programToken=${n.Z.programCode()}`}static loadFileTxt(t,e){return yt(this,void 0,void 0,(function*(){return(yield r.Z.super({url:n.Z.joinPath("/v3/files/text",e),serverKey:t,method:"GET"})).text}))}static requestBlocks(t,e){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"/v3/menu/blocks",method:"GET",query:{l2MenuId:t,blockId:e}})}))}static logout(){return yt(this,void 0,void 0,(function*(){r.Z.super({url:"/v3/auth/token",method:"DELETE"}).then((t=>{n.Z.toLogin()}))}))}static resetPassword(t,e,i,n){return yt(this,void 0,void 0,(function*(){let o=pt.rsaEncrypt(e,n),s=pt.rsaEncrypt(i,n);return yield r.Z.super({url:"/v3/auth/password",serverKey:t,query:{oldPassword:o,newPassword:s},method:"POST"})}))}static getContextSourceConfig(){return yt(this,void 0,void 0,(function*(){let t=yield r.Z.super({url:"/v3/context-source-config",method:"GET"});return t?t.config:null}))}static getContextSourceValue(){return yt(this,void 0,void 0,(function*(){let t=yield r.Z.super({url:"/v3/auth/context-source-value",method:"GET"});return t?t.value:null}))}static login(t,e,i,n,o){return yt(this,void 0,void 0,(function*(){let s=mt()(new Date).format("YYYY-MM-DD HH:mm:ss");t.datetime=s;let a=pt.rsaEncrypt(JSON.stringify(t),n);return yield r.Z.super({url:"/v3/auth/hctoken",header:{programCode:o},query:{userInfo:a,kaptchaToken:e,kaptchaText:i},method:"GET"})}))}static setContext(t){return yt(this,void 0,void 0,(function*(){const e=new FormData;e.append("context",JSON.stringify(t));let i=yield r.Z.super({url:"/v3/auth/context",data:e,method:"POST"},"formdata");return"success"===i.status&&(window.location.hash="#/home"),i}))}static getKaptchaToken(t){return yt(this,void 0,void 0,(function*(){let e=yield r.Z.super({url:"/v3/auth/kaptcha",header:{programCode:t},method:"POST"});return"success"===e.status?e:null}))}static getRasPubkey(t,e){return yt(this,void 0,void 0,(function*(){let i=yield r.Z.super({url:"/v3/auth/ras-pubkey",header:{programCode:e},serverKey:t,method:"GET"});return"success"===i.status?i.rasPubkey:null}))}static getUser(t,e){return yt(this,void 0,void 0,(function*(){let i=yield r.Z.super({header:{programCode:t,hydrocarbonToken:e},url:"/v3/current-user"});return i?i.user:null}))}static requestFastMenu(){return yt(this,void 0,void 0,(function*(){let t=yield r.Z.super({url:"/v3/menu/fast-menu",method:"GET"});return t?t.fastMenu:null}))}static reload(){return yt(this,void 0,void 0,(function*(){return yield r.Z.super({url:"/v3/tmpl/reload",method:"GET"})}))}static initProgramConfig(t){return yt(this,void 0,void 0,(function*(){if(t.programCode&>.cB.setProgramCode(t.programCode),t.hydrocarbonServer&>.cB.setHydrocarbonServer(t.hydrocarbonServer),t.extendServer){let e=t.extendServer;if("object"==typeof e){let t=[];Array.isArray(e)?t=e:t.push(e),gt.cB.putExtendServers(t)}}gt.cB.setProgramName(t.programName),gt.cB.setProgramName_sub(t.programName_sub),gt.cB.setProgramName_NavLeft(t.programName_NavLeft),gt.cB.setProgramName_Logo(t.programName_Logo);let e=yield r.Z.getProramConfig();e&&(gt.cB.setProgramCode(e.programCode),gt.cB.setHydrocarbonServer(e.hydrocarbonServer),gt.cB.setProgramName(e.programName),gt.cB.setProgramName_sub(e.programName_NavLeft),gt.cB.setProgramName_NavLeft(e.programName_NavLeft),gt.cB.setProgramName_Logo(e.programName_Logo))}))}}},60476:function(t,e,i){i(43318),i(17696)},17696:function(t,e,i){i.d(e,{Z:function(){return a}});var n=i(73112),r=i.n(n),o=i(43318),s=i(67188);class a{static super(t,e,i){var n,a;const l=(null===(n=t.header)||void 0===n?void 0:n.hydrocarbonToken)?t.header.hydrocarbonToken:s.Z.hydrocarbonToken()?s.Z.hydrocarbonToken():s.Z.getAnoHydrocarbonToken();let d=null;const c=t.serverKey;let u;d=(null===(a=t.header)||void 0===a?void 0:a.programCode)?t.header.programCode:s.Z.programCode(c),t.data&&!1!==t.data.isShowLoading&&(u=document.getElementById("ajaxLoading"),u.style.display=i||"block");let h="form";"formdata"===e?h=null:"json"===e&&(h="application/json");let p=t.method?t.method:"POST";return new Promise(((e,i)=>{let n=t.hydrocarbonServer?t.hydrocarbonServer:s.Z.api(c);r()(p,s.Z.joinPath(n,t.url)).type(h).set("hydrocarbon-token",l).set("hydrocarbon-program-token",d).query(t.query||"").send(t.data).end(((n,r)=>{if(r)if(t.data&&!1!==t.data.isShowLoading&&(u=document.getElementById("ajaxLoading"),u.style.display="none"),200===r.status){let t=r.body;t&&"error"===t.status&&o.ZP.error("错误消息:"+t.message,6),e(t)}else 201===r.status?e(r):403===r.status?s.Z.toLogin():405===r.status||406===r.status?(o.ZP.error("权限不足"),e(r)):404===r.status||504===r.status?(console.log("没找到服务("+t.url+")",5),e(r)):500===r.status?(r.body&&(o.ZP.error("后台处理错误("+r.body.message+")",5),console.log(r.text)),e(r)):(o.ZP.error("请求服务失败!("+t.url+")",5),i(r.body));else o.ZP.error("服务器连接失败"),e(null)}))}))}static getProramConfig(){return new Promise(((t,e)=>{r().get("programConfig.json").end(((i,n)=>{n?200===n.status?t(n.body):e(n.body):e()}))})).catch((t=>{console.log(t)}))}static getHeaderObj(){return{"hydrocarbon-token":s.Z.hydrocarbonToken()?s.Z.hydrocarbonToken():s.Z.getAnoHydrocarbonToken(),"hydrocarbon-program-token":s.Z.programCode()}}}},43514:function(t,e,i){var n=i(97076),r=i.n(n),o=i(19186);function s(){}s.current=function(t,e){let i=e;if(i||(i="YYYY-MM-DD HH:mm:ss SSS"),!t)return null;let n=[t];t.includes("~")&&(n=t.split("~"));let r=[];for(let t in n){let e=this.currentL1(n[t],i);r[t]=e||""}return 1==n.length?r[0]:r[0]+"~"+r[1]},s.currentL1=function(t,e){if(!t)return null;let i=new RegExp("current:?([-,+]?)([0-9]*)([D,M,Y,m,s,h]?)").exec(t);if(i){let t=i[3];if(""==t)return r()().format(e);{let n=i[1];""==n&&(n="+");let o=i[2];""==o&&(o="1");let s=parseInt(o),a="days";switch(t){case"D":a="days";break;case"M":a="months";break;case"Y":a="years";break;case"W":a="weeks";break;case"h":a="hours";break;case"m":a="minutes";break;case"s":a="seconds"}return"-"==n?r()().subtract(s,a).format(e):r()().add(s,a).format(e)}}return null},s.getFieldValueTitleOfMstrucId=(t,e,i,n)=>{let r=s.getFieldId(t,i),o=e&&e[r];return o?(o=o.indexOf("@R@")>0?e[r].split("@R@")[1]:e[r],"null"==o&&(o=null),o):n},s.getFieldValueCodeOfMstrucId=(t,e,i,n)=>{let r=s.getFieldId(t,i),o=e&&e[r];if(!o)return n;if(o instanceof Array){let t=[];o.forEach((e=>{t.push(e.indexOf("@R@")>0?e.split("@R@")[0]:e)})),o=t.toString()}else o=o.indexOf("@R@")>0?o.split("@R@")[0]:o;return o},s.getFieldValueOfMstrucId=(t,e,i,n)=>{let r=s.getFieldId(t,i),o=e&&e[r];return o?(o=o instanceof Array?o.toString():e[r],o):n},s.getFieldId=(t,e)=>{let i,n=t.groups;if(null!=n)for(let t of n){for(let n of t.fields)if(n.mstrucId==e){i=n.id;break}if(i)break}else{let n=t.columns;if(null!=n)for(let t of n)if(t.mstrucId==e){i=t.id;break}}return i},s.getRelMstrucFieldId=(t,e,i)=>{let n=s.getFieldId(t,i);return e&&e[n]?e[n].split("@R@")[0]:void 0},s.buildInDtmplConfig=(t,e,i)=>{if(!t.buildInFuncFields){let n=[];for(let r of t.groups)for(let s of r.fields)(s.requiredRuleCriterias&&s.requiredRuleCriterias.length>0||s.usableRuleCriterias&&s.usableRuleCriterias.length>0)&&(s.shouldUpdate=!0,n.push(s));t.buildInFuncFields=n}if(t.buildInFuncFields.length>0){function a(e,i,n){for(let e of t.buildInFuncFields)null!=e.requiredRuleCriterias&&e.requiredRuleCriterias.length>0&&(o.Z.isMatch(e.requiredRuleCriterias,[i],n,t)?e.required=!0:e.required=!1),null!=e.usableRuleCriterias&&e.usableRuleCriterias.length>0&&(o.Z.isMatch(e.usableRuleCriterias,[i],n,t)?e.disabled=!1:e.disabled=!0)}return a(0,e,null),t.onValuesChange=(t,e,i)=>{a(0,e,i)},t}return t},e.Z=s},43763:function(t,e,i){i.d(e,{Z:function(){return H}});var n,r=i(35466),o=i(19922),s=i(97912),a=i(65223),l=i(79310),d=i(65675),c=i(80056),u=i(35143),h=i(2855),p=i(49624),f=i(40137),m=i(33075),g=i(61047),y=i(17508),v=i(62135),b=i(98307),E=i(51886),S=i(60513),w=i(24238),C=i(49762),T=i(5416),D=i(94616),x=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class Z{}n=Z,Z.initTtmplNodeConfig=t=>x(void 0,void 0,void 0,(function*(){if(!t)return null;let e=Object.assign({},t);if(e.rootGtmplId){let t=(yield D.Z.requestLtmplConfig(null,e.rootGtmplId)).ltmplConfig;e.rootLTmplConfig=t,e.rootTitleId=t.primaryColumn.id}if(e.branchRatmplId){let t=(yield D.Z.requestLtmplConfig(null,e.branchRatmplId)).ltmplConfig;e.branchLTmplConfig=t,e.branchTitleId=t.primaryColumn.id}if(e.leafRatmplId){let t=(yield D.Z.requestLtmplConfig(null,e.leafRatmplId)).ltmplConfig;e.leafLTmplConfig=t,e.leafTitleId=t.primaryColumn.id}return e})),Z.loadRootNodeData=t=>x(void 0,void 0,void 0,(function*(){let e=yield T.QC.requestTtmplRootData(null,t.id,{}),i=[];return e.entities&&e.entities.forEach(((e,r)=>{i.push(n.toTreeNodeData(e,t.rootTitleId,null,!1,"R"))})),i})),Z.pushNodeData=(t,e,i,r)=>{t.children.splice(0,t.children.length),i&&i.forEach(((i,r)=>{t.children.push(n.toBanchTreeNodeData(i,e,t))})),r&&r.forEach(((i,r)=>{t.children.push(n.toLeafTreeNodeData(i,e,t))}))},Z.pushSameCodeNodeData=(t,e)=>x(void 0,void 0,void 0,(function*(){if(t.length>0){let i,r;e.branchRatmplId&&(i=(yield T.QC.requestLtmplQueryTop(null,e.branchRatmplId,{mainCode:t[0].code})).entities),e.leafRatmplId&&(r=(yield T.QC.requestLtmplQueryTop(null,e.leafRatmplId,{mainCode:t[0].code})).entities);for(let o of t)n.pushNodeData(o,e,i,r)}})),Z.toLeafTreeNodeData=(t,e,i)=>n.toTreeNodeData(t,e.leafTitleId,i,!0,"B"),Z.toBanchTreeNodeData=(t,e,i)=>n.toTreeNodeData(t,e.branchTitleId,i,!1,"L"),Z.toTreeNodeData=(t,e,i,n,o)=>{let s=t.fieldMap[e];return{code:t.code,key:o+(null==i?void 0:i.code)+t.code,name:s,title:r.createElement(r.Fragment,null,r.createElement("span",null,s||t.code)),children:[],isLeaf:n,parent:i}},Z.filterNode=(t,e)=>{let i=[...t.children],r=[],o=[];return i.forEach((t=>{let i=Object.assign({},t);if((i.searchValue?i.searchValue:i.name).indexOf(e)>=0&&r.push(i),i.children&&i.children.length>0){let t=n.filterNode(i,e);t.length>0?(i.children=t,(i.searchValue?i.searchValue:i.name).indexOf(e)<0&&r.push(i)):(i.children=[],o.push(i))}})),t.children=r,r},Z.filterTree=(t,e)=>{let i={code:"",config:void 0,key:void 0,children:[...t]};return n.filterNode(i,e),i.children};var I=Z,R=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const{Text:P,Title:N}=s.default;class O extends r.PureComponent{constructor(){super(...arguments),this.state={data:[],expandedKeys:[],loadedKeys:[],loading:!1,currentEditKey:void 0,parentNodeData:void 0,currentNodeData:void 0,rootAddable:!1,searchValue:void 0},this.doDelete=t=>R(this,void 0,void 0,(function*(){let e,{ttmplNodeConfig:i}=this.props;e=t.isLeaf?i.leafRatmplId:i.branchRatmplId,yield T.QC.deleteByCode(null,e,[t.code]),t.parent&&(yield this.reloadData(t.parent.code))})),this.loadRootNodeData=()=>R(this,void 0,void 0,(function*(){const{ttmplNodeConfig:t}=this.props;return yield I.loadRootNodeData(t)})),this.onExpand=(t,e)=>R(this,void 0,void 0,(function*(){const{ttmplNodeConfig:i}=this.props,{data:n}=this.state;e.expanded&&(yield I.pushSameCodeNodeData([e.node],i)),this.setState({data:[...n],expandedKeys:t})})),this.onClickNode=t=>{const{doEditRoot:e,doViewRoot:i,doViewSub:n,doEditSub:r,ttmplNodeConfig:o}=this.props;t.parent?t.isLeaf?o.leafLTmplConfig.buttons.indexOf("dtmplEdit")>0?r(o.leafTitle,o.leafRatmplId,t.parent.code,t.code):o.leafLTmplConfig.buttons.indexOf("detail")>0&&n(o.leafTitle,o.leafRatmplId,t.parent.code,t.code):o.branchLTmplConfig.buttons.indexOf("dtmplEdit")>0?r(o.branchTitle,o.branchRatmplId,t.parent.code,t.code):o.branchLTmplConfig.buttons.indexOf("detail")>0&&n(o.branchTitle,o.branchRatmplId,t.parent.code,t.code):o.rootLTmplConfig.buttons.indexOf("dtmplEdit")>0?e(o.branchTitle,t.code):o.rootLTmplConfig.buttons.indexOf("detail")>0&&i(o.branchTitle,t.code)},this.stopPropagation=t=>{t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0},this.reloadData=t=>R(this,void 0,void 0,(function*(){const{ttmplNodeConfig:e}=this.props,{data:i,expandedKeys:n}=this.state;let r;if(null==t)r=yield this.loadRootNodeData(),this.mergeRootData(i,r),this.setState({data:r});else{let r=[];this.searchNode(i,t,r),yield I.pushSameCodeNodeData(r,e);let o=[];for(let t of r)o.push(t.key);this.setState({expandedKeys:[...n,...o],data:[...i]})}})),this.mergeRootData=(t,e)=>{if(e&&t)for(let i of e)for(let e of t)if(i.code==e.code){i.children=e.children;break}},this.searchNode=(t,e,i)=>{if(t)for(let n of t){if(n.code==e){i.push(n);break}n.children.length>0&&this.searchNode(n.children,e,i)}},this.getDeleteButton=(t,e)=>{const{doDelete:i}=this.props;return r.createElement("div",{onClick:t=>{this.stopPropagation(t)}},r.createElement(l.Z,{placement:"topLeft",title:"确定要删除吗?",onConfirm:()=>{i(t,e)},okText:"确定",cancelText:"取消"},r.createElement(d.Z,null,r.createElement(c.ZP,{size:"small",danger:!0},r.createElement(y.Z,null)))))},this.getAddButton=(t,e,i,n)=>{const{doAddSub:o}=this.props;return r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),o(t,i,n,null)},size:"small"},e,t)},this.packageTitle=t=>{var e,i,n,o,s,a,l,d;const{doEditRoot:p,doViewRoot:f,doViewSub:m,doEditSub:g,ttmplNodeConfig:y}=this.props;let w=[];return t.parent?t.isLeaf?((null===(e=y.leafLTmplConfig)||void 0===e?void 0:e.buttons.indexOf("dtmplEdit"))>0&&w.push(r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),g(y.leafTitle,y.leafRatmplId,t.parent.code,t.code)},size:"small"},r.createElement(v.Z,null),"编辑")),(null===(i=y.leafLTmplConfig)||void 0===i?void 0:i.buttons.indexOf("detail"))>0&&w.push(r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),m(y.leafTitle,y.leafRatmplId,t.parent.code,t.code)},size:"small"},r.createElement(b.Z,null),"查看")),(null===(n=y.leafLTmplConfig)||void 0===n?void 0:n.buttons.indexOf("singleDelete"))>0&&w.push(this.getDeleteButton(y.leafRatmplId,t.code))):y.branchLTmplConfig&&(y.branchLTmplConfig.buttons.indexOf("dtmplEdit")>0&&w.push(r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),g(y.branchTitle,y.branchRatmplId,t.parent.code,t.code)},size:"small"},r.createElement(v.Z,null),"编辑")),(null===(o=y.branchLTmplConfig)||void 0===o?void 0:o.buttons.indexOf("detail"))>0&&w.push(r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),m(y.branchTitle,y.branchRatmplId,t.parent.code,t.code)},size:"small"},r.createElement(b.Z,null),"查看")),(null===(s=y.branchLTmplConfig)||void 0===s?void 0:s.buttons.indexOf("dtmplAdd"))>0&&w.push(this.getAddButton(y.branchTitle,r.createElement(E.Z,null),y.branchRatmplId,t.code)),(null===(a=y.leafLTmplConfig)||void 0===a?void 0:a.buttons.indexOf("dtmplAdd"))>0&&w.push(this.getAddButton(y.leafTitle,r.createElement(S.Z,null),y.leafRatmplId,t.code)),(null===(l=y.branchLTmplConfig)||void 0===l?void 0:l.buttons.indexOf("singleDelete"))>0&&w.push(this.getDeleteButton(y.branchRatmplId,t.code))):(y.rootLTmplConfig.buttons.indexOf("dtmplEdit")>0&&w.push(r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),p(y.branchTitle,t.code)},size:"small"},r.createElement(v.Z,{style:{color:"blue"}}),"编辑")),y.rootLTmplConfig.buttons.indexOf("detail")>0&&w.push(r.createElement(c.ZP,{onClick:e=>{this.stopPropagation(e),f(y.branchTitle,t.code)},size:"small"},r.createElement(b.Z,null),"查看")),y.branchLTmplConfig&&y.rootLTmplConfig.buttons.indexOf("dtmplAdd")>0&&w.push(this.getAddButton(y.branchTitle,r.createElement(E.Z,null),y.branchRatmplId,t.code)),(null===(d=y.leafLTmplConfig)||void 0===d?void 0:d.buttons.indexOf("dtmplAdd"))>0&&w.push(this.getAddButton(y.leafTitle,r.createElement(S.Z,null),y.leafRatmplId,t.code)),y.rootLTmplConfig.buttons.indexOf("singleDelete")>0&&w.push(this.getDeleteButton(y.branchRatmplId,t.code))),0==w.length?t.title:r.createElement(u.Z,{zIndex:100,content:r.createElement(r.Fragment,null,r.createElement(h.Z,null,w)),arrow:!1},t.title)}}componentDidMount(){return R(this,void 0,void 0,(function*(){yield this.refresh()}))}componentDidUpdate(t){return R(this,void 0,void 0,(function*(){let{ttmplNodeConfig:e}=t,{ttmplNodeConfig:i}=this.props;!i||e&&i.id==e.id||(yield this.refresh())}))}refresh(){return R(this,void 0,void 0,(function*(){const{ttmplNodeConfig:t}=this.props;if(!t)return;this.setState({loading:!0});let e=yield this.loadRootNodeData();this.setState({searchValue:null,data:e,rootAddable:t.rootLTmplConfig.buttons.indexOf("dtmplAdd")>0,loading:!1})}))}componentWillUnmount(){return R(this,void 0,void 0,(function*(){}))}render(){const{doEditRoot:t,ttmplNodeConfig:e}=this.props,{data:i,loading:n,expandedKeys:o,rootAddable:s,searchValue:l}=this.state;let d=i;return l&&(d=I.filterTree(i,l)),r.createElement(r.Fragment,null,r.createElement(p.Z,null,r.createElement(f.Z,{span:24},r.createElement(a.Z,{style:{marginBottom:0,width:"100%"},bordered:!1,bodyStyle:{padding:"4px 2px 4px 8px"}},r.createElement(p.Z,{align:"middle"},r.createElement(f.Z,{span:8},s&&t?r.createElement(c.ZP,{type:"link",onClick:()=>t(e.branchTitle)},"添加"):null),r.createElement(f.Z,{span:16},r.createElement(m.default.Search,{value:l,allowClear:!0,placeholder:"输入查找内容",onChange:t=>{this.setState({searchValue:t.target.value})},onSearch:t=>{this.refresh()},enterButton:r.createElement(w.Z,null)})))))),r.createElement(p.Z,null,r.createElement(f.Z,{span:24},r.createElement(a.Z,{bodyStyle:{padding:"4px 4px 4px 16px",height:"80vh",minWidth:"292px"},loading:n},0==d.length?"没有找到数据":r.createElement(C.ZP,{style:{height:"80vh"},autoHide:!0,autoHideTimeout:1e3},r.createElement(g.Z,{blockNode:!0,showLine:e.showLine,checkable:!1,expandedKeys:o,onExpand:this.onExpand,titleRender:t=>r.createElement("div",{onClick:()=>this.onClickNode(t)},this.packageTitle(t)),treeData:d}))))))}}O.defaultProps={draggable:!1,readOnly:!1};var k=O,A=i(23642),q=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const{Content:B,Sider:L}=o.default,{Text:M,Title:V}=s.default;class K extends r.PureComponent{constructor(){super(...arguments),this.state={ttmplNodeConfig:void 0,recordCode:void 0,showEdit:!1,showView:!1,mainCode:void 0,sourceId:void 0,cardtitle:void 0,addTmplId:void 0},this.refTmplTree=r.createRef(),this.loadData=()=>q(this,void 0,void 0,(function*(){const{ttmplConfig:t}=this.props;let e=yield I.initTtmplNodeConfig(t);this.setState({ttmplNodeConfig:e,showEdit:!1,showView:!1})})),this.onEditRoot=(t,e)=>{const{ttmplConfig:i}=this.props;this.showCard(t,i.rootGtmplId,null,e,!0,!1)},this.showCard=(t,e,i,n,r,o,s)=>{this.setState({mainCode:i,cardtitle:t,recordCode:n,showEdit:r,showView:o,sourceId:e,addTmplId:s})},this.onViewRoot=(t,e)=>{const{ttmplConfig:i}=this.props;this.showCard(t,i.rootGtmplId,null,e,!1,!0,null)},this.onEditSub=(t,e,i,n)=>{this.showCard(t,e,i,n,!0,!1,null)},this.onViewSub=(t,e,i,n)=>{this.showCard(t,e,i,n,!1,!0,null)},this.onDelete=(t,e)=>{A.Z.deleteByCode(null,t,[e])},this.onAddSub=(t,e,i,n)=>{this.showCard(t,e,i,null,!0,!1,n)}}componentDidMount(){return q(this,void 0,void 0,(function*(){yield this.loadData()}))}componentDidUpdate(t){return q(this,void 0,void 0,(function*(){let{ttmplConfig:e}=t,{ttmplConfig:i}=this.props;i&&e&&i.id==e.id||(yield this.loadData())}))}render(){const{}=this.props,{ttmplNodeConfig:t,showView:e,showEdit:i,recordCode:n,mainCode:s,sourceId:l,cardtitle:d,addTmplId:c}=this.state;return t?r.createElement(o.default,{hasSider:!0,style:{backgroundColor:"#fff"}},r.createElement(L,{width:300,theme:"light",style:{height:"90vh",position:"fixed",left:0,top:66,bottom:0,marginLeft:210}},r.createElement(k,{doEditRoot:this.onEditRoot,doEditSub:this.onEditSub,doDelete:this.onDelete,doViewRoot:this.onViewRoot,doViewSub:this.onViewSub,doAddSub:this.onAddSub,ttmplNodeConfig:t,ref:this.refTmplTree})),r.createElement(o.default,{style:{marginLeft:322,backgroundColor:"#fff"}},r.createElement(B,{style:{overflow:"initial"}},i?r.createElement(T.tz,{addTmplId:c,title:r.createElement(r.Fragment,null,n?r.createElement(r.Fragment,null,"编辑 ",d||""):r.createElement(r.Fragment,null,"添加 ",d||"")," "),mainCode:s,sourceId:l,code:n,onOk:t=>{var e,i;null===(i=null===(e=this.refTmplTree)||void 0===e?void 0:e.current)||void 0===i||i.reloadData(s),this.setState({recordCode:t})}}):null,e?r.createElement(T.qX,{mainCode:s,sourceId:l,code:n}):null))):r.createElement(a.Z,{loading:!0})}}K.defaultProps={};var H=K},67188:function(t,e,i){var n=i(97076),r=i.n(n),o=i(43514),s=i(5416);let a;const l={},d={},c={},u={},h={};let p;e.Z={setAntdUseToken(t){p=t},getAntdUseToken(){return p},setAppDtmplConfigFunc(t,e){c[t]=e},getAppDtmplConfig(t,e,i){return t?c[t.id]?c[t.id](t,e,i):o.Z.buildInDtmplConfig(t,e,i):t},isDynamicDtmplConfig(t){return!(!t||!c[t.id])},setCustomPage(t,e){let i=t;i&&(i.startsWith("/")||(i="/"+i),l[i]=e)},setCustomControl(t,e,i){let n=t;n.startsWith("/")||(n="/"+n),d[n]=e,u[n]=i},getCustomViewControl(t){return t?t.startsWith("/")?d[t]:d["/"+t]:null},getCustomEditControl(t){return t?t.startsWith("/")?u[t]:u["/"+t]:null},getCustomPage(t){return t?t.startsWith("/")?l[t]:l["/"+t]:null},setProgramCode(t,e){t&&(e?window.localStorage.setItem(e+"programCode",t):(window.localStorage.setItem("programCode",t),window.sessionStorage.setItem("programCode",t)))},setSessionProgramCode(t){t&&window.sessionStorage.setItem("programCode",t)},programCode(t){let e=null;return e=t?window.localStorage.getItem(t+"programCode"):window.sessionStorage.getItem("programCode"),e||(e=window.localStorage.getItem("programCode"),this.setSessionProgramCode(e)),e},setHydrocarbonServer(t,e){e?window.localStorage.setItem(e+"hydrocarbonServer",t):this.programCode()?window.localStorage.setItem(this.programCode()+"hydrocarbonServer",t):window.localStorage.setItem("hydrocarbonServer",t)},setProgramName_Logo(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_Logo",t):window.localStorage.setItem("programName_Logo",t)},api(t){let e=null;if(e=t?window.localStorage.getItem(t+"hydrocarbonServer"):window.localStorage.getItem(this.programCode()+"hydrocarbonServer"),e||(e=window.localStorage.getItem("hydrocarbonServer")),e)if("/"==e){let t=new URL(window.location.href),i=t.pathname.split("/kuangkie")[0];e=this.joinPath(t.origin,i)}else e.startsWith("http")||(e=this.joinPath(new URL(window.location.href).origin,e));else{let t=new URL(window.location.href),i=null;t.pathname.indexOf("/kuangkie")>0&&(i=t.pathname.split("/kuangkie")[0]),e=this.joinPath(t.origin,i)}return e},hydrocarbonToken(){let t=window.sessionStorage.getItem(this.programCode()+"hydrocarbonToken");return t||(t=window.sessionStorage.getItem("hydrocarbonToken")),t||(t=window.localStorage.getItem(this.programCode()+"hydrocarbonToken"),t||(t=window.sessionStorage.getItem("hydrocarbonToken")),this.setSessionHydrocarbonToken(t)),t},putExtendServers(t){for(let e of t)h[e.key]=e,e.key&&e.hydrocarbonServer&&(s.cB.setProgramCode(e.programCode,e.key),s.cB.setHydrocarbonServer(e.hydrocarbonServer,e.key))},getExtendServers(t){return h[t]},setHydrocarbonToken(t){this.programCode()?(window.sessionStorage.setItem(this.programCode()+"hydrocarbonToken",t),window.localStorage.setItem(this.programCode()+"hydrocarbonToken",t)):(window.sessionStorage.setItem("hydrocarbonToken",t),window.localStorage.setItem("hydrocarbonToken",t))},setSessionHydrocarbonToken(t){this.programCode()?window.sessionStorage.setItem(this.programCode()+"hydrocarbonToken",t):window.sessionStorage.setItem("hydrocarbonToken",t)},setProgramName(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName",t):window.localStorage.setItem("programName",t)},programName(){return this.programCode()?window.localStorage.getItem(this.programCode()+"programName"):window.localStorage.getItem("programName")},setProgramName_sub(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_sub",t):window.localStorage.setItem("programName_sub",t)},programName_sub(){return this.programCode()?window.localStorage.getItem(this.programCode()+"programName_sub"):window.localStorage.getItem("programName_sub")},setProgramName_NavLeft(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_NavLeft",t):window.localStorage.setItem("programName_NavLeft",t)},programName_NavLeft(){let t;return this.programCode()&&(t=window.localStorage.getItem(this.programCode()+"programName_NavLeft")),t||(t=window.localStorage.getItem("programName_NavLeft")),t||"旷识科技"},programName_Logo(){let t=null;return this.programCode()&&(t=window.localStorage.getItem(this.programCode()+"programName_Logo")),t||(t=window.localStorage.getItem("programName_Logo")),t&&"undefined"==t?null:t},formateDate(t){return t?r()(new Date(t)).format("YYYY-MM-DD HH:mm:ss"):""},dateToString(t){let e=t.getFullYear(),i=(t.getMonth()+1).toString(),n=t.getDate().toString();return 1===i.length&&(i="0"+i),1===n.length&&(n="0"+n),e+"-"+i+"-"+n},pagination(t,e){return{onchange:t=>{e(t)},current:t.pageInfo.pageNo,pageSize:t.pageInfo.pageSize,total:t.pageInfo.count,showTotal:()=>`共${t.pageInfo.count}条`,showQuickIumper:!0}},openFile(t,e,i){try{let e=document.createElement("a");e.href=t+i,e.target="_blank",document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(t){console.log(t)}},toLogin(){let t=this.programCode();window.location.hash=t&&"null"!=t&&"undefined"!=t?"#/login/"+t:"#/login"},downloadFile(t,e){try{let i=document.createElement("a");i.download=e,i.href=t,document.body.appendChild(i),i.click(),document.body.removeChild(i)}catch(t){console.log(t)}},downloadFile_old(t){try{let e=document.createElement("form");e.action=t,document.body.appendChild(e),e.submit(),document.body.removeChild(e)}catch(t){console.log(t)}},getRandomNum(t){let e="",i=Math.floor(10*Math.random());e+=0==i?"1":i+"";for(let i=1;i200?"350px":t.length>150?"300px":t.length>100?"250px":t.length>50?"200px":t.length>=20?"160px":"80px";return e.minWidth=i,e},setLocalStorge(t,e,i=60){if(t&&(t=this.getStorageKeyPrefix()+t),e){const n=i||60,r=new Date,o=60*n*1e3;localStorage.setItem(t,JSON.stringify({value:e,expireAddTime:o,expires:r.getTime()+o}))}else localStorage.removeItem(t)},getLocalStorge(t){t&&(t=this.getStorageKeyPrefix()+t);try{let e=JSON.parse(localStorage[t]);return!e||e.expires=0)continue;let n=t[e];[void 0,null].includes(n)?n="":o.push(e)}o.sort();for(let e of o){let i=t[e],n=encodeURI(e);i&&(i&&i.constructor===Array?i.forEach((t=>{r.push(n+"[]="+encodeURI(t))})):r.push(n+"="+encodeURI(i)))}return r.length?n+r.join("&"):""},transQueryStrToParams(t){let e={};const i=t.split("?");if(i&&2==i.length){const t=i[1].split("&");for(let i=0;i0){const n=t[i].split("[]="),r=n[0];e[r]||(e[r]=[]),e[r].push(decodeURI(this.configParamTrans(n[1])))}else{const n=t[i].split("="),r=n[0];r&&(e[r]=decodeURI(this.configParamTrans(n[1])))}}return e},isConfigDefaultValue(t){return!!t&&t.startsWith("$$current")},configParamTrans(t){return t&&t.startsWith&&t.startsWith("$$current")?o.Z.current(t):t},uniq(t,e){const i=[];return t.map((t=>{let n=!0;return i.map((i=>(t[e]===i[e]&&(n=!1),!1))),n&&i.push(t),!1})),i},deepCopy(t){var e=Array.isArray(t)?[]:{};for(var i in t)t.hasOwnProperty(i)&&("object"==typeof t[i]?e[i]=this.deepCopy(t[i]):e[i]=t[i]);return e},getFileUrl(t){if(t){if(t.constructor===String)return t;if(t.constructor===Object){if(t.props.children.props){const{href:e}=t.props.children.props;return e}return t.props.owlner?t.props.owlner:t}return t}return t},getOptionColor(t,e){if(!e)return null;let i;return t&&t.forEach((t=>{t.value!==e||t.color&&(i=t.color)})),i},getFieldItemType(t){return t.extType?t.extType:t.msExtType?t.msExtType:t.msType?t.msType:t.type},isEmpty(t){if(!t)return!0;for(let e in t)return!1;return!0},getDayjsFormat(t){let e="YYYY-MM-DD HH:mm:ss";switch(t){case"daterange-YY":case"date-YY":e="YYYY";break;case"date-M1":case"daterange-M1":e="YYYY-MM";break;case"date":case"daterange":e="YYYY-MM-DD";break;case"datetime-HH":case"datetimerange-HH":e="YYYY-MM-DD HH";break;case"datetime-mm":case"datetimerange-mm":e="YYYY-MM-DD HH:mm";break;case"datetime":case"datetimerange":e="YYYY-MM-DD HH:mm:ss";break;case"timestamp":e="YYYY-MM-DD HH:mm:ss SSS";break;case"time-HH":case"timerange-HH":e="HH";break;case"time-mm":case"timerange-mm":e="HH:mm";break;case"time":case"timerange":e="HH:mm:ss"}return e},getDateTimeFormat(t){switch(t){case"time-HH":case"timerange-HH":case"datetime-HH":case"datetimerange-HH":return"HH";case"time-mm":case"timerange-mm":case"datetime-mm":case"datetimerange-mm":return"HH:mm";case"timestamp":case"time":case"timerange":case"datetime":case"datetimerange":return"HH:mm:ss";default:return""}return""},concatValue(t,e){let i;return i=t?t+"~":"~",e&&(i+=e),i},splitValue(t){let e,i;if(t)if(t.toString().indexOf("~")>=0){let n=t.split("~");e=n[0]?n[0]:void 0,i=n[1]?n[1]:void 0}else e=t;return{valueBegin:e,valueEnd:i}},str2UTF8(t){var e,i,n=new Array;e=t.length;for(var r=0;r=65536&&i<=1114111?(n.push(i>>18&7|240),n.push(i>>12&63|128),n.push(i>>6&63|128),n.push(63&i|128)):i>=2048&&i<=65535?(n.push(i>>12&15|224),n.push(i>>6&63|128),n.push(63&i|128)):i>=128&&i<=2047?(n.push(i>>6&31|192),n.push(63&i|128)):n.push(255&i);return n},joinPath(t,e){let i=t;return i.endsWith("/")||i.endsWith("\\")||(i+="/"),e&&(e.startsWith("/")||i.startsWith("\\")?i+=e.slice(1):i+=e),i},setProgramCode4RoutePath(t){let e=t.programCode;this.setProgramCode(e)},setSessionProgramCode4RoutePath(t){let e=t.programCode;this.setSessionProgramCode(e)}}},45264:function(t,e,i){var n=i(35466),r=i(49624),o=i(40137),s=i(65223),a=i(82740),l=i(6123),d=i(5048),c=i(75150),u=i.p+"images/time-cost-cb40d2c2.png",h=i.p+"images/time-prograss-44b86b36.png",p=i.p+"images/pain-point-8f02421e.png",f=i.p+"images/target-13a5b4b9.png",m=i.p+"images/development-30de07a0.png",g=(i(58226),i(67188)),y=i(84714);class v extends n.Component{constructor(){super(...arguments),this.state={},this.intervals=[],this.componentDidMount=()=>{return t=this,e=void 0,n=function*(){},new((i=void 0)||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}));var t,e,i,n},this.cardStyle={height:"400px"},this.carouselStyle={background:"#fff",borderRadius:"6px"}}componentWillUnmount(){if(this.intervals.length>0)for(let t of this.intervals)clearInterval(t);this.intervals=[]}render(){const{params:t}=this.props;return g.Z.setProgramCode4RoutePath(t),n.createElement(n.Fragment,null,n.createElement(r.Z,{className:"home-page",gutter:{xs:8,sm:16,md:24,lg:32}},n.createElement(o.Z,{span:24},n.createElement(s.Z,{className:"hovercard"},n.createElement(r.Z,{gutter:{xs:8,sm:16,md:24,lg:32}},n.createElement(o.Z,{span:12},n.createElement(a.Z,{src:p})),n.createElement(o.Z,{span:12}," ",n.createElement(a.Z,{src:f}))))),n.createElement(o.Z,{span:24},n.createElement(r.Z,{style:{minHeight:"100px"},gutter:{xs:8,sm:16,md:24,lg:32}},n.createElement(o.Z,{span:12,style:{width:"100%"}},n.createElement(c.Z,{className:"hovercard"}),n.createElement(d.Z,{className:"hovercard"})),n.createElement(o.Z,{span:12,style:{height:"410px"}},n.createElement(s.Z,{className:"hovercard",style:this.cardStyle,bodyStyle:{padding:"2px"}},n.createElement(l.Z,{autoplay:!0},n.createElement("div",null,n.createElement(a.Z,{src:h})),n.createElement("div",null,n.createElement(a.Z,{src:m})),n.createElement("div",null,n.createElement(a.Z,{src:u}))))))),n.createElement(o.Z,{span:24},n.createElement(r.Z,{gutter:{xs:8,sm:16,md:24,lg:32}},n.createElement(o.Z,{style:{width:"100%"}},n.createElement(s.Z,{className:"hovercard",title:"统计视图"},n.createElement(r.Z,{gutter:[{xs:8,sm:16,md:24,lg:32},{xs:8,sm:16,md:24,lg:32}]},n.createElement(o.Z,{span:16,style:{height:"400px"},id:"echart1"}),n.createElement(o.Z,{span:8,style:{height:"400px"},id:"echart2"}))))))))}}(0,y.Z)(v)},5048:function(t,e,i){var n=i(35466),r=i(26626),o=i(80056),s=i(65223),a=i(2855),l=i(44946),d=(i(32733),i(23642)),c=i(94616),u=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class h extends n.PureComponent{constructor(){super(...arguments),this.state={l2Menus:void 0},this.intervals=[]}componentDidMount(){return u(this,void 0,void 0,(function*(){let t=yield c.Z.fastMenu("QuickQueryBar");if(t){for(const e of t)if(!e.disabled&&1==e.displayTotal){let t=setInterval((()=>u(this,void 0,void 0,(function*(){let t=yield d.Z.requestLtmplCount(null,e.id);e.count=t,this.setState({})}))),18e4);this.intervals.push(t);let i=yield d.Z.requestLtmplCount(null,e.id);e.count=i,this.setState({})}this.setState({l2Menus:t})}}))}componentWillUnmount(){if(this.intervals.length>0)for(let t of this.intervals)clearInterval(t);this.intervals=[]}render(){const t=this.props,{title:e}=t,i=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r{if(t.disabled)return null;let e=n.createElement(r.Z,{key:t.id,count:t.count},n.createElement(o.ZP,{shape:"round",icon:n.createElement(l.Z,null),href:`#/${t.id}/act-table?menuId=${t.id}`,size:"large"},t.title));c.push(e)})),n.createElement(s.Z,Object.assign({},i),n.createElement(a.Z,{size:[16,16],wrap:!0},c))}}e.Z=h},75150:function(t,e,i){var n=i(35466),r=i(65223),o=i(62883),s=i(80056),a=i(2855),l=i(88849),d=(i(32733),i(23642)),c=i(94616),u=function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};class h extends n.PureComponent{constructor(){super(...arguments),this.state={l2Menus:void 0},this.intervals=[]}componentDidMount(){return u(this,void 0,void 0,(function*(){let t=yield c.Z.fastMenu("QuickPanel");if(t){for(const e of t){if(e.disabled)continue;let t=setInterval((()=>u(this,void 0,void 0,(function*(){let t=yield d.Z.requestLtmplCount(null,e.id);e.count=t,this.setState({})}))),18e4);this.intervals.push(t);let i=yield d.Z.requestLtmplCount(null,e.id);e.count=i,this.setState({})}this.setState({l2Menus:t})}}))}componentWillUnmount(){if(this.intervals.length>0)for(let t of this.intervals)console.log("workbanch移除定时任务"),clearInterval(t);this.intervals=[]}render(){const t=this.props,{title:e}=t,i=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r{if(t.disabled)return null;let e=n.createElement(r.Z,{size:"small",key:t.id},n.createElement(o.Z,{prefix:n.createElement(l.Z,null),title:t.title,value:t.count}),n.createElement(s.ZP,{style:{marginTop:12},href:`#/${t.id}/act-table?menuId=${t.id}`},"查看"));c.push(e)})),n.createElement(r.Z,Object.assign({size:"small"},i,{title:e||"工作台"}),n.createElement(a.Z,{size:[16,16],wrap:!0},c))}}e.Z=h}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy