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
1 lines
14 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[366],{34994:function($e,J,e){e.d(J,{A:function(){return t}});var Z=e(1413),S=e(8232),x=e(67294),U=e(78733),ue=e(9105),C=e(4942),Q=e(97685),ce=e(87462),ve=e(50756),ge=e(46976),l=function(v,T){return x.createElement(ge.Z,(0,ce.Z)({},v,{ref:T,icon:ve.Z}))},M=x.forwardRef(l),pe=e(21770),fe=e(48874),me=e(28459),w=e(78957),he=e(93967),O=e.n(he),xe=e(66758),ye=e(2514),Pe=e(98082),Ze=function(v){return(0,C.Z)({},v.componentCls,{"&-title":{marginBlockEnd:v.marginXL,fontWeight:"bold"},"&-container":(0,C.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(v.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(0,C.Z)((0,C.Z)((0,C.Z)((0,C.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(h){return(0,Pe.Xj)("ProFormGroup",function(v){var T=(0,Z.Z)((0,Z.Z)({},v),{},{componentCls:".".concat(h)});return[Ze(T)]})}var u=e(85893),k=x.forwardRef(function(h,v){var T=x.useContext(xe.Z),D=T.groupProps,g=(0,Z.Z)((0,Z.Z)({},D),h),q=g.children,_=g.collapsible,W=g.defaultCollapsed,Fe=g.style,Me=g.labelLayout,z=g.title,V=z===void 0?h.label:z,ee=g.tooltip,te=g.align,G=te===void 0?"start":te,b=g.direction,X=g.size,ne=X===void 0?32:X,Te=g.titleStyle,re=g.titleRender,L=g.spaceProps,K=g.extra,Y=g.autoFocus,oe=(0,pe.Z)(function(){return W||!1},{value:h.collapsed,onChange:h.onCollapse}),ae=(0,Q.Z)(oe,2),y=ae[0],Le=ae[1],Re=(0,x.useContext)(me.ZP.ConfigContext),Ie=Re.getPrefixCls,le=(0,ye.zx)(h),Be=le.ColWrapper,se=le.RowWrapper,N=Ie("pro-form-group"),ie=Se(N),Ee=ie.wrapSSR,H=ie.hashId,o=_&&(0,u.jsx)(M,{style:{marginInlineEnd:8},rotate:y?void 0:90}),r=(0,u.jsx)(fe.G,{label:o?(0,u.jsxs)("div",{children:[o,V]}):V,tooltip:ee}),n=(0,x.useCallback)(function(c){var P=c.children;return(0,u.jsx)(w.Z,(0,Z.Z)((0,Z.Z)({},L),{},{className:O()("".concat(N,"-container ").concat(H),L==null?void 0:L.className),size:ne,align:G,direction:b,style:(0,Z.Z)({rowGap:0},L==null?void 0:L.style),children:P}))},[G,N,b,H,ne,L]),d=re?re(r,h):r,p=(0,x.useMemo)(function(){var c=[],P=x.Children.toArray(q).map(function(s,a){var A;return x.isValidElement(s)&&s!==null&&s!==void 0&&(A=s.props)!==null&&A!==void 0&&A.hidden?(c.push(s),null):a===0&&x.isValidElement(s)&&Y?x.cloneElement(s,(0,Z.Z)((0,Z.Z)({},s.props),{},{autoFocus:Y})):s});return[(0,u.jsx)(se,{Wrapper:n,children:P},"children"),c.length>0?(0,u.jsx)("div",{style:{display:"none"},children:c}):null]},[q,se,n,Y]),m=(0,Q.Z)(p,2),f=m[0],j=m[1];return Ee((0,u.jsx)(Be,{children:(0,u.jsxs)("div",{className:O()(N,H,(0,C.Z)({},"".concat(N,"-twoLine"),Me==="twoLine")),style:Fe,ref:v,children:[j,(V||ee||K)&&(0,u.jsx)("div",{className:"".concat(N,"-title ").concat(H).trim(),style:Te,onClick:function(){Le(!y)},children:K?(0,u.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[d,(0,u.jsx)("span",{onClick:function(P){return P.stopPropagation()},children:K})]}):d}),(0,u.jsx)("div",{style:{display:_&&y?"none":void 0},children:f})]})}))});k.displayName="ProForm-Group";var Ce=k,je=e(4499);function t(h){return(0,u.jsx)(U.I,(0,Z.Z)({layout:"vertical",contentRender:function(T,D){return(0,u.jsxs)(u.Fragment,{children:[T,D]})}},h))}t.Group=Ce,t.useForm=S.Z.useForm,t.Item=je.Z,t.useWatch=S.Z.useWatch,t.ErrorList=S.Z.ErrorList,t.Provider=S.Z.Provider,t.useFormInstance=S.Z.useFormInstance,t.EditOrReadOnlyContext=ue.A},14525:function($e,J,e){e.r(J),e.d(J,{default:function(){return H}});var Z=e(15009),S=e.n(Z),x=e(97857),U=e.n(x),ue=e(99289),C=e.n(ue),Q=e(5574),ce=e.n(Q),ve=e(48357),ge=e(87547),l=e(1413),M=e(67294),pe={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"},fe=pe,me=e(91146),w=function(r,n){return M.createElement(me.Z,(0,l.Z)((0,l.Z)({},r),{},{ref:n,icon:fe}))};w.displayName="LockOutlined";var he=M.forwardRef(w),O=e(91),xe=e(10915),ye=e(28459),Pe=e(93967),Ze=e.n(Pe),Se=e(34994),u=e(4942),k=e(98082),Ce=function(r){return(0,u.Z)((0,u.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,u.Z)({},"".concat(r.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function je(o){return(0,k.Xj)("LoginForm",function(r){var n=(0,l.Z)((0,l.Z)({},r),{},{componentCls:".".concat(o)});return[Ce(n)]})}var t=e(85893),h=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function v(o){var r,n=o.logo,d=o.message,p=o.contentStyle,m=o.title,f=o.subTitle,j=o.actions,c=o.children,P=o.containerStyle,s=o.otherStyle,a=(0,O.Z)(o,h),A=(0,xe.YB)(),$=a.submitter===!1?!1:(0,l.Z)((0,l.Z)({searchConfig:{submitText:A.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(Oe,Ae){var We,He=Ae.pop();if(typeof(a==null||(We=a.submitter)===null||We===void 0?void 0:We.render)=="function"){var de,ze;return a==null||(de=a.submitter)===null||de===void 0||(ze=de.render)===null||ze===void 0?void 0:ze.call(de,Oe,Ae)}return He}}),R=(0,M.useContext)(ye.ZP.ConfigContext),F=R.getPrefixCls("pro-form-login"),I=je(F),B=I.wrapSSR,E=I.hashId,i=function(Oe){return"".concat(F,"-").concat(Oe," ").concat(E)},Ne=(0,M.useMemo)(function(){return n?typeof n=="string"?(0,t.jsx)("img",{src:n}):n:null},[n]);return B((0,t.jsxs)("div",{className:Ze()(i("container"),E),style:P,children:[(0,t.jsxs)("div",{className:"".concat(i("top")," ").concat(E).trim(),children:[m||Ne?(0,t.jsxs)("div",{className:"".concat(i("header")),children:[Ne?(0,t.jsx)("span",{className:i("logo"),children:Ne}):null,m?(0,t.jsx)("span",{className:i("title"),children:m}):null]}):null,f?(0,t.jsx)("div",{className:i("desc"),children:f}):null]}),(0,t.jsxs)("div",{className:i("main"),style:(0,l.Z)({width:328},p),children:[(0,t.jsxs)(Se.A,(0,l.Z)((0,l.Z)({isKeyPressSubmit:!0},a),{},{submitter:$,children:[d,c]})),j?(0,t.jsx)("div",{className:i("main-other"),style:s,children:j}):null]})]}))}var T=e(97685),D=e(21770),g=e(8232),q=e(55241),_=e(97435),W=e(11911),Fe=["fieldProps","proFieldProps"],Me=["fieldProps","proFieldProps"],z="text",V=function(r){var n=r.fieldProps,d=r.proFieldProps,p=(0,O.Z)(r,Fe);return(0,t.jsx)(W.Z,(0,l.Z)({valueType:z,fieldProps:n,filedConfig:{valueType:z},proFieldProps:d},p))},ee=function(r){var n=(0,D.Z)(r.open||!1,{value:r.open,onChange:r.onOpenChange}),d=(0,T.Z)(n,2),p=d[0],m=d[1];return(0,t.jsx)(g.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(j){var c,P=j.getFieldValue(r.name||[]);return(0,t.jsx)(q.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:m,content:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(c=r.statusRender)===null||c===void 0?void 0:c.call(r,P),r.strengthText?(0,t.jsx)("div",{style:{marginTop:10},children:(0,t.jsx)("span",{children:r.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},r.popoverProps),{},{open:p,children:r.children}))}})},te=function(r){var n=r.fieldProps,d=r.proFieldProps,p=(0,O.Z)(r,Me),m=(0,M.useState)(!1),f=(0,T.Z)(m,2),j=f[0],c=f[1];return n!=null&&n.statusRender&&p.name?(0,t.jsx)(ee,{name:p.name,statusRender:n==null?void 0:n.statusRender,popoverProps:n==null?void 0:n.popoverProps,strengthText:n==null?void 0:n.strengthText,open:j,onOpenChange:c,children:(0,t.jsx)("div",{children:(0,t.jsx)(W.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,_.Z)(n,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(s){var a;n==null||(a=n.onBlur)===null||a===void 0||a.call(n,s),c(!1)},onClick:function(s){var a;n==null||(a=n.onClick)===null||a===void 0||a.call(n,s),c(!0)}}),proFieldProps:d,filedConfig:{valueType:z}},p))})}):(0,t.jsx)(W.Z,(0,l.Z)({valueType:"password",fieldProps:n,proFieldProps:d,filedConfig:{valueType:z}},p))},G=V;G.Password=te,G.displayName="ProFormComponent";var b=G,X=e(22270),ne=e(84567),Te=e(83607),re=["options","fieldProps","proFieldProps","valueEnum"],L=M.forwardRef(function(o,r){var n=o.options,d=o.fieldProps,p=o.proFieldProps,m=o.valueEnum,f=(0,O.Z)(o,re);return(0,t.jsx)(W.Z,(0,l.Z)({ref:r,valueType:"checkbox",valueEnum:(0,X.h)(m,void 0),fieldProps:(0,l.Z)({options:n},d),lightProps:(0,l.Z)({labelFormatter:function(){return(0,t.jsx)(W.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:n},d),proFieldProps:p},f))}},f.lightProps),proFieldProps:p},f))}),K=M.forwardRef(function(o,r){var n=o.fieldProps,d=o.children;return(0,t.jsx)(ne.Z,(0,l.Z)((0,l.Z)({ref:r},n),{},{children:d}))}),Y=(0,Te.G)(K,{valuePropName:"checked"}),oe=Y;oe.Group=L;var ae=oe,y=e(35312),Le=e(2453),Re=e(11941),Ie=e(98257),le=e(73935),Be=e.p+"static/loginBg.12a730ec.jpg",se=e(67610),N=(0,Ie.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(Be,")"),backgroundSize:"100% 100%"}}}),ie=function(){var r=N(),n=r.styles;return(0,t.jsx)("div",{className:n.lang,"data-lang":!0,children:y.SelectLang&&(0,t.jsx)(y.SelectLang,{})})},Ee=function(){var r=(0,M.useState)("account"),n=ce()(r,2),d=n[0],p=n[1],m=(0,y.useModel)("@@initialState"),f=m.initialState,j=m.setInitialState,c=N(),P=c.styles,s=(0,y.useIntl)(),a=function(){var $=C()(S()().mark(function R(){var F,I;return S()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,f==null||(F=f.fetchUserInfo)===null||F===void 0?void 0:F.call(f);case 2:I=E.sent,I&&(0,le.flushSync)(function(){j(function(i){return U()(U()({},i),{},{currentUser:I})})});case 4:case"end":return E.stop()}},R)}));return function(){return $.apply(this,arguments)}}(),A=function(){var $=C()(S()().mark(function R(F){var I,B;return S()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,(0,ve.$g)(U()({},F));case 3:return I=s.formatMessage({id:"pages.login.success",defaultMessage:"\u767B\u5F55\u6210\u529F\uFF01"}),Le.ZP.success(I),i.next=7,a();case 7:B=new URL(window.location.href).searchParams,y.history.push(B.get("redirect")||"/"),i.next=13;break;case 11:i.prev=11,i.t0=i.catch(0);case 13:case"end":return i.stop()}},R,null,[[0,11]])}));return function(F){return $.apply(this,arguments)}}();return(0,t.jsxs)("div",{className:P.container,children:[(0,t.jsx)(y.Helmet,{children:(0,t.jsxs)("title",{children:[s.formatMessage({id:"menu.login",defaultMessage:"\u767B\u5F55\u9875"}),"- ",se.Z.title]})}),(0,t.jsx)(ie,{}),(0,t.jsx)("div",{style:{flex:"1",padding:"32px 0",position:"absolute",left:"10vw",bottom:"10vh"},children:(0,t.jsxs)(v,{contentStyle:{minWidth:280,maxWidth:"75vw"},logo:(0,t.jsx)("img",{alt:"logo",src:"/logo.jpg"}),title:"\u51E1\u7C73\u6E38",initialValues:{autoLogin:!0},onFinish:function(){var $=C()(S()().mark(function R(F){return S()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,A(F);case 2:case"end":return B.stop()}},R)}));return function(R){return $.apply(this,arguments)}}(),children:[(0,t.jsx)(Re.Z,{activeKey:d,onChange:p,centered:!0,items:[{key:"account",label:s.formatMessage({id:"pages.login.accountLogin.tab",defaultMessage:"\u8D26\u6237\u5BC6\u7801\u767B\u5F55"})}]}),d==="account"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{name:"name",fieldProps:{size:"large",prefix:(0,t.jsx)(ge.Z,{})},placeholder:s.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u7528\u6237\u540D"}),rules:[{required:!0,message:(0,t.jsx)(y.FormattedMessage,{id:"pages.login.username.required",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D!"})}]}),(0,t.jsx)(b.Password,{name:"pwd",fieldProps:{size:"large",prefix:(0,t.jsx)(he,{})},placeholder:s.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801"}),rules:[{required:!0,message:(0,t.jsx)(y.FormattedMessage,{id:"pages.login.password.required",defaultMessage:"\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"})}]})]}),(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(ae,{noStyle:!0,name:"autoLogin",children:(0,t.jsx)(y.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})})})]})})]})},H=Ee}}]);
|
|
|