2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
|
import{C as z,D as P,F as T,G as X,w as G}from"./element-plus.ff90c99c.js";import{u as C,a as M,c as h,A as b,_ as O,b as Q,P as B,d as W}from"./index.87cea444.js";import{u as Y,a as H}from"./vue-router.6d4cf914.js";import{d as D,b as L,o as _,c as f,a as r,F as J,a9 as Z,u as y,V as R,r as U,s as V,$ as ee,i as oe,W as o,Q as c,aa as E,U as te}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.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=D({__name:"footer",setup(g){const t=C(),u=L(()=>t.config.copyright_config||[]);return(m,a)=>(_(),f("footer",se,[r("div",ne,[(_(!0),f(J,null,Z(y(u),l=>(_(),f("a",{class:"mx-1 hover:underline",href:l.value,target:"_blank",key:l.key},R(l.key),9,re))),128))])]))}});function ce(g){const t=U(!1);return{isLock:t,lockFn:async(...m)=>{if(!t.value){t.value=!0;try{const a=await g(...m);return t.value=!1,a}catch(a){throw t.value=!1,a}}}}}const ue={class:"login flex flex-col"},le={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=D({__name:"login",setup(g){const t=V(),u=V(),m=C(),a=M(),l=Y(),K=H(),i=U(!1),v=L(()=>m.config),s=ee({account:"",password:""}),N={account:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7",trigger:["blur"]}],password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:["blur"]}]},S=()=>{var e;if(!s.password)return(e=t.value)==null?void 0:e.focus();x()},x=async()=>{var d;await((d=u.value)==null?void 0:d.validate()),h.set(b,{remember:i.value,account:i.value?s.account:""}),await a.login(s);const{query:{redirect:e}}=l,n=typeof e=="string"?e:B.INDEX;K.push(h.get("logout")==s.account||typeof e=="string"?n:B.INDEX)},{isLock:$,lockFn:I}=ce(x);return oe(()=>{const e=h.get(b);e!=null&&e.remember&&(i.value=e.remember,s.account=e.account)}),(e,n)=>{const d=O,w=Q,F=z,k=P,A=T,q=X,j=G;return _(),f("div",ue,[r("div",le,[r("div",ie,[r("div",pe,[o(d,{src:v.value.login_image,width:400,height:"100%"},null,8,["src"])]),r("div",me,[r("div",de,R(v.value.web_name),1),o(A,{ref_key:"formRef",ref:u,model:s,size:"large",rules:N},{default:c(()=>[o(k,{prop:"account"},{default:c(()=>[o(F,{modelValue:s.account,"onUpdate:modelValue":n[0]||(n[0]=p=>s.account=p),placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",onKeyup:E(S,["enter"])},{prepend:c(()=>[o(w,{name:"el-icon-User"})]),_:1},8,["modelValue","onKeyup"])]),_:1}),o(k,{prop:"password"},{default:c(()=>[o(F,{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:E(x,["enter"])},{prepend:c(()=>[o(w,{name:"el-icon-Lock"})]),_:1},8,["modelValue","onKeyup"])]),_:1})]),_:1},8,["model"]),r("div",_e,[o(q,{modelValue:i.value,"onUpdate:modelValue":n[2]||(n[2]=p=>i.value=p),l
|