import{_ as e,f as l,z as a,c as s,b as t,q as o,w as i,g as r,d as n,A as d,h as u,e as m,B as c,y as f,j as g,C as p,v}from"./index-vtcwYVzc.js";import{g as y,l as h}from"./login-BYdEboxT.js";const b={class:"login-container"},w={class:"login-box"},x={class:"login-formbox"},C={style:{display:"flex"}},_={class:"login-code",style:{}},k=["src"],z={key:0},V={key:1},N={style:{display:"flex","justify-content":"center","align-items":"center",width:"100%","margin-top":"1.25rem"}},U={key:1,class:"face-login"},I={style:{display:"flex","justify-content":"center","align-items":"center",width:"100%","margin-top":"1.25rem"}},j=e({__name:"Login",setup(e){const j=n();d();const{proxy:q}=v(),F=l(!0),D=l(""),L=l(!1),M=l({userName:"",password:"",verificationCode:"",UUID:void 0,tenantId:"0"}),O={userName:[{required:!0,trigger:"blur",message:"请输入您的登录账号"}],password:[{required:!0,trigger:"blur",message:"请输入您的密码"}],verificationCode:[{required:!0,trigger:"blur",message:"请输入验证码"}]};function R(){q.$refs.loginRef.validate((e=>{e&&(L.value=!0,h(M.value).then((e=>{e.status&&(p.commit("setUserInfo",{...e.data}),j.push({path:"/"}))})).catch((e=>(M.value.verificationCode="",T(),L.value=!1,q.$message.error(res.message)))),setTimeout((()=>{L.value=!1}),1e3))}))}function T(){y().then((e=>{500!=e.Code?(D.value="data:image/gif;base64,"+e.img,M.value.UUID=e.uuid):T()}))}const E=l();return a((()=>{E.value.focus()})),T(),(e,l)=>{const a=u("el-input"),n=u("el-form-item"),d=u("el-button"),p=u("el-form");return m(),s("div",b,[l[11]||(l[11]=t("div",{class:"login-header"},[t("img",{src:"/assets/index-text-DvJIC_MM.png",alt:""})],-1)),t("div",w,[l[10]||(l[10]=t("div",{class:"left-img"},[t("img",{src:"/assets/bg-CJgmiecv.png",alt:""})],-1)),t("div",x,[F.value?(m(),o(p,{key:0,ref:"loginRef",model:M.value,rules:O,class:"login-form"},{default:i((()=>[l[5]||(l[5]=t("div",{class:"title"},"欢迎登录...",-1)),l[6]||(l[6]=t("div",{style:{color:"#666666","font-size":"0.8rem",margin:"0.5rem 0"}}," WELCOME TO LOGIN ",-1)),r(n,{prop:"userName"},{default:i((()=>[r(a,{modelValue:M.value.userName,"onUpdate:modelValue":l[0]||(l[0]=e=>M.value.userName=e),style:{height:"3.13rem"},ref_key:"userNameRef",ref:E,type:"text",size:"large",autocomplete:"off",placeholder:"请输入您的登录账号"},null,8,["modelValue"])])),_:1}),r(n,{prop:"password"},{default:i((()=>[r(a,{"show-password":"",modelValue:M.value.password,"onUpdate:modelValue":l[1]||(l[1]=e=>M.value.password=e),style:{height:"3.13rem"},type:"password",size:"large","auto-complete":"off",placeholder:"请输入密码"},null,8,["modelValue"])])),_:1}),r(n,{prop:"verificationCode"},{default:i((()=>[t("div",C,[r(a,{modelValue:M.value.verificationCode,"onUpdate:modelValue":l[2]||(l[2]=e=>M.value.verificationCode=e),size:"large",onKeyup:c(R,["enter"]),style:{height:"3.13rem",width:"17.19rem","margin-right":"0.63rem"},"auto-complete":"off",placeholder:"验证码"},null,8,["modelValue"]),t("div",_,[t("img",{src:D.value,onClick:T,style:{width:"7.19rem",height:"3.13rem"},class:"login-code-img"},null,8,k)])])])),_:1}),r(n,null,{default:i((()=>[r(d,{loading:L.value,color:"#1F63FF",size:"large",style:{width:"100%",height:"3.13rem"},onClick:f(R,["prevent"])},{default:i((()=>[L.value?(m(),s("span",V,"登 录 中...")):(m(),s("span",z,"登 录"))])),_:1},8,["loading"]),t("div",N,[t("span",{style:{color:"#4386ff","border-bottom":"1px solid #4386ff","font-weight":"bold",cursor:"pointer","font-size":"1rem"},onClick:l[3]||(l[3]=e=>F.value=!1)},"人脸识别登录")])])),_:1})])),_:1},8,["model"])):(m(),s("div",U,[l[8]||(l[8]=t("span",{style:{"font-size":"0.88rem","font-weight":"bold",color:"#333333"}},"请将脸部正对蓝色显示框内，并保持光线充足",-1)),l[9]||(l[9]=t("div",{style:{display:"flex","justify-content":"center","align-items":"center",border:"1px solid #4386ff","border-radius":"50%",width:"18.75rem",height:"18.75rem",margin:"2.06rem 0","background-color":"#f1fcff"}},[t("img",{src:"/assets/face-FbNyTS9f.png",alt:""})],-1)),r(d,{type:"primary",size:"small",style:{width:"100%"}},{default:i((()=>l[7]||(l[7]=[g("开始识别")]))),_:1}),t("div",I,[t("span",{style:{color:"#4386ff","border-bottom":"1px solid #4386ff","font-weight":"bold",cursor:"pointer","font-size":"1rem"},onClick:l[4]||(l[4]=e=>F.value=!0)},"账号登录")])]))])])])}}},[["__scopeId","data-v-c767e9dc"]]);export{j as default};
