1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[739],{87547:function(fe,K,e){e.d(K,{Z:function(){return G}});var H=e(87462),m=e(62435),V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},$=V,_=e(84089),z=function(x,s){return m.createElement(_.Z,(0,H.Z)({},x,{ref:s,icon:$}))},ee=m.forwardRef(z),G=ee},5966:function(fe,K,e){var H=e(97685),m=e(1413),V=e(45987),$=e(21770),_=e(23323),z=e(55241),ee=e(97435),G=e(62435),b=e(34176),x=e(86074),s=["fieldProps","proFieldProps"],re=["fieldProps","proFieldProps"],w="text",se=function(u){var a=u.fieldProps,F=u.proFieldProps,j=(0,V.Z)(u,s);return(0,x.jsx)(b.Z,(0,m.Z)({valueType:w,fieldProps:a,filedConfig:{valueType:w},proFieldProps:F},j))},oe=function(u){var a=(0,$.Z)(u.open||!1,{value:u.open,onChange:u.onOpenChange}),F=(0,H.Z)(a,2),j=F[0],ne=F[1];return(0,x.jsx)(_.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(ae){var l,X=ae.getFieldValue(u.name||[]);return(0,x.jsx)(z.Z,(0,m.Z)((0,m.Z)({getPopupContainer:function(h){return h&&h.parentNode?h.parentNode:h},onOpenChange:function(h){return ne(h)},content:(0,x.jsxs)("div",{style:{padding:"4px 0"},children:[(l=u.statusRender)===null||l===void 0?void 0:l.call(u,X),u.strengthText?(0,x.jsx)("div",{style:{marginTop:10},children:(0,x.jsx)("span",{children:u.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},u.popoverProps),{},{open:j,children:u.children}))}})},ue=function(u){var a=u.fieldProps,F=u.proFieldProps,j=(0,V.Z)(u,re),ne=(0,G.useState)(!1),te=(0,H.Z)(ne,2),ae=te[0],l=te[1];return a!=null&&a.statusRender&&j.name?(0,x.jsx)(oe,{name:j.name,statusRender:a==null?void 0:a.statusRender,popoverProps:a==null?void 0:a.popoverProps,strengthText:a==null?void 0:a.strengthText,open:ae,onOpenChange:l,children:(0,x.jsx)("div",{children:(0,x.jsx)(b.Z,(0,m.Z)({valueType:"password",fieldProps:(0,m.Z)((0,m.Z)({},(0,ee.Z)(a,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(N){var h;a==null||(h=a.onBlur)===null||h===void 0||h.call(a,N),l(!1)},onClick:function(N){var h;a==null||(h=a.onClick)===null||h===void 0||h.call(a,N),l(!0)}}),proFieldProps:F,filedConfig:{valueType:w}},j))})}):(0,x.jsx)(b.Z,(0,m.Z)({valueType:"password",fieldProps:a,proFieldProps:F,filedConfig:{valueType:w}},j))},Y=se;Y.Password=ue,Y.displayName="ProFormComponent",K.Z=Y},17696:function(fe,K,e){e.r(K),e.d(K,{default:function(){return Ue}});var H=e(15009),m=e.n(H),V=e(97857),$=e.n(V),_=e(99289),z=e.n(_),ee=e(5574),G=e.n(ee),b=e(19632),x=e.n(b),s=e(62435),re=e(59530),w=e(87547),se=e(87462),oe={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"},ue=oe,Y=e(84089),le=function(i,c){return s.createElement(Y.Z,(0,se.Z)({},i,{ref:c,icon:ue}))},u=s.forwardRef(le),a=u,F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"},j=F,ne=function(i,c){return s.createElement(Y.Z,(0,se.Z)({},i,{ref:c,icon:j}))},te=s.forwardRef(ne),ae=te,l=e(1413),X=e(45987),N=e(89451),h=e(28459),Pe=e(93967),Ze=e.n(Pe),me=e(97269),ce=e(4942),ye=e(98082),Se=function(i){return(0,ce.Z)((0,ce.Z)({},i.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:i.colorTextSecondary,fontSize:i.fontSize},"&-main":{minWidth:"328px",maxWidth:"580px",margin:"0 auto","&-other":{marginBlockStart:"24px",lineHeight:"22px",textAlign:"start"}}}),"@media (min-width: @screen-md-min)",(0,ce.Z)({},"".concat(i.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function Ce(t){return(0,ye.Xj)("LoginForm",function(i){var c=(0,l.Z)((0,l.Z)({},i),{},{componentCls:".".concat(t)});return[Se(c)]})}var n=e(86074),Te=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function je(t){var i,c=t.logo,J=t.message,A=t.contentStyle,B=t.title,Q=t.subTitle,W=t.actions,k=t.children,C=t.containerStyle,M=t.otherStyle,g=(0,X.Z)(t,Te),q=(0,N.YB)(),L=g.submitter===!1?!1:(0,l.Z)((0,l.Z)({searchConfig:{submitText:q.getMessage("loginForm.submitText","\u767B\u5F55")}},g.submitter),{},{submitButtonProps:(0,l.Z)({size:"large",style:{width:"100%"}},(i=g.submitter)===null||i===void 0?void 0:i.submitButtonProps),render:function(T,D){var o,r=D.pop();if(typeof(g==null||(o=g.submitter)===null||o===void 0?void 0:o.render)=="function"){var y,I;return g==null||(y=g.submitter)===null||y===void 0||(I=y.render)===null||I===void 0?void 0:I.call(y,T,D)}return r}}),P=(0,s.useContext)(h.ZP.ConfigContext),S=P.getPrefixCls("pro-form-login"),E=Ce(S),v=E.wrapSSR,d=E.hashId,f=function(T){return"".concat(S,"-").concat(T," ").concat(d)},Z=(0,s.useMemo)(function(){return c?typeof c=="string"?(0,n.jsx)("img",{src:c}):c:null},[c]);return v((0,n.jsxs)("div",{className:Ze()(f("container"),d),style:C,children:[(0,n.jsxs)("div",{className:"".concat(f("top")," ").concat(d).trim(),children:[B||Z?(0,n.jsxs)("div",{className:"".concat(f("header")),children:[Z?(0,n.jsx)("span",{className:f("logo"),children:Z}):null,B?(0,n.jsx)("span",{className:f("title"),children:B}):null]}):null,Q?(0,n.jsx)("div",{className:f("desc"),children:Q}):null]}),(0,n.jsxs)("div",{className:f("main"),style:(0,l.Z)({width:328},A),children:[(0,n.jsxs)(me.A,(0,l.Z)((0,l.Z)({isKeyPressSubmit:!0},g),{},{submitter:L,children:[J,k]})),W?(0,n.jsx)("div",{className:f("main-other"),style:M,children:W}):null]})]}))}var de=e(5966),Ee=e(97462),ie=e(74165),he=e(15861),ve=e(97685),Re=e(23323),Ie=e(25278),Oe=e(14726),Fe=e(28614),Be=["rules","name","phoneName","fieldProps","onTiming","captchaTextRender","captchaProps"],Me=s.forwardRef(function(t,i){var c=Re.Z.useFormInstance(),J=(0,s.useState)(t.countDown||60),A=(0,ve.Z)(J,2),B=A[0],Q=A[1],W=(0,s.useState)(!1),k=(0,ve.Z)(W,2),C=k[0],M=k[1],g=(0,s.useState)(),q=(0,ve.Z)(g,2),L=q[0],P=q[1],S=t.rules,E=t.name,v=t.phoneName,d=t.fieldProps,f=t.onTiming,Z=t.captchaTextRender,R=Z===void 0?function(r,y){return r?"".concat(y," \u79D2\u540E\u91CD\u65B0\u83B7\u53D6"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"}:Z,T=t.captchaProps,D=(0,X.Z)(t,Be),o=function(){var r=(0,he.Z)((0,ie.Z)().mark(function y(I){return(0,ie.Z)().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.prev=0,P(!0),O.next=4,D.onGetCaptcha(I);case 4:P(!1),M(!0),O.next=13;break;case 8:O.prev=8,O.t0=O.catch(0),M(!1),P(!1),console.log(O.t0);case 13:case"end":return O.stop()}},y,null,[[0,8]])}));return function(I){return r.apply(this,arguments)}}();return(0,s.useImperativeHandle)(i,function(){return{startTiming:function(){return M(!0)},endTiming:function(){return M(!1)}}}),(0,s.useEffect)(function(){var r=0,y=t.countDown;return C&&(r=window.setInterval(function(){Q(function(I){return I<=1?(M(!1),clearInterval(r),y||60):I-1})},1e3)),function(){return clearInterval(r)}},[C]),(0,s.useEffect)(function(){f&&f(B)},[B,f]),(0,n.jsxs)("div",{style:(0,l.Z)((0,l.Z)({},d==null?void 0:d.style),{},{display:"flex",alignItems:"center"}),ref:i,children:[(0,n.jsx)(Ie.Z,(0,l.Z)((0,l.Z)({},d),{},{style:(0,l.Z)({flex:1,transition:"width .3s",marginRight:8},d==null?void 0:d.style)})),(0,n.jsx)(Oe.ZP,(0,l.Z)((0,l.Z)({style:{display:"block"},disabled:C,loading:L},T),{},{onClick:(0,he.Z)((0,ie.Z)().mark(function r(){var y;return(0,ie.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(p.prev=0,!v){p.next=9;break}return p.next=4,c.validateFields([v].flat(1));case 4:return y=c.getFieldValue([v].flat(1)),p.next=7,o(y);case 7:p.next=11;break;case 9:return p.next=11,o("");case 11:p.next=16;break;case 13:p.prev=13,p.t0=p.catch(0),console.log(p.t0);case 16:case"end":return p.stop()}},r,null,[[0,13]])})),children:R(C,B)}))]})}),De=(0,Fe.G)(Me),Ae=De,ge=e(68872),Le=e(71230),pe=e(15746),ze=e(98163),U=e(39680),Ne={display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"200px"};function xe(t){var i=[];return t.forEach(function(c){i.push(c.action),c.childs&&i.push.apply(i,x()(xe(c.childs)))}),i}var Ue=function(){var t=(0,re.useModel)("@@initialState"),i=t.initialState,c=t.setInitialState,J=(0,s.useRef)(),A=(0,s.useRef)(),B=(0,s.useRef)(),Q=(0,s.useState)(""),W=G()(Q,2),k=W[0],C=W[1],M=(0,s.useState)(""),g=G()(M,2),q=g[0],L=g[1];return(0,s.useEffect)(function(){(0,U.cCZ)().then(function(P){C(P.data.img),L(P.data.capt_id)})},[]),(0,n.jsx)(h.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,n.jsx)("div",{style:Ne,children:(0,n.jsxs)(je,{formRef:J,title:"\u83CA\u57CE\u4EBA\u624D\u540E\u53F0\u7BA1\u7406\u7CFB\u7EDF",subTitle:"\u6B22\u8FCE\u767B\u5F55",onFinish:function(){var P=z()(m()().mark(function S(E){var v,d,f,Z,R,T;return m()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,E.sms_code=Number(E.sms_code),o.next=4,(0,U.m35)(E);case 4:return v=o.sent,ge.ZP.success("\u767B\u5F55\u6210\u529F\uFF01"),sessionStorage.setItem("token",v.data.jwttoken.accesstoken),d=[],o.next=10,(0,U.vLl)();case 10:f=o.sent,d=xe(f.data.menulist),c(function(r){return $()($()({},r),{},{permissions:d})}),sessionStorage.setItem("role",v.data.rolename),re.history.push("/"),o.next=26;break;case 17:return o.prev=17,o.t0=o.catch(0),(Z=A.current)===null||Z===void 0||Z.resetFields(),(R=J.current)===null||R===void 0||R.resetFields(),o.next=23,(0,U.cCZ)();case 23:T=o.sent,C(T.data.img),L(T.data.capt_id);case 26:case"end":return o.stop()}},S,null,[[0,17]])}));return function(S){return P.apply(this,arguments)}}(),children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(de.Z,{name:"mobile",fieldProps:{size:"large",prefix:(0,n.jsx)(w.Z,{className:"prefixIcon"})},placeholder:"\u8D26\u53F7",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7!"}]}),(0,n.jsx)(de.Z.Password,{name:"password",fieldProps:{size:"large",prefix:(0,n.jsx)(a,{className:"prefixIcon"})},placeholder:"\u5BC6\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801"}]}),(0,n.jsx)(me.A,{formRef:A,submitter:{render:function(){return null}},children:(0,n.jsxs)(Le.Z,{gutter:10,children:[(0,n.jsx)(pe.Z,{span:14,children:(0,n.jsx)(de.Z,{name:"captcha",fieldProps:{size:"large",prefix:(0,n.jsx)(ae,{className:"prefixIcon"})},placeholder:"\u8BF7\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801"}]})}),(0,n.jsx)(pe.Z,{span:10,children:(0,n.jsx)(ze.Z,{src:k,width:"100%",height:40,preview:!1,style:{borderRadius:"8px"},onClick:z()(m()().mark(function P(){var S;return m()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,U.cCZ)();case 2:S=v.sent,C(S.data.img),L(S.data.capt_id);case 5:case"end":return v.stop()}},P)}))})})]})}),(0,n.jsx)(Ee.Z,{name:["mobile"],children:function(S){var E=S.mobile;return(0,n.jsx)(Ae,{fieldRef:B,fieldProps:{size:"large",prefix:(0,n.jsx)(a,{className:"prefixIcon"})},captchaProps:{size:"large"},placeholder:"\u77ED\u4FE1\u9A8C\u8BC1\u7801",captchaTextRender:function(d,f){return d?"".concat(f," ","\u83B7\u53D6\u9A8C\u8BC1\u7801"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"},name:"sms_code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"}],onGetCaptcha:function(){var v=z()(m()().mark(function d(f){var Z,R,T,D;return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,R=(Z=A.current)===null||Z===void 0?void 0:Z.getFieldsValue().captcha,r.next=4,(0,U.UKY)({mobile:E,captcha:R,capt_id:q});case 4:T=r.sent,ge.ZP.success("\u53D1\u9001\u9A8C\u8BC1\u7801\u6210\u529F\uFF0C\u9A8C\u8BC1\u7801\u6709\u6548\u671F\u4E3A\u4E00\u5206\u949F"),r.next=16;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,(0,U.cCZ)();case 12:throw D=r.sent,C(D.data.img),L(D.data.capt_id),new Error;case 16:case"end":return r.stop()}},d,null,[[0,8]])}));return function(d){return v.apply(this,arguments)}}()})}})]}),(0,n.jsx)("div",{style:{marginBlockEnd:24}})]})})})}}}]);
|