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($e,w,e){e.d(w,{A:function(){return S}});var y=e(1413),P=e(8232),h=e(67294),V=e(78733),ce=e(9105),Z=e(4942),k=e(97685),ve=e(87462),pe=e(50756),ge=e(46976),fe=function(v,B){return h.createElement(ge.Z,(0,ve.Z)({},v,{ref:B,icon:pe.Z}))},l=h.forwardRef(fe),M=e(21770),me=e(48874),he=e(28459),xe=e(42075),q=e(93967),_=e.n(q),$=e(66758),ye=e(2514),Pe=e(98082),Ze=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,Pe.Xj)("ProFormGroup",function(v){var B=(0,y.Z)((0,y.Z)({},v),{},{componentCls:".".concat(n)});return[Ze(B)]})}var c=e(85893),G=h.forwardRef(function(n,v){var B=h.useContext($.Z),H=B.groupProps,p=(0,y.Z)((0,y.Z)({},H),n),ee=p.children,ne=p.collapsible,Fe=p.defaultCollapsed,W=p.style,Me=p.labelLayout,te=p.title,N=te===void 0?n.label:te,re=p.tooltip,oe=p.align,ae=oe===void 0?"start":oe,D=p.direction,b=p.size,X=b===void 0?32:b,Te=p.titleStyle,le=p.titleRender,T=p.spaceProps,K=p.extra,Y=p.autoFocus,Le=(0,M.Z)(function(){return Fe||!1},{value:n.collapsed,onChange:n.onCollapse}),J=(0,k.Z)(Le,2),Q=J[0],C=J[1],Re=(0,h.useContext)(he.ZP.ConfigContext),Ie=Re.getPrefixCls,se=(0,ye.zx)(n),Be=se.ColWrapper,ie=se.RowWrapper,E=Ie("pro-form-group"),de=Se(E),Ee=de.wrapSSR,U=de.hashId,o=ne&&(0,c.jsx)(l,{style:{marginInlineEnd:8},rotate:Q?void 0:90}),r=(0,c.jsx)(me.G,{label:o?(0,c.jsxs)("div",{children:[o,N]}):N,tooltip:re}),t=(0,h.useCallback)(function(u){var x=u.children;return(0,c.jsx)(xe.Z,(0,y.Z)((0,y.Z)({},T),{},{className:_()("".concat(E,"-container ").concat(U),T==null?void 0:T.className),size:X,align:ae,direction:D,style:(0,y.Z)({rowGap:0},T==null?void 0:T.style),children:x}))},[ae,E,D,U,X,T]),i=le?le(r,n):r,g=(0,h.useMemo)(function(){var u=[],x=h.Children.toArray(ee).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)(ie,{Wrapper:t,children:x},"children"),u.length>0?(0,c.jsx)("div",{style:{display:"none"},children:u}):null]},[ee,ie,t,Y]),m=(0,k.Z)(g,2),f=m[0],j=m[1];return Ee((0,c.jsx)(Be,{children:(0,c.jsxs)("div",{className:_()(E,U,(0,Z.Z)({},"".concat(E,"-twoLine"),Me==="twoLine")),style:W,ref:v,children:[j,(N||re||K)&&(0,c.jsx)("div",{className:"".concat(E,"-title ").concat(U).trim(),style:Te,onClick:function(){C(!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:ne&&Q?"none":void 0},children:f})]})}))});G.displayName="ProForm-Group";var Ce=G,je=e(4499);function S(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))}S.Group=Ce,S.useForm=P.Z.useForm,S.Item=je.Z,S.useWatch=P.Z.useWatch,S.ErrorList=P.Z.ErrorList,S.Provider=P.Z.Provider,S.useFormInstance=P.Z.useFormInstance,S.EditOrReadOnlyContext=ce.A},14525:function($e,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),ce=e(99289),Z=e.n(ce),k=e(5574),ve=e.n(k),pe=e.p+"static/loginBg.12a730ec.jpg",ge=e(48357),fe=e(87547),l=e(1413),M=e(67294),me={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"},he=me,xe=e(91146),q=function(r,t){return M.createElement(xe.Z,(0,l.Z)((0,l.Z)({},r),{},{ref:t,icon:he}))};q.displayName="LockOutlined";var _=M.forwardRef(q),$=e(91),ye=e(10915),Pe=e(28459),Ze=e(93967),Se=e.n(Ze),c=e(34994),G=e(4942),Ce=e(98082),je=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 S(o){return(0,Ce.Xj)("LoginForm",function(r){var t=(0,l.Z)((0,l.Z)({},r),{},{componentCls:".".concat(o)});return[je(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,g=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,ye.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(Oe,Ae){var We,He=Ae.pop();if(typeof(a==null||(We=a.submitter)===null||We===void 0?void 0:We.render)=="function"){var ue,ze;return a==null||(ue=a.submitter)===null||ue===void 0||(ze=ue.render)===null||ze===void 0?void 0:ze.call(ue,Oe,Ae)}return He}}),L=(0,M.useContext)(Pe.ZP.ConfigContext),F=L.getPrefixCls("pro-form-login"),R=S(F),O=R.wrapSSR,d=R.hashId,I=function(Oe){return"".concat(F,"-").concat(Oe," ").concat(d)},Ne=(0,M.useMemo)(function(){return t?typeof t=="string"?(0,n.jsx)("img",{src:t}):t:null},[t]);return O((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||Ne?(0,n.jsxs)("div",{className:"".concat(I("header")),children:[Ne?(0,n.jsx)("span",{className:I("logo"),children:Ne}):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},g),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),p=e(21770),ee=e(8232),ne=e(55241),Fe=e(97435),W=e(94187),Me=["fieldProps","proFieldProps"],te=["fieldProps","proFieldProps"],N="text",re=function(r){var t=r.fieldProps,i=r.proFieldProps,g=(0,$.Z)(r,Me);return(0,n.jsx)(W.Z,(0,l.Z)({valueType:N,fieldProps:t,filedConfig:{valueType:N},proFieldProps:i},g))},oe=function(r){var t=(0,p.Z)(r.open||!1,{value:r.open,onChange:r.onOpenChange}),i=(0,H.Z)(t,2),g=i[0],m=i[1];return(0,n.jsx)(ee.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(j){var u,x=j.getFieldValue(r.name||[]);return(0,n.jsx)(ne.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:m,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:g,children:r.children}))}})},ae=function(r){var t=r.fieldProps,i=r.proFieldProps,g=(0,$.Z)(r,te),m=(0,M.useState)(!1),f=(0,H.Z)(m,2),j=f[0],u=f[1];return t!=null&&t.statusRender&&g.name?(0,n.jsx)(oe,{name:g.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)(W.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,Fe.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:N}},g))})}):(0,n.jsx)(W.Z,(0,l.Z)({valueType:"password",fieldProps:t,proFieldProps:i,filedConfig:{valueType:N}},g))},D=re;D.Password=ae,D.displayName="ProFormComponent";var b=D,X=e(22270),Te=e(84567),le=e(83607),T=["options","fieldProps","proFieldProps","valueEnum"],K=M.forwardRef(function(o,r){var t=o.options,i=o.fieldProps,g=o.proFieldProps,m=o.valueEnum,f=(0,$.Z)(o,T);return(0,n.jsx)(W.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)(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:t},i),proFieldProps:g},f))}},f.lightProps),proFieldProps:g},f))}),Y=M.forwardRef(function(o,r){var t=o.fieldProps,i=o.children;return(0,n.jsx)(Te.Z,(0,l.Z)((0,l.Z)({ref:r},t),{},{children:i}))}),Le=(0,le.G)(Y,{valuePropName:"checked"}),J=Le;J.Group=K;var Q=J,C=e(35312),Re=e(2453),Ie=e(13169),se=e(98257),Be=e(73935),ie=e(67610),E=(0,se.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(pe,")"),backgroundSize:"100% 100%"}}}),de=function(){var r=E(),t=r.styles;return(0,n.jsx)("div",{className:t.lang,"data-lang":!0,children:C.SelectLang&&(0,n.jsx)(C.SelectLang,{})})},Ee=function(){var r=(0,M.useState)("account"),t=ve()(r,2),i=t[0],g=t[1],m=(0,C.useModel)("@@initialState"),f=m.initialState,j=m.setInitialState,u=E(),x=u.styles,s=(0,C.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,Be.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"}),Re.ZP.success(R),d.next=7,a();case 7:C.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)(C.Helmet,{children:(0,n.jsxs)("title",{children:[s.formatMessage({id:"menu.login",defaultMessage:"\u767B\u5F55\u9875"}),"- ",ie.Z.title]})}),(0,n.jsx)(de,{}),(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(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,z(F);case 2:case"end":return O.stop()}},L)}));return function(L){return A.apply(this,arguments)}}(),children:[(0,n.jsx)(Ie.Z,{activeKey:i,onChange:g,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)(fe.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)(C.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)(_,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:s.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801"}),rules:[{required:!0,message:(0,n.jsx)(C.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)(C.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})})})]})})]})},U=Ee}}]);