2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[159],{33182:function(N,I,e){"use strict";e.d(I,{Z:function(){return B}});var M=e(28991),O=e(67294),V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"}}]},name:"share-alt",theme:"outlined"},x=V,G=e(27029),u=function(R,P){return O.createElement(G.Z,(0,M.Z)((0,M.Z)({},R),{},{ref:P,icon:x}))};u.displayName="ShareAltOutlined";var B=O.forwardRef(u)},38311:function(N){N.exports={shareBox:"shareBox___3MJzO"}},84437:function(N,I,e){"use strict";var M=e(43358),O=e(34041),V=e(49111),x=e(19650),G=e(94233),u=e(51890),B=e(2824),f=e(67294),R=e(30672),P=e(5171),A=e.n(P),d=e(85893),i="userManage",C=t=>{var v=t.onChange,Y=(0,R.YB)(),K=(0,R.I0)(),W=(0,f.useState)([]),T=(0,B.Z)(W,2),o=T[0],S=T[1];return(0,f.useEffect)(()=>(K({type:"".concat(i,"/getUserList"),payload:{currentPage:1,pageSize:1e4},callback:h=>{var D=[];D=h==null?void 0:h.map(m=>({label:(0,d.jsxs)(x.Z,{size:8,align:"center",children:[(0,d.jsx)(u.C,{size:18,src:m.avatar||A(),style:{display:"block"}}),m.nickname||m.name]}),name:m.nickname||m.name,value:m.userID})),S(D)}}),()=>{K({type:"".concat(i,"/clear")})}),[]),(0,d.jsx)(O.Z,{allowClear:!0,showSearch:!0,style:{width:140},placeholder:Y.formatMessage({id:"explorer.search.selectUser"}),options:o,onChange:v,filterOption:(h,D)=>{var m;return((m=D==null?void 0:D.name)!==null&&m!==void 0?m:"").toLowerCase().includes(h.toLowerCase())}})};I.Z=C},42139:function(N,I,e){"use strict";var M=e(11849),O=e(39428),V=e(3182),x=e(57663),G=e(71577),u=e(67294),B=e(30672),f=e(85473),R=e(16894),P=e(37476),A=e(71975),d=e(1977),i=e(85893),C=t=>{var v=(0,B.YB)(),Y=(0,B.v9)(J=>J.common),K=Y.isMobile,W=t.rowKey,T=W===void 0?"":W,o=t.dragSortKey,S=t.isLoading,h=S===void 0?!1:S,D=t.columns,m=D===void 0?[]:D,$=t.data,U=$===void 0?[]:$,j=t.scroll,l=j===void 0?{x:768}:j,_=t.toolbar,E=t.toolbarTitle,Z=t.toolbarAuth,se=t.toolBarRender,p=t.pagination,ne=t.pageChange,re=t.rowClassName,le=t.rowSelection,Q=t.canDragSort,a=Q===void 0?!1:Q,c=t.handleDragSortEnd,_e=t.triggerClick,w=t.modalType,n=t.modalWidth,g=n===void 0?550:n,F=t.title,k=t.visible,b=t.setVisible,q=t.modalChildren,ee=t.afterClose,ae=t.finish,z=t.isSubmitLoading,oe=z===void 0?!1:z,te={title:F,width:K&&w!="modal"?"100%":g,scrollToFirstError:!0,visible:k,onVisibleChange:b,children:q,trigger:(0,i.jsx)(G.Z,{type:"primary",icon:(0,i.jsx)(d.Z,{}),disabled:Z!==void 0?!Z:!1,onClick:_e,children:E||v.formatMessage({id:"common.add"})}),submitter:{submitButtonProps:{loading:oe}},modalProps:{destroyOnClose:!0,maskClosable:!1,afterClose:ee},drawerProps:{destroyOnClose:!0,maskClosable:!1,onClose:ee,className:"selfDrawer",push:{distance:0}},onFinish:function(){var J=(0,V.Z)((0,O.Z)().mark(function r(y){return(0,O.Z)().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.abrupt("return",ae(y));case 1:case"end":return X.stop()}},r)}));function s(r){return J.apply(this,arguments)}return s}()},H={className:"selfTable",loading:h,rowKey:T,columns:m,dataSource:U,scroll:l,rowClassName:re,rowSelection:le,pagination:p?(0,M.Z)((0,M.Z)({},p),{},{current:p==null?void 0:p.currentPage,showSizeChanger:!0}):!1,onChange:ne,headerTitle:_?w==="modal"?(0,i.jsx)(P.Y,(0,M.Z)({},te)):(0,i.jsx)(A.a,(0,M.Z)({},te)):!1,toolBarRender:se};return a&&!K?(0,i.jsx)(f.Z,(0,M.Z)((0,M.Z)({},H),{},{size:"small",search:!1,options:!1,tableAlertRender:!1,dragSortKey:o,onDragSortEnd:c})):(0,i.jsx)(R.ZP,(0,M.Z)((0,M.Z)({},H),{},{size:"small",search:!1,options:!1,tableAlertRender:!1}))};I.Z=C},77796:function(N,I,e){"use strict";var M=e(13062),O=e(71230),V=e(89032),x=e(15746),G=e(90387),u=e(89991),B=e(2824),f=e(67294),R=e(30672),P=e(30381),A=e.n(P),d=e(34540),i=e(85893),C=t=>{var v=(0,R.YB)(),Y=t.marginBtm10,K=t.defaultVal,W=t.timeChange,T=t.isTimeStamp,o=(0,f.useState)(K||"nearlySevenDays"),S=(0,B.Z)(o,2),h=S[0],D=S[1],m=[{label:v.formatMessage({id:"admin.today"}),value:"today"},{label:v.formatMessage({id:"admin.yesterday"}),value:"yesterday"},{label:v.formatMessage({id:"admin.weekDay"}),value:"nearlySevenDays"},{label:v.formatMessage({id:"admin.monthDay"}),value:"theLastThirtyDays"},{label:v.formatMessage({id:"common.all"}),value:"all"},{label:v.formatMessage({id:"common.diy"}),value:"userDefined"}],$=l=>{var _=l.getFullYear(),E=l.getMonth()+1>9?l.getMonth()+1:"0"+(l.getMonth()+1),Z=l.getDate()>9?l.getDate():"0"+l.getDate();return"".concat(_,"-").concat(E,"-").concat(Z)},U=l=>{var _=new Date,E=new Date;return l===1?(_.setTime(_.getTime()-24*60*60*1e3),E.setTime(E.getTime()-24*60*60*1e3)):l>=0&&(_.setTime(_.getTime()-24*60*60*1e3*l),E.setTime(E.getTime())),{timeFrom:l==="all"?void 0:T?parseInt(A()(_).startOf("day").format("X")):$(_),timeTo:l==="all"?void 0:T?parseInt(A()(E).endOf("day").format("X")):$(E)}},j=l=>{var _={};switch(l){case"today":_=U(0);break;case"yesterday":_=U(1);break;case"nearlySevenDays":_=U(7);break;case"theLastThirtyDays":_=U(30);break;case"all":_=U("all");default:break}D(l),Object.keys(_).length&&W(_)};return(0,f.useEffect)(()=>{j(h)},[]),(0,i.jsxs)(O.Z,{gutter:[10,10],style:{marginBottom:Y?10:0},children:[(0,i.jsx)(x.Z,{children:(0,i.jsx)(u.Z,{options:m,value:h,onChange:j})}),h==="userDefined"?(0,i.jsx)(x.Z,{children:(0,i.jsx)(d.Z,{fieldProps:{onChange:(l,_)=>{var E=l?l[0]._d:"",Z=l?l[1]._d:"";W({timeFrom:T?E?parseInt(A()(E).startOf("day").format("X")):void 0:_[0],timeTo:T?Z?parseInt(A()(Z).endOf("day").format("X")):void 0:_[1]})}}})}):(0,i.jsx)(i.Fragment,{})]})};I.Z=C},10719:function(N,I,e){"use strict";e.r(I);var M=e(43358),O=e(34041),V=e(62350),x=e(24565),G=e(57663),u=e(71577),B=e(34792),f=e(48086),R=e(13062),P=e(71230),A=e(89032),d=e(15746),i=e(71153),C=e(60331),t=e(22385),v=e(45777),Y=e(49111),K=e(19650),W=e(94233),T=e(51890),o=e(11849),S=e(47673),h=e(4107),D=e(67294),m=e(30672),$=e(30381),U=e.n($),j=e(3035),l=e(33182),_=e(90631),E=e(42139),Z=e(77796),se=e(84437),p=e(37406),ne=e(5171),re=e.n(ne),le=e(38311),Q=e.n(le),a=e(85893),c="storage",_e=h.Z.Search,w=()=>{var n=(0,m.YB)(),g=(0,m.I0)(),F=(0,m.v9)(s=>(0,o.Z)((0,o.Z)({},s[c]),{},{loading:s.loading.effects["".concat(c,"/getShareList")]})),k=F.page,b=F.searchParams,q=F.loading,ee=q===void 0?!1:q,ae=F.selectedRowKeys,z=ae===void 0?[]:ae,oe=F.shareList,te=[{title:n.formatMessage({id:"explorer.file.sharer"}),dataIndex:"nickname",width:"15%",render:(s,r)=>(0,a.jsxs)(K.Z,{children:[(0,a.jsx)(T.C,{size:38,src:r.avatar||re()}),r.nickname||r.name]})},{title:n.formatMessage({id:"admin.share.name"}),dataIndex:"title"},{title:n.formatMessage({id:"admin.share.type"}),dataIndex:"type",width:"8%",render:(s,r)=>r.isLink?(0,a.jsx)(v.Z,{title:n.formatMessage({id:"explorer.share.linkTo"}),children:(0,a.jsx)(j.Z,{style:{color:"#31dc48"}})}):(0,a.jsx)(v.Z,{title:n.formatMessage({id:"explorer.share.innerTo"}),children:(0,a.jsx)(l.Z,{style:{color:"#722ed1"}})})},{title:n.formatMessage({id:"common.detail"}),dataIndex:"type",width:"8%",render:(s,r)=>r.isLink?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(P.Z,{gutter:[3,3],children:[(0,a.jsx)(d.Z,{children:(0,a.jsx)(v.Z,{title:n.formatMessage({id:"admin.share.linkView"}),children:r.shareHash?(0,a.jsx)("a",{href:"".concat("/","#/sharePage/").concat(encodeURIComponent(r.shareHash)),target:"_blank",children:(0,a.jsxs)(C.Z,{color:"green",children:[n.formatMessage({id:"admin.share.link"}),": ",(0,a.jsx)(j.Z,{style:{color:"#389e0d"}})]})}):(0,a.jsxs)(C.Z,{color:"green",children:[n.formatMessage({id:"admin.share.link"}),": ",(0,a.jsx)(j.Z,{style:{color:"#389e0d"}})]})})}),(0,a.jsx)(d.Z,{children:r.password&&r.password!=="-"&&(0,a.jsxs)(C.Z,{color:"green",children:[n.formatMessage({id:"common.password"}),": ",r.password]})})]})}):(0,a.jsx)(C.Z,{color:"purple",children:n.formatMessage({id:"explorer.share.shareTo"})})},{title:n.formatMessage({id:"explorer.file.viewCnt"}),dataIndex:"numView",width:"10%",sorter:!0},{title:n.formatMessage({id:"explorer.file.downCnt"}),dataIndex:"numDownload",width:"10%",sorter:!0},{title:n.formatMessage({id:"admin.share.expiryTime"}),dataIndex:"timeTo",width:"10%",sorter:!0,render:(s,r)=>{var y=parseInt(U()(new Date).format("X")),L=r.timeTo;return L?L<y?(0,a.jsx)(C.Z,{color:"gold",children:n.formatMessage({id:"admin.share.expired"})}):(0,p.tK)(L):"-"}},{title:n.formatMessage({id:"explorer.file.shareTime"}),dataIndex:"createTime",width:"10%",sorter:!0,render:(s,r)=>r.createTime?(0,p.tK)(r.createTime):"-"},{title:n.formatMessage({id:"explorer.file.action"}),align:"center",dataIndex:"option",width:"10%",render:(s,r)=>(0,a.jsx)(x.Z,{title:n.formatMessage({id:"admin.share.ifDel"}),onConfirm:()=>g({type:"".concat(c,"/cancelShare"),payload:{id:[r.shareID]},callback:()=>f.ZP.success(n.formatMessage({id:"explorer.success"}))}),children:(0,a.jsx)(u.Z,{type:"link",size:"small",children:n.formatMessage({id:"admin.share.rptShareDel"})})},"cancel")}],H=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};g({type:"".concat(c,"/update"),payload:(0,o.Z)({page:(0,o.Z)((0,o.Z)({},k),{},{currentPage:1},r)},y)}),g({type:"".concat(c,"/getShareList")})},J=(s,r,y)=>{var L=s.current,X=s.pageSize,me=y.columnKey,de=y.order,ie={};de&&(ie={sortField:me,sortType:de=="ascend"?"up":"down"}),H({currentPage:L,pageSize:X},{sortParams:ie})};return(0,D.useEffect)(()=>{var s;((s=Object.keys(b))===null||s===void 0?void 0:s.length)&&H()},[JSON.stringify(b)]),(0,D.useEffect)(()=>()=>{g({type:"".concat(c,"/clear")})},[]),(0,a.jsx)("div",{className:"layoutBox",children:(0,a.jsxs)("div",{className:Q().shareBox,children:[(0,a.jsxs)(P.Z,{className:"marginBtm10",gutter:[10,10],justify:"space-between",children:[(0,a.jsx)(d.Z,{children:(0,a.jsxs)(P.Z,{gutter:[10,10],children:[(0,a.jsx)(d.Z,{children:(0,a.jsx)(Z.Z,{defaultVal:"nearlySevenDays",timeChange:s=>g({type:"".concat(c,"/update"),payload:{searchParams:(0,o.Z)((0,o.Z)({},b),s)}}),isTimeStamp:!0})}),(0,a.jsx)(d.Z,{children:(0,a.jsx)(se.Z,{onChange:s=>{g({type:"".concat(c,"/update"),payload:{searchParams:(0,o.Z)((0,o.Z)({},b),{},{userId:s})}})}})}),(0,a.jsx)(d.Z,{children:(0,a.jsx)(O.Z,{allowClear:!0,style:{width:120},placeholder:n.formatMessage({id:"common.type"}),onChange:s=>{g({type:"".concat(c,"/update"),payload:{searchParams:(0,o.Z)((0,o.Z)({},b),{},{type:s})}})},options:[{label:n.formatMessage({id:"explorer.share.linkTo"}),value:"isLink"},{label:n.formatMessage({id:"explorer.share.innerTo"}),value:"isShareTo"}]})})]})}),(0,a.jsx)(d.Z,{children:(0,a.jsxs)(P.Z,{gutter:[10,10],children:[(0,a.jsx)(d.Z,{children:(0,a.jsx)(_e,{allowClear:!0,placeholder:n.formatMessage({id:"explorer.inputSearchWords"}),onSearch:s=>{g({type:"".concat(c,"/update"),payload:{searchParams:(0,o.Z)((0,o.Z)({},b),{},{words:s==null?void 0:s.trim()})}})}})}),(0,a.jsx)(d.Z,{children:(0,a.jsx)(u.Z,{disabled:!(z!=null&&z.length),onClick:()=>{g({type:"".concat(c,"/cancelShare"),payload:{id:z},callback:()=>f.ZP.success(n.formatMessage({id:"explorer.success"}))})},children:n.formatMessage({id:"admin.share.rptShareDel"})})}),(0,a.jsx)(d.Z,{children:(0,a.jsx)(u.Z,{icon:(0,a.jsx)(_.Z,{}),onClick:()=>g({type:"".concat(c,"/exportShare"),callback:s=>{var r=new Blob([s]),y=URL.createObjectURL(r),L=document.createElement("a");L.download="".concat(n.formatMessage({id:"admin.share.shareList"}),".xls"),L.href=y,L.click(),URL.revokeObjectURL(y),L=null}}),children:n.formatMessage({id:"common.export"})})})]})})]}),(0,a.jsx)(E.Z,{rowKey:"shareID",isLoading:ee,columns:te,data:oe,scroll:{x:992},pagination:k,pageChange:J,search:!1,toolbar:!1,rowSelection:{defaultSelectedRowKeys:[],selectedRowKeys:z,onChange:s=>g({type:"".concat(c,"/update"),payload:{selectedRowKeys:s}})}})]})})};I.default=w}}]);
|