import{d as B,H as $,h as A,t as D,s as E,i as j,R as z,a3 as M,c as O,l as t,U as H,o as w,b as h,y as e,x as o,u as a,e as N,f as J,w as V,p as L,q as G,S as v,a5 as K,a6 as Q,E as k,a7 as I,_ as W}from"./index.4042ed24.js";import{b as X}from"./formatTime.3d234de1.js";const Y=B({name:"loginAccount"}),Z=B({...Y,setup(ee){const{t:F,locale:oe}=$(),d=A({isShowPassword:!1,ruleForm:{userName:"admin",password:"123456",code:"1234"},loading:{signIn:!1}}),{isShowPassword:m,ruleForm:l,loading:P}=D(d),{themeConfig:R}=E(j()),p=z(),x=M(),S=O(()=>X(new Date)),T=async()=>{if(d.loading.signIn=!0,v.set("token",Math.random().toString(36).substr(0)),v.set("userName",d.ruleForm.userName),R.value.isRequestRoutes){const n=await Q();y(n)}else{const n=await K();y(n)}},y=n=>{var s,_,c,i;if(n)k.warning("\u62B1\u6B49\uFF0C\u60A8\u6CA1\u6709\u767B\u5F55\u6743\u9650"),v.clear();else{let u=S.value;(s=p.query)!=null&&s.redirect?x.push({path:(_=p.query)==null?void 0:_.redirect,query:Object.keys((c=p.query)==null?void 0:c.params).length>0?JSON.parse((i=p.query)==null?void 0:i.params):""}):x.push("/");const f=F("message.signInText");k.success(`${u}\uFF0C${f}`),I.start()}d.loading.signIn=!1,I.done()};return(n,s)=>{const _=t("ele-User"),c=t("el-icon"),i=t("el-input"),u=t("el-form-item"),f=t("ele-Unlock"),U=t("ele-Position"),g=t("el-col"),C=t("el-button"),q=t("el-form"),b=H("waves");return w(),h(q,{size:"large",class:"login-content-form"},{default:e(()=>[o(u,{class:"login-animation1"},{default:e(()=>[o(i,{placeholder:n.$t("message.account.accountPlaceholder1"),modelValue:a(l).userName,"onUpdate:modelValue":s[0]||(s[0]=r=>a(l).userName=r),clearable:"",autocomplete:"off"},{prefix:e(()=>[o(c,{class:"el-input__icon"},{default:e(()=>[o(_)]),_:1})]),_:1},8,["placeholder","modelValue"])]),_:1}),o(u,{class:"login-animation2"},{default:e(()=>[o(i,{type:a(m)?"text":"password",placeholder:n.$t("message.account.accountPlaceholder2"),modelValue:a(l).password,"onUpdate:modelValue":s[2]||(s[2]=r=>a(l).password=r),autocomplete:"off"},{prefix:e(()=>[o(c,{class:"el-input__icon"},{default:e(()=>[o(f)]),_:1})]),suffix:e(()=>[N("i",{class:J(["iconfont el-input__icon login-content-password",a(m)?"icon-yincangmima":"icon-xianshimima"]),onClick:s[1]||(s[1]=r=>m.value=!a(m))},null,2)]),_:1},8,["type","placeholder","modelValue"])]),_:1}),o(u,{class:"login-animation3"},{default:e(()=>[o(g,{span:15},{default:e(()=>[o(i,{maxlength:"4",placeholder:n.$t("message.account.accountPlaceholder3"),modelValue:a(l).code,"onUpdate:modelValue":s[3]||(s[3]=r=>a(l).code=r),clearable:"",autocomplete:"off"},{prefix:e(()=>[o(c,{class:"el-input__icon"},{default:e(()=>[o(U)]),_:1})]),_:1},8,["placeholder","modelValue"])]),_:1}),o(g,{span:1}),o(g,{span:8},{default:e(()=>[V((w(),h(C,{class:"login-content-code"},{default:e(()=>[L("1234")]),_:1})),[[b]])]),_:1})]),_:1}),o(u,{class:"login-animation4"},{default:e(()=>[V((w(),h(C,{type:"primary",class:"login-content-submit",round:"",onClick:T,loading:a(P).signIn},{default:e(()=>[N("span",null,G(n.$t("message.account.accountBtnText")),1)]),_:1},8,["loading"])),[[b]])]),_:1})]),_:1})}}});const ae=W(Z,[["__scopeId","data-v-aed0ecd4"],["__file","/data/jenkins/workspace/badp-bcxin-web-5.x-dispatchBusiness/src/views/login/component/account.vue"]]);export{ae as default};
