filesbox/web/dist/13791.142a1c4a.async.js
2024-07-26 14:10:54 +08:00

4 lines
15 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[13791],{71938:function(T,P,s){"use strict";s.d(P,{Z:function(){return S}});var I=s(28991),x=s(67294),B={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},v=B,A=s(27029),E=function(W,C){return x.createElement(A.Z,(0,I.Z)((0,I.Z)({},W),{},{ref:C,icon:v}))};E.displayName="BranchesOutlined";var S=x.forwardRef(E)},23538:function(T,P,s){"use strict";s.d(P,{Z:function(){return S}});var I=s(28991),x=s(67294),B={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M468 128H160c-17.7 0-32 14.3-32 32v308c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V136c0-4.4-3.6-8-8-8zm-56 284H192V192h220v220zm-138-74h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm194 210H136c-4.4 0-8 3.6-8 8v308c0 17.7 14.3 32 32 32h308c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8zm-56 284H192V612h220v220zm-138-74h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm590-630H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V160c0-17.7-14.3-32-32-32zm-32 284H612V192h220v220zm-138-74h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm194 210h-48c-4.4 0-8 3.6-8 8v134h-78V556c0-4.4-3.6-8-8-8H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h78v102c0 4.4 3.6 8 8 8h190c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8zM746 832h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm142 0h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"qrcode",theme:"outlined"},v=B,A=s(27029),E=function(W,C){return x.createElement(A.Z,(0,I.Z)((0,I.Z)({},W),{},{ref:C,icon:v}))};E.displayName="QrcodeOutlined";var S=x.forwardRef(E)},69413:function(T){T.exports={shareModalBox:"shareModalBox___3aSk_",qrcodeModal:"qrcodeModal___1QDQL"}},13791:function(T,P,s){"use strict";s.r(P),s.d(P,{default:function(){return Be}});var I=s(77883),x=s(85986),B=s(63185),v=s(9676),A=s(14965),E=s(68588),S=s(77576),K=s(12028),W=s(48736),C=s(27049),Fe=s(9715),m=s(55843),$e=s(47673),j=s(4107),He=s(22385),_=s(45777),Ne=s(57663),i=s(71577),ze=s(71194),Me=s(50146),J=s(11849),ke=s(34792),le=s(48086),ge=s(34895),ve=s(28216),X=s(71938),q=s(99165),ee=s(23538),xe=s(19675),Ee=s(51964),De=s.n(Ee),de=s(67294),Oe=s(20640),Pe=s.n(Oe),be=s(84059),Ie=s(27484),D=s.n(Ie),Ce=s(10285),je=s.n(Ce),Ze=s(6833),ye=s.n(Ze),Le=s(96036),Re=s.n(Le),me=s(30672),Ue=s(69413),Te=s.n(Ue),w=s(37406),e=s(85893),ce,he;D().extend(je()),D().extend(ye()),D().extend(Re());var ae="YYYY-MM-DD HH:mm",Be=(ce=(0,ve.$j)(_e=>{var l=_e.common;return{common:l}}),ce(he=class extends de.PureComponent{constructor(){super(...arguments);this.formRef=de.createRef(),this.state={modelZindex:100,showOptions:!1,time:D()().format(ae),changeValue:{},initialValues:{},isinit:!1,shareID:0,networkConfig:{}},this.initShare=()=>{var l=this,a=l.props,h=a.dispatch,u=a.common,se=a.open,fe=a.setOpenModel,V=a.videoOption,te=a.shareData,c=te===void 0?{}:te,o=a.initialState,F=o.currentUser,re=F===void 0?{}:F,$=o.systemInfo,H=$===void 0?{}:$,N=H.networkConfig,Z=N===void 0?"":N,z=re.markConfig,oe=z===void 0?{}:z,ne=oe.shareLinkAllowGuest,p=Z?JSON.parse(Z):{},k=u.sourceID,d=this.state,ue=d.modelZindex,M=d.showOptions,Ae=d.time,y=d.changeValue,L=y===void 0?{}:y;c.isShare?h({type:"common/getshareData",payload:{sourceID:c.sourceID},callback:b=>{var n=b.data||{},g=n.options?JSON.parse(n.options):{},O=[];g.upload&&O.push("4"),g.preview||O.push("1"),g.down||O.push("3"),g.down&&g.downNum&&O.push("2");var Q=D()(n.timeTo).format("YYYY-MM-DD HH:mm"),Y={shareUrl:location.origin+"/#/sharePage/"+encodeURIComponent(n.shareHash),shareIntranet:p.intranet+"/#/sharePage/"+encodeURIComponent(n.shareHash),shareExternal:p.external+"/#/sharePage/"+encodeURIComponent(n.shareHash),password:n.password,title:n.title,mastlogin:ne=="0"?!0:!!g.login,opetimeTo:!!n.timeTo,timeTo:n.timeTo?D()(Q,ae):"",downNum:g.downNum||"",options:O};l.setState({initialValues:Y,changeValue:Y,shareID:n.shareID||0,defultdata:n,networkConfig:p,isinit:!0})}}):l.setState({networkConfig:p,isinit:!0},()=>{l.formRef.current.setFieldsValue({shareUrl:location.origin+"/#/sharePage/"+encodeURIComponent((0,w.HI)(c.sourceID+"&&"+c.shareUserId)),shareIntranet:p.intranet+"/#/sharePage/"+encodeURIComponent((0,w.HI)(c.sourceID+"&&"+c.shareUserId)),shareExternal:p.external+"/#/sharePage/"+encodeURIComponent((0,w.HI)(c.sourceID+"&&"+c.shareUserId)),title:c.name,mastlogin:ne=="0"})})}}componentWillMount(){var l=this;l.initShare()}componentDidMount(){}render(){var l=this,a=(0,me.lw)((0,me.Kd)()),h=l.props,u=h.dispatch,se=h.common,fe=h.open,V=h.setOpenModel,te=h.videoOption,c=h.shareData,o=c===void 0?{}:c,F=h.issmall,re=h.showIndex,$=h.initialState,H=$.currentUser,N=H===void 0?{}:H,Z=N.markConfig,z=Z===void 0?{}:Z,oe=z.shareLinkAllowGuest,ne=se.sourceID,p=se.showmodalList,k=p===void 0?[]:p,d=this.state,ue=d.modelZindex,M=d.showOptions,Ae=d.time,y=d.changeValue,L=y===void 0?{}:y,b=d.initialValues,n=b===void 0?{}:b,g=d.isinit,O=d.shareID,Q=d.networkConfig,Y=t=>{l.setState({modelZindex:t})};function G(t,r){return Math.round(Math.random()*(r-t)+t)}function Se(){for(var t="",r=0;r<6;r++){var R=G(1,3);switch(R){case 1:t+=String.fromCharCode(G(48,57));break;case 2:t+=String.fromCharCode(G(65,90));break;case 3:t+=String.fromCharCode(G(97,122));break}}return t}var f=function(r){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ie=arguments.length>2?arguments[2]:void 0,pe=arguments.length>3?arguments[3]:void 0,U=r.options||[];ie||setTimeout(function(){Pe()("".concat(a.formatMessage({id:"admin.share.name"}),"\uFF1A").concat(r.title||o.name||a.formatMessage({id:"explorer.share.name"}),`\r
`).concat(a.formatMessage({id:"explorer.share.link"})).concat(pe==1?r.shareIntranet:pe==2?r.shareExternal:r.shareUrl,`\r
`).concat(r.password?a.formatMessage({id:"explorer.share.accessPwd"})+r.password:""))},0),u({type:"common/shareSave",payload:{password:r.password||"",sourceID:o.sourceID,timeTo:r.opetimeTo&&r.timeTo?D()(r.timeTo).unix():0,title:r.title||o.name||a.formatMessage({id:"explorer.share.name"}),shareHash:(0,w.HI)(o.sourceID+"&&"+o.shareUserId),options:JSON.stringify({down:U.indexOf("3")>-1?0:1,downNum:U.indexOf("3")>-1||U.indexOf("2")<0?0:r.downNum||0,preview:U.indexOf("1")>-1?0:1,upload:U.indexOf("4")>-1?1:0,login:r.mastlogin?1:0})},callback:Ve=>{Ve.success&&(ie&&window.open(ie),le.ZP.success(a.formatMessage({id:"explorer.success"})),R||(window.zipSourceId=[o.sourceID],u({type:"common/setState",payload:{shareData:{}}}),V(!1,"visible")))}})},Ke=t=>{},We=t=>{var r={};t.options&&t.options.indexOf("3")>-1&&(r={options:t.options.filter(R=>R!="2"),downNum:""},this.formRef.current.setFieldsValue(r)),l.setState({changeValue:(0,J.Z)((0,J.Z)((0,J.Z)({},L),t),r)})},Qe=(t,r)=>{},we=()=>{Me.Z.confirm({content:a.formatMessage({id:"explorer.share.shareLinkRemove"}),okText:a.formatMessage({id:"common.ok"}),cancelText:a.formatMessage({id:"common.cancel"}),onOk:()=>{u({type:"common/shareCancel",payload:{shareID:O},callback:()=>{le.ZP.success(a.formatMessage({id:"explorer.success"})),window.zipSourceId=[o.sourceID],u({type:"common/setState",payload:{shareData:{}}}),V(!1,"visible")}})}})};return g?(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(ge.Z,{open:fe,issmall:F,showIndex:re,modelZindex:ue,setOpenModel:V,setModelZindex:Y,type:"share",title:a.formatMessage({id:"log.file.shareLink"}),children:(0,e.jsx)("div",{className:Te().shareModalBox,children:(0,e.jsx)(De(),{children:(0,e.jsxs)(m.Z,{ref:this.formRef,name:"basic",labelCol:{span:6},wrapperCol:{span:16},initialValues:n,onFinish:f,onFinishFailed:Ke,onValuesChange:We,autoComplete:"off",children:[(0,e.jsx)("div",{style:{display:Q.status==1?"none":""},children:(0,e.jsx)(m.Z.Item,{label:a.formatMessage({id:"explorer.share.link"}),name:"shareUrl",rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(j.Z,{placeholder:"",addonAfter:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.openLink"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,onClick:()=>{if(o.isShare)window.open(n.shareUrl);else{var t=this.formRef.current.getFieldsValue();f(this.formRef.current.getFieldsValue(),1,t.shareUrl)}},icon:(0,e.jsx)(X.Z,{})})}),(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.copyLink"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,icon:(0,e.jsx)(q.Z,{}),onClick:()=>{f(this.formRef.current.getFieldsValue(),1)}})}),(0,e.jsx)(_.Z,{title:a.formatMessage({id:"common.qrcode"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,onClick:()=>{var t=this.formRef.current.getFieldsValue(),r=[...k];r.push({visible:!0,type:"qrcode",qrcodeUrl:t.shareUrl,name:t.title||o.name||a.formatMessage({id:"explorer.share.name"})}),u({type:"common/setState",payload:{showmodalList:[...r]}}),f(t,1)},icon:(0,e.jsx)(ee.Z,{})})})]}),disabled:!0})})}),(0,e.jsxs)("div",{style:{display:Q.status==1?"":"none"},children:[(0,e.jsx)(m.Z.Item,{label:"\u5185\u7F51\u5206\u4EAB\u94FE\u63A5",name:"shareIntranet",rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(j.Z,{placeholder:"",addonAfter:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.openLink"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,onClick:()=>{if(o.isShare)window.open(n.shareIntranet);else{var t=this.formRef.current.getFieldsValue();f(this.formRef.current.getFieldsValue(),1,t.shareIntranet)}},icon:(0,e.jsx)(X.Z,{})})}),(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.copyLink"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,icon:(0,e.jsx)(q.Z,{}),onClick:()=>{f(this.formRef.current.getFieldsValue(),1,"",1)}})}),(0,e.jsx)(_.Z,{title:a.formatMessage({id:"common.qrcode"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,onClick:()=>{var t=this.formRef.current.getFieldsValue(),r=[...k];r.push({visible:!0,type:"qrcode",qrcodeUrl:t.shareIntranet,name:t.title||o.name||a.formatMessage({id:"explorer.share.name"})}),u({type:"common/setState",payload:{showmodalList:[...r]}}),f(t,1,"",1)},icon:(0,e.jsx)(ee.Z,{})})})]}),disabled:!0})}),(0,e.jsx)(m.Z.Item,{label:"\u5916\u7F51\u5206\u4EAB\u94FE\u63A5",name:"shareExternal",rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(j.Z,{placeholder:"",addonAfter:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.openLink"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,onClick:()=>{if(o.isShare)window.open(n.shareExternal);else{var t=this.formRef.current.getFieldsValue();f(this.formRef.current.getFieldsValue(),1,t.shareExternal)}},icon:(0,e.jsx)(X.Z,{})})}),(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.copyLink"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,icon:(0,e.jsx)(q.Z,{}),onClick:()=>{f(this.formRef.current.getFieldsValue(),1,"",2)}})}),(0,e.jsx)(_.Z,{title:a.formatMessage({id:"common.qrcode"}),children:(0,e.jsx)(i.Z,{disabled:!o.canShare,onClick:()=>{var t=this.formRef.current.getFieldsValue(),r=[...k];r.push({visible:!0,type:"qrcode",qrcodeUrl:t.shareExternal,name:t.title||o.name||a.formatMessage({id:"explorer.share.name"})}),u({type:"common/setState",payload:{showmodalList:[...r]}}),f(t,1,"",2)},icon:(0,e.jsx)(ee.Z,{})})})]}),disabled:!0})})]}),(0,e.jsx)(m.Z.Item,{label:a.formatMessage({id:"explorer.share.pwd"}),name:"password",extra:a.formatMessage({id:"explorer.share.randomPwdDesc"}),rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(j.Z,{addonAfter:(0,e.jsx)(_.Z,{title:a.formatMessage({id:"explorer.share.randomPwd"}),children:(0,e.jsx)(i.Z,{onClick:()=>{this.formRef.current.setFieldsValue({password:Se()})},children:a.formatMessage({id:"explorer.share.randomPwd"})})}),maxLength:6,placeholder:a.formatMessage({id:"explorer.share.pwdDesc"})})}),(0,e.jsx)(C.Z,{children:(0,e.jsxs)(i.Z,{onClick:()=>{l.setState({showOptions:!M})},children:[a.formatMessage({id:"explorer.share.advanceSet"}),(0,e.jsx)(xe.Z,{})]})}),(0,e.jsx)(m.Z.Item,{style:{display:M?"":"none"},label:a.formatMessage({id:"explorer.share.name"}),name:"title",rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(j.Z,{allowClear:!0,placeholder:a.formatMessage({id:"explorer.share.nameDesc"})})}),(0,e.jsx)(m.Z.Item,{style:{display:M?"":"none"},label:a.formatMessage({id:"explorer.share.loginLimit"}),name:"mastlogin",extra:a.formatMessage({id:"explorer.share.loginLimitDesc"}),rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],valuePropName:"checked",children:(0,e.jsx)(K.Z,{disabled:oe=="0"})}),(0,e.jsx)(m.Z.Item,{style:{display:M?"":"none"},label:a.formatMessage({id:"explorer.share.time"}),name:"opetimeTo",extra:a.formatMessage({id:"explorer.share.timeLimitDesc"}),rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],valuePropName:"checked",children:(0,e.jsx)(K.Z,{})}),(0,e.jsx)(m.Z.Item,{style:{display:M&&L.opetimeTo?"":"none"},wrapperCol:{offset:6,span:16},name:"timeTo",rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(E.Z,{format:ae,showTime:{format:"HH:mm"}})}),(0,e.jsx)(C.Z,{style:{display:M?"":"none"}}),(0,e.jsx)(m.Z.Item,{style:{display:M?"":"none"},label:a.formatMessage({id:"common.Permissions"}),name:"options",rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsxs)(v.Z.Group,{children:[(0,e.jsxs)(v.Z,{value:"1",children:[" ",a.formatMessage({id:"explorer.share.notView"})," "]}),(0,e.jsx)("br",{}),(0,e.jsxs)(v.Z,{disabled:(L.options||[]).indexOf("3")>-1,value:"2",children:[" ",a.formatMessage({id:"explorer.share.downNum"})," "]})," ",(0,e.jsx)("br",{}),(0,e.jsxs)(v.Z,{value:"3",children:[" ",a.formatMessage({id:"explorer.share.notDown"})," "]})]})}),(0,e.jsx)(m.Z.Item,{style:{display:M&&(L.options||[]).indexOf("2")>-1?"":"none"},label:a.formatMessage({id:"explorer.share.downNumLimit"}),name:"downNum",extra:a.formatMessage({id:"explorer.share.downNumLimitDesc"}),rules:[{required:!1,message:a.formatMessage({id:"common.input"})}],children:(0,e.jsx)(x.Z,{placeholder:"",min:0})}),(0,e.jsxs)(m.Z.Item,{wrapperCol:{span:24},className:"formFooter",children:[o.isShare?(0,e.jsx)(i.Z,{style:{marginRight:12},onClick:()=>{we()},children:a.formatMessage({id:"admin.share.rptShareDel"})}):"",(0,e.jsxs)(i.Z,{type:"primary",htmlType:"submit",disabled:!o.canShare,children:[a.formatMessage({id:"explorer.copy"}),"&",a.formatMessage({id:"common.save"})]})]})]})})})})}):""}})||he)}}]);