2 lines
29 KiB
JavaScript
2 lines
29 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[35843],{7198:function(He){He.exports={fileEditL:"fileEditL___SfEcq",treeDrawer:"treeDrawer___2NoPN",treedragBox:"treedragBox___3EbHC",handleWrapperbtns:"handleWrapperbtns___FW9fO"}},36228:function(He,Ve,u){"use strict";u.d(Ve,{Z:function(){return Ye}});var qe=u(98247),Ne=u.n(qe),ea=u(28216),Re=u(67294),Xe=u(85893),Me,R,Pe,L,k=1,Ee=1,A="dark",Z=[],aa,Ye=(Me=(0,ea.$j)(Oe=>{var M=Oe.common,z=Oe.loading;return{common:M,loading:z.effects["common/getListPath"]}}),R=Reflect.metadata("design:type",Function),Pe=Reflect.metadata("design:paramtypes",[void 0]),Me(L=R(L=Pe(L=class extends Re.Component{constructor(M){var z;super(M);z=this,this.showRemoveBtn=(r,n)=>!n.isFirstNode,this.addDiyDom=(r,n)=>{var i=this,o=this.props,b=o.common,P=o.id,d=P===void 0?"":P,N=o.dispatch,oe=b.isMobile,Ce=5,G=$("#"+n.tId+"_switch"),le=$("#"+n.tId+"_ico");G.remove(),le.before(G);var Ge='<div class="menu-item ripple-item'+(oe?" menu-mobile-item":"")+'"><div class="cert">'+(oe?"\xB7\xB7\xB7":"")+"</div></div>";d!="TS"&&G.before(Ge);var Ze='<span class="space space-level-'+n.level+'" style="width:'+n.level*15+'px"></span>';G.before(Ze),!this.props.showLevel0Icon&&n.level===0&&!n.sourceID&&le.remove(),n!=null&&n.labelId&&le.css({background:n==null?void 0:n.style,borderRadius:"50%",width:"15px",height:"15px"}),oe||$("#"+n.tId+"_a").on("mouseenter mouseleave",function(w){if(w.type=="mouseenter"){var h=w,l=i.props.common.xhovertooltips||{},e=n.sourceID||n.labelId||n.xxicon||n.icon||"",x=l.sourceID||"";if(e==x&&l.visible)return;if(window.xhovertooltipstime&&clearTimeout(window.xhovertooltipstime),window.xleavetooltipstime&&clearTimeout(window.xleavetooltipstime),window.xhuantooltipstime&&clearTimeout(window.xhuantooltipstime),document.onmousemove=_=>{h=_},e!=x&&l.visible){N({type:"common/setState",payload:{xhovertooltips:{visible:!1}}}),window.xhuantooltipstime=setTimeout(function(){N({type:"common/setState",payload:{xhovertooltips:{visible:!0,x:h.pageX,y:h.pageY,sourceID:e,data:n}}})},300);return}window.xhovertooltipstime=setTimeout(function(){N({type:"common/setState",payload:{xhovertooltips:{visible:!0,x:h.pageX,y:h.pageY,sourceID:e,data:n}}})},2e3)}else w.type=="mouseleave"&&(document.onmousemove=null,window.xhovertooltipstime&&clearTimeout(window.xhovertooltipstime),window.xleavetooltipstime&&clearTimeout(window.xleavetooltipstime),window.xhuantooltipstime&&clearTimeout(window.xhuantooltipstime),window.xleavetooltipstime=setTimeout(function(){var _=i.props.common.xhovertooltips||{};!_.visible||N({type:"common/setState",payload:{xhovertooltips:{visible:!1}}})},300))}),this.props.showStatus&&$("#"+n.tId+"_a").addClass("group_status_".concat(n.status))},this.addHoverDom=(r,n)=>{var i=window.$("#"+n.tId+"_span");if(!(n.editNameFlag||window.$("#addBtn_"+n.tId).length>0)){var o="<span class='button add' id='addBtn_"+n.tId+"' title='add node' onfocus='this.blur();' style='margin-left:2px; margin-right: -1px; background-position:-144px 0; vertical-align:top; *vertical-align:middle'></span>";i.after(o);var b=this,P=window.$("#addBtn_"+n.tId);P&&P.bind("click",function(){var d=window.$.fn.zTree.getZTreeObj(r),N="new node"+Ee++,oe=d.addNodes(n,{id:100+Ee,pId:n.id,name:N}),Ce=b.props.addNode(N);return oe[0].id=Ce,!1})}},this.removeHoverDom=(r,n)=>{window.$("#addBtn_"+n.tId).unbind().remove()},this.onDragMove=(r,n,i)=>{this.props.onDragMove&&this.props.onDragMove(r,n,i)},this.dropPrev=(r,n,i)=>{if(this.props.dragSort)return!0;var o=i.getParentNode();if(o&&o.dropInner===!1)return!1;for(var b=0,P=Z.length;b<P;b++){var d=Z[b].getParentNode();if(d&&d!==i.getParentNode()&&d.childOuter===!1)return!1}return!1},this.dropInner=(r,n,i)=>{if(i&&i.dropInner===!1)return!1;for(var o=0,b=Z.length;o<b;o++){if(!i&&Z[o].dropRoot===!1)return!1;if(Z[o].parentTId&&Z[o].getParentNode()!==i&&Z[o].getParentNode().childOuter===!1)return!1}return!0},this.dropNext=(r,n,i)=>{if(this.props.dragSort)return!0;var o=i.getParentNode();if(o&&o.dropInner===!1)return!1;for(var b=0,P=Z.length;b<P;b++){var d=Z[b].getParentNode();if(d&&d!==i.getParentNode()&&d.childOuter===!1)return!1}return!0},this.beforeDrag=(r,n)=>{A=A==="dark"?"":"dark";for(var i=0,o=n.length;i<o;i++){if(n[i].drag===!1)return Z=null,!1;if(n[i].parentTId&&n[i].getParentNode().childDrag===!1)return Z=null,!1}return Z=n,!0},this.beforeDrop=(r,n,i,o,b)=>this.props.dragSort&&this.props.beforeDrop?this.props.beforeDrop(r,n,i,o):(o&&i.parentLevel&&this.props.beforeDrop&&this.props.beforeDrop(r,n,i,o,b),!1),this.onDrop=(r,n,i,o,b,P)=>o?this.props.dragSort?(this.props.onDrop&&this.props.onDrop(i,o),!1):(this.props.onDrop&&this.props.onDrop(i[0].id,o.id,b),!1):!1,this.onExpand=(r,n,i)=>{((i==null?void 0:i.xxicon)=="position"||(i==null?void 0:i.xxicon)=="tool"||(i==null?void 0:i.xxicon)=="tag"||(i==null?void 0:i.xxicon)=="fileType")&&(localStorage[(i==null?void 0:i.xxicon)+"open"]=1)},this.onCollapse=(r,n,i)=>{((i==null?void 0:i.xxicon)=="position"||(i==null?void 0:i.xxicon)=="tool"||(i==null?void 0:i.xxicon)=="tag"||(i==null?void 0:i.xxicon)=="fileType")&&(localStorage[(i==null?void 0:i.xxicon)+"open"]=0)},this.OnClick=function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},b=z,P=z.props.loading;if(P)return!1;z.ztreeObj&&z.ztreeObj.selectNode(i),z.props.OnClick&&z.props.OnClick(r,n,i,o)},this.beforeClick=(r,n,i)=>{var o=this,b=this.props.loading;if(b)return!1},this.onRightClick=(r,n,i)=>{this.ztreeObj&&this.ztreeObj.selectNode(i),this.props.onRightClick&&this.props.onRightClick(r,n,i)},this.beforeMouseDown=(r,n)=>{},this.mouseMove=(r,n)=>{},this.beforeRemove=(r,n)=>{A=A==="dark"?"":"dark";var i=window.$.fn.zTree.getZTreeObj(r);return i.selectNode(n),window.confirm("\u786E\u8BA4\u5220\u9664 \u8282\u70B9 -- "+n.name+" \u5417\uFF1F")},this.onRemove=(r,n,i)=>{this.props.onDeleteNode&&this.props.onDeleteNode(i.id)},this.beforeRename=(r,n,i,o)=>{A=A==="dark"?"":"dark";var b=window.$.fn.zTree.getZTreeObj(r);return i.length==0?(b.setEditable(!1),!1):!0},this.onRename=(r,n,i,o)=>{this.props.onChangeName&&this.props.onChangeName(r,n,i,o)},this.expandAll=()=>{!this.ztreeObj||this.ztreeObj.expandAll(!0)},this.foldAll=()=>{!this.ztreeObj||this.ztreeObj.expandAll(!1)},this.ztreeDom=null,this.setZtree=r=>{this.ztreeDom=r}}componentDidMount(){this.renderZtreeDom()}componentDidUpdate(M){var z=M.common,r=this.props.common;r.isMobile!=z.isMobile}componentWillUnmount(){!this.ztreeObj||this.ztreeObj.destroy()}renderZtreeDom(){var M=this.ztreeObj=window.$.fn.zTree.init(this.getTreeDom(),this.getTreeSetting(),this.props.nodes);return M}getTreeDom(){var M=this.props.common,z=M.isMobile;return window.$(this.ztreeDom)}getTreeSetting(){var M=this.props,z=this.props.common,r=M.edit;r&&(r.showRemoveBtn&&(r.showRemoveBtn=this.showRemoveBtn),r.drag&&(r.drag.prev=r.drag.prev||r.drag.prev===void 0?this.dropPrev:!1,r.drag.inner=r.drag.inner||r.drag.inner===void 0?this.dropInner:!1,r.drag.next=r.drag.next||r.drag.next===void 0?this.dropNext:!1));var n=M.view;n.addDiyDom=this.addDiyDom,n&&n.addHoverDom&&(n.addHoverDom=this.addHoverDom,n.removeHoverDom=this.removeHoverDom);var i={beforeDrag:this.beforeDrag,onDrop:this.onDrop,beforeDrop:this.beforeDrop,beforeRename:this.beforeRename,onRename:this.onRename,onClick:this.OnClick,onRightClick:this.onRightClick,onDragMove:this.onDragMove,onExpand:this.onExpand,onCollapse:this.onCollapse,beforeClick:this.beforeClick};return{treeId:M.treeId,treeObj:M.treeObj,async:M.async,callback:i,check:M.check,data:M.data,edit:r,view:n}}getTreeObj(){return this.ztreeObj}render(){return(0,Xe.jsx)("div",{className:"netdiskZtree",children:(0,Xe.jsx)("div",{className:"ztree",ref:this.setZtree,id:"ztree_leftMenu"+(this.props.id||"")})})}})||L)||L)||L)},35843:function(He,Ve,u){"use strict";u.d(Ve,{Z:function(){return Ge}});var qe=u(57338),Ne=u(273),ea=u(22385),Re=u(45777),Xe=u(34669),Me=u(54458),R=u(39428),Pe=u(91220),L=u(3182),k=u(11849),Ee=u(36228),A=u(37406),Z=u(6700),aa=u(28216),Ye=u(29119),Oe=u(67294),M=u(51964),z=u.n(M),r=u(30672),n=u(96486),i=u.n(n),o=u(69847),b=u(7198),P=u.n(b),d=u(85893),N,oe,Ce,G,le=10,Ge=(N=(0,aa.$j)(Ze=>{var w=Ze.common;return{common:w}}),oe=Reflect.metadata("design:type",Function),Ce=Reflect.metadata("design:paramtypes",[void 0]),N(G=oe(G=Ce(G=class extends Oe.PureComponent{constructor(w){var h;super(w);h=this,this.getauthList=()=>{var l=this,e=l.props,x=e.common,_=e.dispatch,U=e.isShare;_({type:"common/getauthList"})},this.getList=l=>{var e=this,x=e.props,_=x.common,U=x.dispatch,De=x.isShare,W=_.getParams,K=_.viewType,F=_.addressPath,I=_.selectAddressIndex,ie=K==3?F[I]:F[F.length-1];if(K==3){U({payload:(0,k.Z)((0,k.Z)({},l||W),{},{sourceID:ie.sourceID}),type:"common/refreshListPath"});return}U({payload:(0,k.Z)({},l||W),type:"common/getListPath"})},this.getTagList=()=>{var l=this,e=l.props,x=e.dispatch,_=e.common;x({type:"common/getTagList",payload:{}})},this.getListPath=function(l,e){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},U=h,De=U.props,W=De.dispatch,K=De.common,F=K.getParams,I=K.checkFolderParams,ie=K.isShare,Be=K.shareCode,Le=(I==null?void 0:I.sourceID)&&(I==null?void 0:I.sourceID)==l,ue=(I==null?void 0:I.xxicon)&&(I==null?void 0:I.xxicon)==(e==null?void 0:e.xxicon),D=(I==null?void 0:I.icon)&&(I==null?void 0:I.icon)==(e==null?void 0:e.xxicon);if(!(F.repeatSourceID||e.xxicon=="info"||e.infoTypeID)){if(!x){if(Le)return!1;if(ue&&!l)return!1;if(D&&!l)return!1}}var J={recentDoc:"userRencent",position:"files",tool:"tools",tag:"fileTag"},H=(e==null?void 0:e.xxicon)=="position"||(e==null?void 0:e.xxicon)=="tool"||(e==null?void 0:e.xxicon)=="fileType"||(e==null?void 0:e.xxicon)=="tag"||(e==null?void 0:e.xxicon)=="fav"||(e==null?void 0:e.xxicon)=="recycle"||(e==null?void 0:e.xxicon)=="recentDoc"?{block:J[e==null?void 0:e.xxicon]||e.xxicon}:{block:void 0};H.isShare=(e==null?void 0:e.xxicon)=="shareLink"?1:void 0,H.isSharetoMe=(e==null?void 0:e.xxicon)=="shareTo"?1:void 0,H.isShareTo=(e==null?void 0:e.xxicon)=="shareToMe"?1:void 0,H.isinfo=(e==null?void 0:e.xxicon)=="info"||(e==null?void 0:e.icon)=="info"||e!=null&&e.infoTypeID?1:void 0,H.status=(e==null?void 0:e.xxicon)=="info"||(e==null?void 0:e.icon)=="info"||e!=null&&e.infoTypeID?1:void 0;var ve=e!=null&&e.ext||(e==null?void 0:e.xxicon)=="photo"?{fileType:(e==null?void 0:e.ext)||"jpg,jpeg,png,gif,bmp,ico,svg,webp,tif,tiff,cdr,svgz,xbm,eps,pjepg,heic,raw,psd,ai"}:{fileType:void 0};W({type:"common/getListPath",payload:(0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)({},{keyword:"",sourceID:void 0,currentPage:1,fileType:"all",maxSize:void 0,minSize:void 0,pageSize:200,timeFrom:void 0,timeTo:void 0,userID:void 0}),{},{keyword:"",sourceID:l||0,tagID:e.labelId||void 0,infoTypeID:e.infoTypeID||void 0,parentLevel:e.infoTypeID&&e.parentLevel?e.parentLevel+e.infoTypeID+","||0:void 0,currentPage:1},H),ve),_)}),W({type:"common/setState",payload:{getParams:(0,k.Z)((0,k.Z)((0,k.Z)({},{keyword:"",sourceID:void 0,currentPage:1,fileType:"all",maxSize:void 0,minSize:void 0,pageSize:200,timeFrom:void 0,timeTo:void 0,userID:void 0}),{},{keyword:"",sourceID:l||0,tagID:e.labelId||void 0,infoTypeID:e.infoTypeID||void 0,parentLevel:e.infoTypeID&&e.parentLevel&&e.parentLevel||void 0,currentPage:1},H),ve),seniorSearch:{scope:_.fileType||"current",fileContent:!1,bcatchSearch:!1,fileType:"all",fileTypeCustom:[],time:"all",startTimeCustom:"",endTimeCustom:"",fileSize:"all",fileSizestart:"",fileSizeend:"",userId:void 0}}})},this.contextmenuEvent=(l,e,x)=>{var _=this,U=_.props.dispatch;U({type:"common/setState",payload:{openRightMenu:!0,rightMenuEvent:l,rightMenuType:"tree",ztreeMenuParams:{treeId:e,treeNode:x}}})},this.cancelContextmenu=()=>{var l=this,e=l.props,x=e.dispatch,_=e.common,U=_.copyCase;x(U?{type:"common/setState",payload:{openRightMenu:!1}}:{type:"common/setState",payload:{openRightMenu:!1}})},this.isMoveEvent=!1,this.ztreeDom=null,this.ZtreeRef=l=>{this.ztreeDom=l},this.state={width:200,treeinit:!0}}componentDidMount(){var w,h=this,l=h.props,e=l.dispatch,x=l.common,_=l.isShare,U=l.shareCode,De=l.history,W=l.initialState,K=W===void 0?{}:W,F=x.sharePageData,I=x.getParams,ie=x.rootpath,Be=(w=K.currentUser)!==null&&w!==void 0?w:{},Le=Be.desktop,ue=(0,o.jS)("pathName"),D=(0,o.jS)("pathRepeatName"),J=(0,o.jS)("pathSourceID"),H=(0,o.jS)("sureD"),ve=(0,o.jS)("pathLabelId"),fe=(0,o.jS)("pathParentLevel"),de=(0,o.jS)("pathIcon"),Ae=(0,o.jS)("pathHashMd5"),Ue=(0,o.jS)("pathFileType"),ke=(0,o.jS)("pathKeyword"),ye=(0,o.jS)("isDestopView"),$e=(0,A.ej)("token");if(_){var Je=F.shareFile||{};Je.isFolder&&h.getListPath(F.sourceID,{},!0)}else $e&&(e({type:"common/getrootPath",payload:{block:"root"},callback:function(){var We=(0,L.Z)((0,R.Z)().mark(function Se(E,he){var m,Q,V,Fe,me,ze,je,ge,xe,_e;return(0,R.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if((J||ye)&&e({type:"common/setState",payload:{viewFolder:!0,viewFolderPath:{sourceID:J||he},isDestopView:ye=="1"}}),!ye){y.next=42;break}if(m=$.fn.zTree.getZTreeObj("ztree_leftMenuLM"),!(J=="0"&&(de||ve))){y.next=12;break}if(Q=null,Q=de?m.getNodeByParam("xxicon",de,null):m.getNodeByParam("labelId",ve,null),!Q){y.next=10;break}return m.selectNode(Q),m.setting.callback.onClick(null,m.setting.treeId,Q),y.abrupt("return");case 10:y.next=42;break;case 12:if(J!=""){y.next=17;break}return h.getListPath(he,{},!0,{keyword:ke?decodeURIComponent(ke):"",fileType:Ue||""}),y.abrupt("return");case 17:if(!fe){y.next=42;break}if(je=function(){return je=(0,L.Z)((0,R.Z)().mark(function g(a){return(0,R.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(p=>{var c=m.getNodeByParam("sourceID",a,null);c&&m.reAsyncChildNodes(c,"refresh",!1,()=>{p()})}));case 1:case"end":return t.stop()}},g)})),je.apply(this,arguments)},ze=function(g){return je.apply(this,arguments)},me=function(){return me=(0,L.Z)((0,R.Z)().mark(function g(a){var s,t,p;return(0,R.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:s=(0,Pe.Z)(a),v.prev=1,s.s();case 3:if((t=s.n()).done){v.next=9;break}return p=t.value,v.next=7,ze(p);case 7:v.next=3;break;case 9:v.next=14;break;case 11:v.prev=11,v.t0=v.catch(1),s.e(v.t0);case 14:return v.prev=14,s.f(),v.finish(14);case 17:case"end":return v.stop()}},g,null,[[1,11,14,17]])})),me.apply(this,arguments)},Fe=function(g){return me.apply(this,arguments)},V=fe.split(",").filter(ne=>parseInt(ne)),V!=null&&V.length){y.next=25;break}return y.abrupt("return");case 25:return y.next=27,Fe(V);case 27:if(!(de=="filecc"||de=="filenamecc")){y.next=37;break}if(ge=m.getNodeByParam("id",V[(V==null?void 0:V.length)-1],null),!ge){y.next=35;break}return m.selectNode(ge),xe={},de=="filecc"?xe={hashMd5:Ae||"",repeatSourceID:J,fileType:"all",sourceID:0,repeatName:void 0}:xe={repeatName:D?decodeURIComponent(D):"",repeatSourceID:J,fileType:"all",sourceID:0,hashMd5:void 0},m.setting.callback.onClick(null,m.setting.treeId,ge,xe),y.abrupt("return");case 35:y.next=42;break;case 37:if(_e=m.getNodeByParam("id",J,null),!_e){y.next=42;break}return m.selectNode(_e),m.setting.callback.onClick(null,m.setting.treeId,_e),y.abrupt("return");case 42:if(!H){y.next=45;break}return e({type:"common/getsourcePreview",payload:{sourceID:H},callback:function(){var ne=(0,L.Z)((0,R.Z)().mark(function a(s){var t,p,c,v,O,ee,q,X,ce,Y,ae,j,T,pe,se;return(0,R.Z)().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(!s.success){S.next=28;break}if(t=s.data||{},p=t.parentList||[],c=p.map((B,te)=>(B.sourceID=B.id,B)),v=p.length?p[p.length-1]:{},O=t.source||{},ee=p,q=(v==null?void 0:v.sourceID)||O.sourceID||0,e({type:"common/setState",payload:{addressPath:ee.length?ee:[O]}}),window.zipSourceId=p.length?[O.sourceID]:[],he==q&&h.getListPath(q,{},!0),X=$.fn.zTree.getZTreeObj("ztree_leftMenuLM"),!O.parentLevel){S.next=28;break}if(pe=function(){return pe=(0,L.Z)((0,R.Z)().mark(function te(Ie){return(0,R.Z)().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.abrupt("return",new Promise(Te=>{var we=X.getNodeByParam("sourceID",Ie,null);we&&X.reAsyncChildNodes(we,"refresh",!1,()=>{Te()})}));case 1:case"end":return re.stop()}},te)})),pe.apply(this,arguments)},T=function(te){return pe.apply(this,arguments)},j=function(){return j=(0,L.Z)((0,R.Z)().mark(function te(Ie){var f,re,Te;return(0,R.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:f=(0,Pe.Z)(Ie),C.prev=1,f.s();case 3:if((re=f.n()).done){C.next=9;break}return Te=re.value,C.next=7,T(Te);case 7:C.next=3;break;case 9:C.next=14;break;case 11:C.prev=11,C.t0=C.catch(1),f.e(C.t0);case 14:return C.prev=14,f.f(),C.finish(14);case 17:case"end":return C.stop()}},te,null,[[1,11,14,17]])})),j.apply(this,arguments)},ae=function(te){return j.apply(this,arguments)},Y=O.parentLevel.split(",").filter(B=>parseInt(B)).filter(B=>parseInt(B)!=O.sourceID),Y.length||(Y=[q]),(ce=Y)!==null&&ce!==void 0&&ce.length){S.next=21;break}return S.abrupt("return");case 21:return S.next=23,ae(Y);case 23:if(se=X.getNodeByParam("sourceID",q,null),!se){S.next=28;break}return X.selectNode(se),X.setting.callback.onClick(null,X.setting.treeId,se),S.abrupt("return");case 28:case"end":return S.stop()}},a)}));function g(a){return ne.apply(this,arguments)}return g}()}),y.abrupt("return");case 45:h.getListPath(he,{},!0);case 46:case"end":return y.stop()}},Se)}));function Ke(Se,E){return We.apply(this,arguments)}return Ke}()}),h.getTagList()),h.getauthList()}componentDidUpdate(w){var h=this,l=w.common,e=this.props.common;if(e.isMobile!=l.isMobile&&h.setState({treeinit:!1},()=>{setTimeout(function(){h.setState({treeinit:!0})},300)}),e.sourceID&&!l.sourceID){var x=window.$.fn.zTree.getZTreeObj("ztree_leftMenuLM");if(x){var _=x.getNodeByParam("sourceID",e.sourceID,null);x.selectNode(_)}}}componentWillUnmount(){var w=this,h=w.props,l=h.dispatch,e=h.common;l({type:"common/clear"})}rendertreeDragView(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:200,h=this,l=this.props.common;return(0,d.jsxs)("div",{className:P().treedragBox,id:"treedragBox",children:[(0,d.jsxs)("div",{className:"tipBox",children:[(0,d.jsxs)("span",{className:"moveTip",children:[(0,d.jsx)("span",{className:"arrowBox",children:(0,d.jsx)(Z.Z,{})}),"\u79FB\u52A8\u5230\uFF1A",(0,d.jsx)("span",{className:"targetFolderName"})]}),(0,d.jsx)("span",{className:"numBox",children:"1\u4E2A\u9879\u76EE"})]}),(0,d.jsx)("div",{id:"treehtmlBox",style:{width:w},className:"ztree"})]})}render(){var w=this,h=this,l=h.props,e=l.dispatch,x=l.common,_=l.initialState,U=_===void 0?{}:_,De=l.isShare,W=l.shareCode,K=h.state,F=K.width,I=K.treeinit,ie=x.rootpath,Be=x.isMobile,Le=x.treeDrawerOpen,ue=x.toolboxList,D=(0,r.lw)((0,r.Kd)()),J={position:D.formatMessage({id:"explorer.file.address"}),tool:D.formatMessage({id:"explorer.app.groupTools"}),fileType:D.formatMessage({id:"explorer.search.ext"}),tag:D.formatMessage({id:"explorer.tag.name"}),fav:D.formatMessage({id:"explorer.toolbar.fav"}),space:D.formatMessage({id:"explorer.toolbar.rootPath"}),box:"",recentDoc:D.formatMessage({id:"explorer.toolbar.recentDoc"}),shareTo:D.formatMessage({id:"explorer.toolbar.shareTo"}),shareLink:D.formatMessage({id:"explorer.toolbar.shareLink"}),photo:D.formatMessage({id:"explorer.toolbar.photo"}),recycle:D.formatMessage({id:"explorer.toolbar.recycle"}),doc:D.formatMessage({id:"explorer.type.doc"}),image:D.formatMessage({id:"explorer.type.image"}),music:D.formatMessage({id:"explorer.type.music"}),movie:D.formatMessage({id:"explorer.type.movie"}),zip:D.formatMessage({id:"explorer.type.zip"}),other:D.formatMessage({id:"explorer.type.others"}),info:D.formatMessage({id:"information-news"}),toolbox:D.formatMessage({id:"explorer.toolbar.tool"}),safe:D.formatMessage({id:"common.Privatesafe"})};function H(g,a,s){var t=[];if(s.success)if((a==null?void 0:a.xxicon)=="info"){for(var p=s.data||[],c=[],v=0;v<p.length;v++){var O=p[v],ee=O.children||[];c.push(O);for(var q=0;q<ee.length;q++){var X=ee[q],ce=X.children||[];c.push(X);for(var Y=0;Y<ce.length;Y++){var ae=ce[Y];c.push(ae)}}}for(var j=0;j<c.length;j++){var T=c[j],pe=j+1,se=T.icon||"folder",be=(T.auth||"").split(","),S=!!T.children.length,B=(T==null?void 0:T.sourceHash)=="safe"?o.q0.safe:o.q0[T.icon||"folder"];delete T.icon,delete T.children,t.push((0,k.Z)((0,k.Z)({},T),{},{id:"infoTypeID"+T.infoTypeID,pId:T.parentID?"infoTypeID"+T.parentID:a.id,isParent:S,name:T.typeName,oldName:T.typeName,xxicon:"",icon:void 0,drag:!1,childOuter:!1}))}}else for(var te=s.data||((a==null?void 0:a.xxicon)=="tag"?[]:{}),Ie=(a==null?void 0:a.xxicon)=="tag"?te||[]:te.folderList||[],j=0;j<Ie.length;j++){var f=Ie[j],re=j+1,Te=(f==null?void 0:f.sourceHash)=="safe"?o.q0.safe:o.q0[f.icon],we=J[f!=null&&f.sourceHash&&(f==null?void 0:f.sourceHash)=="safe"?f==null?void 0:f.sourceHash:f.icon]||"",C=f.icon,ia=(f.auth||"").split(",");delete f.icon,t.push((0,k.Z)((0,k.Z)({},f),{},{id:(a==null?void 0:a.xxicon)=="position"||(a==null?void 0:a.xxicon)=="tool"||(a==null?void 0:a.xxicon)=="fileType"||(a==null?void 0:a.xxicon)=="tag"?a.id+""+re:f.sourceID||"labelId"+f.labelId,pId:a.id,isParent:C=="fav"||C=="shareToMe"?!1:f.isChildren||!!f.hasFolder,name:we||f.name||f.labelName,oldName:we||f.name||f.labelName,xxicon:C,icon:Te,drag:(a==null?void 0:a.xxicon)=="position"||(a==null?void 0:a.xxicon)=="tool"||(a==null?void 0:a.xxicon)=="fileType"||(a==null?void 0:a.xxicon)=="tag"||ia.indexOf("8")<0?!1:void 0,childOuter:(a==null?void 0:a.xxicon)=="position"||(a==null?void 0:a.xxicon)=="tool"||(a==null?void 0:a.xxicon)=="fileType"||(a==null?void 0:a.xxicon)=="tag"?!1:void 0}))}return e({type:"common/setState",payload:{rootpath:[...ie,...t]}}),t}function ve(g,a){var s=(a==null?void 0:a.xxicon)=="position"?"files":(a==null?void 0:a.xxicon)=="tool"?"tools":(a==null?void 0:a.xxicon)=="fileType"?"fileType":(a==null?void 0:a.xxicon)=="tag"?"fileTag":"";return(a==null?void 0:a.xxicon)=="info"?"/api/disk/getInfoTypeList":De?"/api/disk/share/menu?shareCode="+W:(a==null?void 0:a.xxicon)=="tag"?"/api/disk/tag/list":"/api/disk/list/path"+(s?"?block="+s:"")}var fe={edit:{enable:!0,editNameSelectAll:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{autoExpandTrigger:!0}},view:{showLine:!1,showIcon:!0,selectedMulti:!1,dblClickExpand:!1},data:{simpleData:{enable:!0}},async:{enable:!0,url:ve,autoParam:["sourceID"],otherParam:["currentPage",1,"fileType","folder","pageSize",500],headers:{token:(0,A.ej)("token")},type:"get",dataFilter:H}},de=g=>{h.setState({width:g})},Ae=fe.edit,Ue=fe.view,ke=fe.data,ye=fe.async,$e=U.currentUser,Je=$e===void 0?{}:$e,We=Je.targetSpace,Ke=We===void 0?{}:We,Se=Ke.sizeMax,E=Se===void 0?0:Se,he=Ke.sizeUse,m=he===void 0?0:he,Q=[],V=(g,a)=>{if(g!=null&&g.parentTId){var s=a.getNodeByTId(g==null?void 0:g.parentTId);delete s.children,delete s.createUserInfo,delete s.modifyUserInfo,Q=s!=null&&s.parentTId?[s,...Q]:Q,s!=null&&s.parentTId&&V(s,a)}},Fe=(g,a,s)=>{var t=[];Q=[];var p=s,c=window.$.fn.zTree.getZTreeObj(a);return delete p.children,delete p.createUserInfo,delete p.modifyUserInfo,t=[p],s!=null&&s.parentTId&&V(s,c),[...Q,...t]},me=(g,a,s,t)=>{var p=window.$.fn.zTree.getZTreeObj(a),c=s;if(s.name===s.oldName)return p.cancelEditName(),!1;e({type:s.labelId?"common/editTag":"common/operation",payload:s.labelId?{labelId:s.labelId,labelName:s.name,style:s.style}:{dataArr:[{name:s.name,oldName:s.oldName,parentID:s.parentID,parentLevel:s.parentLevel,sourceID:s.sourceID,type:s.isFolder?"folder":"file"}],operation:"rename"},callback:v=>{v.success&&(c.oldName=s.name,p.editName(c),p.setEditable(!1),this.getList())}})},ze=g=>{},je=(g,a,s,t,p)=>{},ge=(g,a,s,t)=>{var p=window.$.fn.zTree.getZTreeObj(g),c=a[0];e({type:"common/operation",payload:{dataArr:[{name:c.name,parentID:c.parentID,parentLevel:c.parentLevel,sourceID:c.sourceID,type:c.isFolder?"folder":"file"}],sourceID:s.sourceID,operation:"move",sourceLevel:s.parentLevel},callback:v=>{var O=(0,r.lw)((0,r.Kd)());v.success&&(p.removeNode(c),c.parentID=s.sourceID,c.parentLevel=s.parentLevel,p.addNodes(s,c))}})},xe=g=>100,_e=function(a,s){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],p=w,c=t[0],v=t.length>0,O=$("#treedragBox"),ee=$("#treehtmlBox");if(ee.html(""),v){var q=$("#"+c.tId),X=a.clientX,ce=a.clientY,Y=q.offset(),ae=O.find(".tipBox"),j=ae.find(".targetFolderName"),T=ae.find(".moveTip"),pe=ae.find(".numBox");ee.html('<li id="ztree_leftMenu1_22" class="level2" tabindex="0" hidefocus="true" treenode=""><a id="ztree_leftMenu1_22_a" class="level2 curSelectedNode" treenode_a="" target="_blank" style="" title="Z"><div class="menu-item ripple-item"><div class="cert"></div></div><span class="space space-level-2" style="width:30px"></span><span id="ztree_leftMenu1_22_switch" title="" class="button level2 switch noline_docu" treenode_switch=""></span><span id="ztree_leftMenu1_22_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="ztree_leftMenu1_22_span" class="node_name">'.concat(c.name,"</span></a></li>")),O.css({transition:"none",top:ce+le,left:X+le}).hide();var se=!1;p.isMoveEvent=!1,(0,o.Y0)(be=>{var S=$(be.target);if(se=(S.attr("treenode_a")!=null?S:S.parent()).attr("treenode_a")!=null,p.isMoveEvent=!0,se){var B=S.attr("title");j.html(B),T.show(),pe.hide()}else T.hide(),pe.show();ae.show(),O.css({top:be.clientY+le,left:be.clientX+le}).show()},be=>{ae.hide(),se?O.hide():(ee.html('<li id="ztree_leftMenu1_22" class="level2" tabindex="0" hidefocus="true" treenode=""><a id="ztree_leftMenu1_22_a" class="level2 curSelectedNode" treenode_a="" target="_blank" style="" title="Z"><div class="menu-item ripple-item"><div class="cert"></div></div><span class="space space-level-2" style="width:30px"></span><span id="ztree_leftMenu1_22_switch" title="" class="button level2 switch noline_docu" treenode_switch=""></span><span id="ztree_leftMenu1_22_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="ztree_leftMenu1_22_span" class="node_name">'.concat(c.name,"</span></a></li>")),O.css({transition:"all 0.3s",top:Y.top-5,left:Y.left-5}),setTimeout(()=>{O.hide()},300))})}},Qe=function(a,s,t){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(a==null||a.preventDefault(),(a==null?void 0:a.target.className)=="menu-item ripple-item"||(a==null?void 0:a.target.className)=="cert"){h.contextmenuEvent(a,s,t);return}var c=t;if(delete c.children,delete c.createUserInfo,delete c.modifyUserInfo,t.sourceID||t.xxicon=="fav"||t.xxicon=="recycle"||t.xxicon=="recentDoc"||t.xxicon=="photo"||t.xxicon=="position"||t.xxicon=="tool"||t.xxicon=="fileType"||t.xxicon=="tag"||t.xxicon=="shareLink"||t.xxicon=="shareTo"||t.xxicon=="shareToMe"||t.xxicon=="info"||t.ext||t.extType=="other"||t.labelId||t.infoTypeID){var v;(v=Object.keys(p))!==null&&v!==void 0&&v.length?h.getListPath(t.sourceID,t,!0,p):h.getListPath(t.sourceID,t)}t.xxicon=="toolbox"&&e({type:"common/setState",payload:{listData:{fileList:ue,total:ue==null?void 0:ue.length},getParams:(0,k.Z)((0,k.Z)({},w.props.common.getParams),{},{block:"toolbox"})}}),e({type:"common/setState",payload:{sourceID:t.sourceID||0,addressPath:t!=null&&t.parentTId?Fe(a,s,t):[c],checkFolderParams:t,checkFileParams:{},selectIds:[],selectItems:[],treeDrawerOpen:!1,isUpdatePathLog:!0}})},y=(g,a,s)=>{h.contextmenuEvent(g,a,s)},ne=()=>{e({type:"common/setState",payload:{treeDrawerOpen:!1}})};return Be?(0,d.jsx)(Ne.Z,{placement:"left",closable:!1,onClose:ne,open:Le,width:"75%",className:P().treeDrawer,forceRender:!0,bodyStyle:{padding:0,overflowX:"hidden"},children:(0,d.jsxs)("div",{className:P().fileEditL+" nouserselect",children:[(0,d.jsx)("div",{className:"fileEditLT",children:(0,d.jsxs)(z(),{children:[" ",ie.length&&I?(0,d.jsx)(Ee.Z,{id:"LM",nodes:ie,ref:this.ZtreeRef,treeName:"treeDemo",edit:Ae,view:Ue,data:ke,async:ye,onChangeName:me,onDeleteNode:ze,beforeDrop:ge,OnClick:Qe,onRightClick:y,onDragMove:_e,addNode:xe}):""]})}),W?"":(0,d.jsxs)("div",{className:"fileEditLB",children:[(0,d.jsx)(Re.Z,{title:(m===0||E===0?0:m/(E*1024*1024*1024)*100).toFixed(2)+"%",children:(0,d.jsx)(Me.Z,{percent:m===0||E===0?0:m/(E*1024*1024*1024)*100,strokeColor:(m===0||E===0?0:m/(E*1024*1024*1024)*100)>90?"#f00":"#722ed1",showInfo:!1,size:"small"})}),(0,A.NR)(m)," /"," ",E===0?"\u4E0D\u9650\u5236":(0,A.NR)(E*1024*1024*1024)]})]})}):(0,d.jsxs)(Ye.e,{className:P().fileEditL+" mouseBox nouserselect",enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},handleWrapperClass:P().handleWrapperbtns,size:{width:F,height:"100%"},maxWidth:500,onResizeStop:(g,a,s,t)=>{de(F+t.width),clearTimeout(window.timeOutIndex),window.timeOutIndex=setTimeout(()=>{e({type:"common/setItemMargin"})},600)},onMouseDown:g=>{h.cancelContextmenu()},children:[(0,d.jsx)("div",{className:"fileEditLT",children:(0,d.jsxs)(z(),{children:[" ",ie.length?(0,d.jsx)(Ee.Z,{id:"LM",nodes:ie,ref:this.ZtreeRef,treeName:"treeDemo",edit:Ae,view:Ue,data:ke,async:ye,onChangeName:me,onDeleteNode:ze,beforeDrop:ge,OnClick:Qe,onRightClick:y,onDragMove:_e,addNode:xe}):""]})}),W?"":(0,d.jsxs)("div",{className:"fileEditLB",children:[(0,d.jsx)(Re.Z,{title:(m===0||E===0?0:m/(E*1024*1024*1024)*100).toFixed(2)+"%",children:(0,d.jsx)(Me.Z,{percent:m===0||E===0?0:m/(E*1024*1024*1024)*100,strokeColor:(m===0||E===0?0:m/(E*1024*1024*1024)*100)>90?"#f00":"#722ed1",showInfo:!1,size:"small"})}),(0,A.NR)(m)," /"," ",E===0?"\u4E0D\u9650\u5236":(0,A.NR)(E*1024*1024*1024)]}),this.rendertreeDragView(F)]})}})||G)||G)||G)}}]);
|