import{d as P,C as q,a as D,t as A,s as E,u as M,Q as j,$ as z,D as O,c as t,R as J,f as w,M as h,m as e,l as o,e as a,h as V,n as L,w as I,j as Q,k as G,a0 as v,a2 as H,a3 as K,E as k,a4 as F}from"./index.3a30a18d.js";import{a as W}from"./formatTime.214f8764.js";import{_ as X}from"./_plugin-vue_export-helper.cdc0426e.js";const Y=P({name:"loginAccount"}),Z=P({...Y,setup(ee){const{t:R,locale:oe}=q(),m=D({isShowPassword:!1,ruleForm:{userName:"admin",password:"123456",code:"1234"},loading:{signIn:!1}}),{isShowPassword:d,ruleForm:l,loading:B}=A(m),{themeConfig:S}=E(M()),p=j(),y=z(),T=O(()=>W(new Date)),$=async()=>{if(m.loading.signIn=!0,v.set("token",Math.random().toString(36).substr(0)),v.set("userName",m.ruleForm.userName),S.value.isRequestRoutes){const n=await K();x(n)}else{const n=await H();x(n)}},x=n=>{var s,_,c,i;if(n)k.warning("\u62B1\u6B49\uFF0C\u60A8\u6CA1\u6709\u767B\u5F55\u6743\u9650"),v.clear();else{let u=T.value;(s=p.query)!=null&&s.redirect?y.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):""}):y.push("/");const f=R("message.signInText");k.success(`${u}\uFF0C${f}`),F.start()}m.loading.signIn=!1,F.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"),b=t("ele-Position"),g=t("el-col"),C=t("el-button"),U=t("el-form"),N=J("waves");return w(),h(U,{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(d)?"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(()=>[V("i",{class:L(["iconfont el-input__icon login-content-password",a(d)?"icon-yincangmima":"icon-xianshimima"]),onClick:s[1]||(s[1]=r=>d.value=!a(d))},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(b)]),_:1})]),_:1},8,["placeholder","modelValue"])]),_:1}),o(g,{span:1}),o(g,{span:8},{default:e(()=>[I((w(),h(C,{class:"login-content-code"},{default:e(()=>[Q("1234")]),_:1})),[[N]])]),_:1})]),_:1}),o(u,{class:"login-animation4"},{default:e(()=>[I((w(),h(C,{type:"primary",class:"login-content-submit",round:"",onClick:$,loading:a(B).signIn},{default:e(()=>[V("span",null,G(n.$t("message.account.accountBtnText")),1)]),_:1},8,["loading"])),[[N]])]),_:1})]),_:1})}}});const te=X(Z,[["__scopeId","data-v-838a2e50"]]);export{te as default};
