import{B as q,C as M,D as T,F as z,w as P}from"./element-plus.8115766e.js";import{u as C,a as O,c as k,A as b,_ as W,b as X,P as Y,d as G}from"./index.637212e4.js";import{u as H,a as J}from"./vue-router.5046cc50.js";import{d as E,e as D,o as f,c as g,a as r,W as Q,a8 as Z,u as m,U as L,r as R,s as B,a0 as ee,j as oe,V as o,M as c,aa as V,T as te}from"./@vue.cab01781.js";import"./@vueuse.724ed0af.js";import"./@element-plus.92b4185f.js";import"./lodash-es.29c53eac.js";import"./dayjs.66926594.js";import"./axios.2d915936.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.b68d77aa.js";import"./pinia.e85e8286.js";import"./vue-demi.bfae2336.js";import"./css-color-function.a8f9466d.js";import"./color.903ca10f.js";import"./clone.9d64bb7a.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.a96d99f2.js";import"./vue-clipboard3.91d4fd5f.js";import"./clipboard.c0a70c0c.js";import"./echarts.6ad8c478.js";import"./zrender.f91f2f01.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.0ab41b7b.js";const se={class:"layout-footer"},ne={class:"text-center p-2 text-xs text-tx-secondary max-w-[900px] mx-auto"},re=["href"],ae=E({__name:"footer",setup(x){const t=C(),l=D(()=>t.config.copyright||[]);return(d,a)=>(f(),g("footer",se,[r("div",ne,[(f(!0),g(Q,null,Z(m(l),u=>(f(),g("a",{class:"mx-1 hover:underline",href:u.link,target:"_blank",key:u.name},L(u.name),9,re))),128))])]))}});function ce(x){const t=R(!1);return{isLock:t,lockFn:async(...d)=>{if(!t.value){t.value=!0;try{const a=await x(...d);return t.value=!1,a}catch(a){throw t.value=!1,a}}}}}const le={class:"login flex flex-col"},ue={class:"flex-1 flex items-center justify-center"},ie={class:"login-card flex rounded-md"},pe={class:"flex-1 h-full hidden md:inline-block"},me={class:"login-form bg-body flex flex-col justify-center px-10 py-10 md:w-[400px] w-[375px] flex-none mx-auto"},de={class:"text-center text-3xl font-medium mb-8"},_e={class:"mb-5"},fe=te(" \u767B\u5F55 "),ge=E({__name:"login",setup(x){const t=B(),l=B(),d=C(),a=O(),u=H(),U=J(),i=R(!1),y=D(()=>d.config),s=ee({account:"",password:""}),K={account:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7",trigger:["blur"]}],password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:["blur"]}]},N=()=>{var e;if(!s.password)return(e=t.value)==null?void 0:e.focus();h()},h=async()=>{var _;await((_=l.value)==null?void 0:_.validate()),k.set(b,{remember:i.value,account:i.value?s.account:""}),await a.login(s);const{query:{redirect:e}}=u,n=typeof e=="string"?e:Y.INDEX;U.push(n)},{isLock:S,lockFn:$}=ce(h);return oe(()=>{const e=k.get(b);e!=null&&e.remember&&(i.value=e.remember,s.account=e.account)}),(e,n)=>{const _=W,v=X,w=M,F=T,A=z,I=q,j=P;return f(),g("div",le,[r("div",ue,[r("div",ie,[r("div",pe,[o(_,{src:m(y).webBackdrop,width:400,height:"100%"},null,8,["src"])]),r("div",me,[r("div",de,L(m(y).webName),1),o(A,{ref_key:"formRef",ref:l,model:s,size:"large",rules:K},{default:c(()=>[o(F,{prop:"account"},{default:c(()=>[o(w,{modelValue:s.account,"onUpdate:modelValue":n[0]||(n[0]=p=>s.account=p),modelModifiers:{trim:!0},placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",onKeyup:V(N,["enter"])},{prepend:c(()=>[o(v,{name:"el-icon-User"})]),_:1},8,["modelValue","onKeyup"])]),_:1}),o(F,{prop:"password"},{default:c(()=>[o(w,{ref_key:"passwordRef",ref:t,modelValue:s.password,"onUpdate:modelValue":n[1]||(n[1]=p=>s.password=p),"show-password":"",placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",onKeyup:V(h,["enter"])},{prepend:c(()=>[o(v,{name:"el-icon-Lock"})]),_:1},8,["modelValue","onKeyup"])]),_:1})]),_:1},8,["model"]),r("div",_e,[o(I,{modelValue:i.value,"onUpdate:modelValue":n[2]||(n[2]=p=>i.value=p),label:"\u8BB0\u4F4F\u8D26\u53F7"},null,8,["modelValue"])]),o(j,{type:"primary",size:"large",loading:m(S),onClick:m($)},{default:c(()=>[fe]),_:1},8,["loading","onClick"])])])]),o(ae)])}}});const Xe=G(ge,[["__scopeId","data-v-0e999780"]]);export{Xe as default};
