You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
14 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[366],{34994:function(Ge,w,e){e.d(w,{A:function(){return C}});var y=e(1413),P=e(8232),h=e(67294),V=e(78733),ue=e(9105),Z=e(4942),k=e(97685),ce=e(87462),ve=e(50756),ge=e(46976),pe=function(v,B){return h.createElement(ge.Z,(0,ce.Z)({},v,{ref:B,icon:ve.Z}))},l=h.forwardRef(pe),M=l,fe=e(21770),me=e(48874),he=e(28459),xe=e(42075),ye=e(93967),q=e.n(ye),$=e(66758),Pe=e(2514),Ze=e(98082),Ce=function(v){return(0,Z.Z)({},v.componentCls,{"&-title":{marginBlockEnd:v.marginXL,fontWeight:"bold"},"&-container":(0,Z.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(v.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)({display:"block",width:"100%"},"".concat(v.componentCls,"-title"),{width:"100%",margin:"8px 0"}),"".concat(v.componentCls,"-container"),{paddingInlineStart:16}),"".concat(v.antCls,"-space-item,").concat(v.antCls,"-form-item"),{width:"100%"}),"".concat(v.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}})})};function Se(n){return(0,Ze.Xj)("ProFormGroup",function(v){var B=(0,y.Z)((0,y.Z)({},v),{},{componentCls:".".concat(n)});return[Ce(B)]})}var c=e(85893),G=h.forwardRef(function(n,v){var B=h.useContext($.Z),H=B.groupProps,g=(0,y.Z)((0,y.Z)({},H),n),_=g.children,ee=g.collapsible,Me=g.defaultCollapsed,N=g.style,Te=g.labelLayout,ne=g.title,O=ne===void 0?n.label:ne,te=g.tooltip,re=g.align,oe=re===void 0?"start":re,D=g.direction,b=g.size,X=b===void 0?32:b,Le=g.titleStyle,ae=g.titleRender,T=g.spaceProps,K=g.extra,Y=g.autoFocus,Re=(0,fe.Z)(function(){return Me||!1},{value:n.collapsed,onChange:n.onCollapse}),J=(0,k.Z)(Re,2),Q=J[0],S=J[1],Ie=(0,h.useContext)(he.ZP.ConfigContext),Be=Ie.getPrefixCls,le=(0,Pe.zx)(n),Ee=le.ColWrapper,se=le.RowWrapper,E=Be("pro-form-group"),ie=Se(E),Oe=ie.wrapSSR,U=ie.hashId,o=ee&&(0,c.jsx)(M,{style:{marginInlineEnd:8},rotate:Q?void 0:90}),r=(0,c.jsx)(me.G,{label:o?(0,c.jsxs)("div",{children:[o,O]}):O,tooltip:te}),t=(0,h.useCallback)(function(u){var x=u.children;return(0,c.jsx)(xe.Z,(0,y.Z)((0,y.Z)({},T),{},{className:q()("".concat(E,"-container ").concat(U),T==null?void 0:T.className),size:X,align:oe,direction:D,style:(0,y.Z)({rowGap:0},T==null?void 0:T.style),children:x}))},[oe,E,D,U,X,T]),i=ae?ae(r,n):r,p=(0,h.useMemo)(function(){var u=[],x=h.Children.toArray(_).map(function(s,a){var z;return h.isValidElement(s)&&s!==null&&s!==void 0&&(z=s.props)!==null&&z!==void 0&&z.hidden?(u.push(s),null):a===0&&h.isValidElement(s)&&Y?h.cloneElement(s,(0,y.Z)((0,y.Z)({},s.props),{},{autoFocus:Y})):s});return[(0,c.jsx)(se,{Wrapper:t,children:x},"children"),u.length>0?(0,c.jsx)("div",{style:{display:"none"},children:u}):null]},[_,se,t,Y]),m=(0,k.Z)(p,2),f=m[0],j=m[1];return Oe((0,c.jsx)(Ee,{children:(0,c.jsxs)("div",{className:q()(E,U,(0,Z.Z)({},"".concat(E,"-twoLine"),Te==="twoLine")),style:N,ref:v,children:[j,(O||te||K)&&(0,c.jsx)("div",{className:"".concat(E,"-title ").concat(U).trim(),style:Le,onClick:function(){S(!Q)},children:K?(0,c.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[i,(0,c.jsx)("span",{onClick:function(x){return x.stopPropagation()},children:K})]}):i}),(0,c.jsx)("div",{style:{display:ee&&Q?"none":void 0},children:f})]})}))});G.displayName="ProForm-Group";var je=G,Fe=e(4499);function C(n){return(0,c.jsx)(V.I,(0,y.Z)({layout:"vertical",contentRender:function(B,H){return(0,c.jsxs)(c.Fragment,{children:[B,H]})}},n))}C.Group=je,C.useForm=P.Z.useForm,C.Item=Fe.Z,C.useWatch=P.Z.useWatch,C.ErrorList=P.Z.ErrorList,C.Provider=P.Z.Provider,C.useFormInstance=P.Z.useFormInstance,C.EditOrReadOnlyContext=ue.A},14525:function(Ge,w,e){e.r(w),e.d(w,{default:function(){return U}});var y=e(15009),P=e.n(y),h=e(97857),V=e.n(h),ue=e(99289),Z=e.n(ue),k=e(5574),ce=e.n(k),ve=e.p+"static/loginBg.12a730ec.jpg",ge=e(48357),pe=e(87547),l=e(1413),M=e(67294),fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},me=fe,he=e(91146),xe=function(r,t){return M.createElement(he.Z,(0,l.Z)((0,l.Z)({},r),{},{ref:t,icon:me}))},ye=M.forwardRef(xe),q=ye,$=e(91),Pe=e(10915),Ze=e(28459),Ce=e(93967),Se=e.n(Ce),c=e(34994),G=e(4942),je=e(98082),Fe=function(r){return(0,G.Z)((0,G.Z)({},r.componentCls,{"&-container":{display:"flex",flex:"1",flexDirection:"column",height:"100%",paddingInline:32,paddingBlock:24,overflow:"auto",background:"inherit"},"&-top":{textAlign:"center"},"&-header":{display:"flex",alignItems:"center",justifyContent:"center",height:"44px",lineHeight:"44px",a:{textDecoration:"none"}},"&-title":{position:"relative",insetBlockStart:"2px",color:"@heading-color",fontWeight:"600",fontSize:"33px"},"&-logo":{width:"44px",height:"44px",marginInlineEnd:"16px",verticalAlign:"top",img:{width:"100%"}},"&-desc":{marginBlockStart:"12px",marginBlockEnd:"40px",color:r.colorTextSecondary,fontSize:r.fontSize},"&-main":{minWidth:"328px",maxWidth:"580px",margin:"0 auto","&-other":{marginBlockStart:"24px",lineHeight:"22px",textAlign:"start"}}}),"@media (min-width: @screen-md-min)",(0,G.Z)({},"".concat(r.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function C(o){return(0,je.Xj)("LoginForm",function(r){var t=(0,l.Z)((0,l.Z)({},r),{},{componentCls:".".concat(o)});return[Fe(t)]})}var n=e(85893),v=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function B(o){var r,t=o.logo,i=o.message,p=o.contentStyle,m=o.title,f=o.subTitle,j=o.actions,u=o.children,x=o.containerStyle,s=o.otherStyle,a=(0,$.Z)(o,v),z=(0,Pe.YB)(),A=a.submitter===!1?!1:(0,l.Z)((0,l.Z)({searchConfig:{submitText:z.getMessage("loginForm.submitText","\u767B\u5F55")}},a.submitter),{},{submitButtonProps:(0,l.Z)({size:"large",style:{width:"100%"}},(r=a.submitter)===null||r===void 0?void 0:r.submitButtonProps),render:function(Ne,$e){var ze,De=$e.pop();if(typeof(a==null||(ze=a.submitter)===null||ze===void 0?void 0:ze.render)=="function"){var de,Ae;return a==null||(de=a.submitter)===null||de===void 0||(Ae=de.render)===null||Ae===void 0?void 0:Ae.call(de,Ne,$e)}return De}}),L=(0,M.useContext)(Ze.ZP.ConfigContext),F=L.getPrefixCls("pro-form-login"),R=C(F),W=R.wrapSSR,d=R.hashId,I=function(Ne){return"".concat(F,"-").concat(Ne," ").concat(d)},We=(0,M.useMemo)(function(){return t?typeof t=="string"?(0,n.jsx)("img",{src:t}):t:null},[t]);return W((0,n.jsxs)("div",{className:Se()(I("container"),d),style:x,children:[(0,n.jsxs)("div",{className:"".concat(I("top")," ").concat(d).trim(),children:[m||We?(0,n.jsxs)("div",{className:"".concat(I("header")),children:[We?(0,n.jsx)("span",{className:I("logo"),children:We}):null,m?(0,n.jsx)("span",{className:I("title"),children:m}):null]}):null,f?(0,n.jsx)("div",{className:I("desc"),children:f}):null]}),(0,n.jsxs)("div",{className:I("main"),style:(0,l.Z)({width:328},p),children:[(0,n.jsxs)(c.A,(0,l.Z)((0,l.Z)({isKeyPressSubmit:!0},a),{},{submitter:A,children:[i,u]})),j?(0,n.jsx)("div",{className:I("main-other"),style:s,children:j}):null]})]}))}var H=e(97685),g=e(21770),_=e(8232),ee=e(55241),Me=e(97435),N=e(15711),Te=["fieldProps","proFieldProps"],ne=["fieldProps","proFieldProps"],O="text",te=function(r){var t=r.fieldProps,i=r.proFieldProps,p=(0,$.Z)(r,Te);return(0,n.jsx)(N.Z,(0,l.Z)({valueType:O,fieldProps:t,filedConfig:{valueType:O},proFieldProps:i},p))},re=function(r){var t=(0,g.Z)(r.open||!1,{value:r.open,onChange:r.onOpenChange}),i=(0,H.Z)(t,2),p=i[0],m=i[1];return(0,n.jsx)(_.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(j){var u,x=j.getFieldValue(r.name||[]);return(0,n.jsx)(ee.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:function(a){return m(a)},content:(0,n.jsxs)("div",{style:{padding:"4px 0"},children:[(u=r.statusRender)===null||u===void 0?void 0:u.call(r,x),r.strengthText?(0,n.jsx)("div",{style:{marginTop:10},children:(0,n.jsx)("span",{children:r.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},r.popoverProps),{},{open:p,children:r.children}))}})},oe=function(r){var t=r.fieldProps,i=r.proFieldProps,p=(0,$.Z)(r,ne),m=(0,M.useState)(!1),f=(0,H.Z)(m,2),j=f[0],u=f[1];return t!=null&&t.statusRender&&p.name?(0,n.jsx)(re,{name:p.name,statusRender:t==null?void 0:t.statusRender,popoverProps:t==null?void 0:t.popoverProps,strengthText:t==null?void 0:t.strengthText,open:j,onOpenChange:u,children:(0,n.jsx)("div",{children:(0,n.jsx)(N.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,Me.Z)(t,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(s){var a;t==null||(a=t.onBlur)===null||a===void 0||a.call(t,s),u(!1)},onClick:function(s){var a;t==null||(a=t.onClick)===null||a===void 0||a.call(t,s),u(!0)}}),proFieldProps:i,filedConfig:{valueType:O}},p))})}):(0,n.jsx)(N.Z,(0,l.Z)({valueType:"password",fieldProps:t,proFieldProps:i,filedConfig:{valueType:O}},p))},D=te;D.Password=oe,D.displayName="ProFormComponent";var b=D,X=e(22270),Le=e(84567),ae=e(28614),T=["options","fieldProps","proFieldProps","valueEnum"],K=M.forwardRef(function(o,r){var t=o.options,i=o.fieldProps,p=o.proFieldProps,m=o.valueEnum,f=(0,$.Z)(o,T);return(0,n.jsx)(N.Z,(0,l.Z)({ref:r,valueType:"checkbox",valueEnum:(0,X.h)(m,void 0),fieldProps:(0,l.Z)({options:t},i),lightProps:(0,l.Z)({labelFormatter:function(){return(0,n.jsx)(N.Z,(0,l.Z)({ref:r,valueType:"checkbox",mode:"read",valueEnum:(0,X.h)(m,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,l.Z)({options:t},i),proFieldProps:p},f))}},f.lightProps),proFieldProps:p},f))}),Y=M.forwardRef(function(o,r){var t=o.fieldProps,i=o.children;return(0,n.jsx)(Le.Z,(0,l.Z)((0,l.Z)({ref:r},t),{},{children:i}))}),Re=(0,ae.G)(Y,{valuePropName:"checked"}),J=Re;J.Group=K;var Q=J,S=e(35312),Ie=e(2453),Be=e(13169),le=e(98257),Ee=e(73935),se=e(67610),E=(0,le.kc)(function(o){var r=o.token;return{action:{marginLeft:"8px",color:"rgba(0, 0, 0, 0.2)",fontSize:"24px",verticalAlign:"middle",cursor:"pointer",transition:"color 0.3s","&:hover":{color:r.colorPrimaryActive}},lang:{width:42,height:42,lineHeight:"42px",position:"fixed",right:16,borderRadius:r.borderRadius,":hover":{backgroundColor:r.colorBgTextHover}},container:{display:"flex",flexDirection:"column",height:"100vh",overflow:"auto",backgroundImage:"url(".concat(ve,")"),backgroundSize:"100% 100%"}}}),ie=function(){var r=E(),t=r.styles;return(0,n.jsx)("div",{className:t.lang,"data-lang":!0,children:S.SelectLang&&(0,n.jsx)(S.SelectLang,{})})},Oe=function(){var r=(0,M.useState)("account"),t=ce()(r,2),i=t[0],p=t[1],m=(0,S.useModel)("@@initialState"),f=m.initialState,j=m.setInitialState,u=E(),x=u.styles,s=(0,S.useIntl)(),a=function(){var A=Z()(P()().mark(function L(){var F,R;return P()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,f==null||(F=f.fetchUserInfo)===null||F===void 0?void 0:F.call(f);case 2:R=d.sent,R&&(0,Ee.flushSync)(function(){j(function(I){return V()(V()({},I),{},{currentUser:R})})});case 4:case"end":return d.stop()}},L)}));return function(){return A.apply(this,arguments)}}(),z=function(){var A=Z()(P()().mark(function L(F){var R;return P()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,ge.$g)(V()({},F));case 3:return R=s.formatMessage({id:"pages.login.success",defaultMessage:"\u767B\u5F55\u6210\u529F\uFF01"}),Ie.ZP.success(R),d.next=7,a();case 7:S.history.push("/"),d.next=12;break;case 10:d.prev=10,d.t0=d.catch(0);case 12:case"end":return d.stop()}},L,null,[[0,10]])}));return function(F){return A.apply(this,arguments)}}();return(0,n.jsxs)("div",{className:x.container,children:[(0,n.jsx)(S.Helmet,{children:(0,n.jsxs)("title",{children:[s.formatMessage({id:"menu.login",defaultMessage:"\u767B\u5F55\u9875"}),"- ",se.Z.title]})}),(0,n.jsx)(ie,{}),(0,n.jsx)("div",{style:{flex:"1",padding:"32px 0",position:"absolute",left:"10vw",bottom:"10vh"},children:(0,n.jsxs)(B,{contentStyle:{minWidth:280,maxWidth:"75vw"},logo:(0,n.jsx)("img",{alt:"logo",src:"/logo.png"}),initialValues:{autoLogin:!0},onFinish:function(){var A=Z()(P()().mark(function L(F){return P()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,z(F);case 2:case"end":return W.stop()}},L)}));return function(L){return A.apply(this,arguments)}}(),children:[(0,n.jsx)(Be.Z,{activeKey:i,onChange:p,centered:!0,items:[{key:"account",label:s.formatMessage({id:"pages.login.accountLogin.tab",defaultMessage:"\u8D26\u6237\u5BC6\u7801\u767B\u5F55"})}]}),i==="account"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{name:"name",fieldProps:{size:"large",prefix:(0,n.jsx)(pe.Z,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:s.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u7528\u6237\u540D"}),rules:[{required:!0,message:(0,n.jsx)(S.FormattedMessage,{id:"pages.login.username.required",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D!"})}]}),(0,n.jsx)(b.Password,{name:"pwd",fieldProps:{size:"large",prefix:(0,n.jsx)(q,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:s.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801"}),rules:[{required:!0,message:(0,n.jsx)(S.FormattedMessage,{id:"pages.login.password.required",defaultMessage:"\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"})}]})]}),(0,n.jsx)("div",{style:{marginBottom:24},children:(0,n.jsx)(Q,{noStyle:!0,name:"autoLogin",children:(0,n.jsx)(S.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})})})]})})]})},U=Oe}}]);