import{o as n,c as v,an as _,W as D,w as z,x as j,_ as N,d as A,z as F,u as f,ar as W,q as K,n as Q,X as E,ad as J,r as b,b as M,G,I as X,a as B,l as p,C as d,J as P,M as H,as as Y,F as a1,a2 as l1,ah as t1,at as h1,au as I,Q as c1,R as f1}from"./index.1d5f2f42.js";import{M as L}from"./motion.e511dc23.js";import{l as e1}from"./rule.c7de6352.js";var i1="/assets/bg.7b14eacd.png";const p1={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 998.282 772.773"},r1=_('',79),s1=[r1];function d1(t,l){return n(),v("svg",p1,s1)}var o1={render:d1};const n1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 883 711.86"},Z1=_('',74),M1=[Z1];function v1(t,l){return n(),v("svg",n1,M1)}var u1={render:v1};const y1={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 896 529.113"},m1=_('',13),x1=[m1];function _1(t,l){return n(),v("svg",y1,x1)}var g1={render:_1};const w1={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 776.363 516.128"},b1=_('',28),z1=[b1];function V1(t,l){return n(),v("svg",w1,z1)}var C1={render:V1};const k1={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 871 477"},$1=_('',34),L1=[$1];function q1(t,l){return n(),v("svg",k1,L1)}var U={render:q1};const B1={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 712.046 380.322"},I1=_('',111),S1=[I1];function F1(t,l){return n(),v("svg",B1,S1)}var R1={render:F1};const E1={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",width:"500",height:"380",viewBox:"0 0 1080 589.339"},G1=_('',32),P1=[G1];function H1(t,l){return n(),v("svg",E1,P1)}var T1={render:H1};const U1=D(()=>{switch(String(new Date().getDay())){case"0":return o1;case"1":return u1;case"2":return g1;case"3":return C1;case"4":return U;case"5":return R1;case"6":return T1;default:return U}}),D1=(t=120,l=40)=>{const e=z(),h=z("");function Z(r){h.value=r}function a(){!e.value||(h.value=N1(e.value,t,l))}return j(()=>{a()}),{domRef:e,imgCode:h,setImgCode:Z,getImgCode:a}};function o(t,l){return Math.floor(Math.random()*(l-t)+t)}function S(t,l){const e=o(t,l),h=o(t,l),Z=o(t,l);return`rgb(${e},${h},${Z})`}function N1(t,l,e){let h="";const Z="0123456789",a=t.getContext("2d");if(!a)return h;a.fillStyle=S(180,230),a.fillRect(0,0,l,e);for(let r=0;r<4;r+=1){const u=Z[o(0,Z.length)];h+=u;const y=o(18,41),c=o(-30,30);a.font=`${y}px Simhei`,a.textBaseline="top",a.fillStyle=S(80,150),a.save(),a.translate(30*r+15,15),a.rotate(c*Math.PI/180),a.fillText(u,-15+5,-15),a.restore()}for(let r=0;r<5;r+=1)a.beginPath(),a.moveTo(o(0,l),o(0,e)),a.lineTo(o(0,l),o(0,e)),a.strokeStyle=S(180,230),a.closePath(),a.stroke();for(let r=0;r<41;r+=1)a.beginPath(),a.arc(o(0,l),o(0,e),1,0,2*Math.PI),a.closePath(),a.fillStyle=S(150,200),a.fill();return h}const A1={name:"ReImageVerify"},O1=A({...A1,props:{code:{type:String,required:!1,default:""}},emits:["update:code"],setup(t,{expose:l,emit:e}){const h=t,{domRef:Z,imgCode:a,setImgCode:r,getImgCode:u}=D1();return F(()=>h.code,y=>{r(y)}),F(a,y=>{e("update:code",y)}),l({getImgCode:u}),(y,c)=>(n(),v("canvas",{ref_key:"domRef",ref:Z,width:"120",height:"40",class:"cursor-pointer",onClick:c[0]||(c[0]=(...q)=>f(u)&&f(u)(...q))},null,512))}});var j1=N(O1,[["__file","D:/work/rep-v3/report-v3/src/components/ReImageVerify/src/index.vue"]]);const W1=W(j1);var K1="/assets/logo.6f5be7a3.png";const Q1=t=>(c1("data-v-37dfd6fc"),t=t(),f1(),t),J1=["src"],X1={class:"login-container"},Y1={class:"img"},a2={class:"login-box"},l2={class:"login-form"},t2={class:"flex w-full items-center justify-center"},h2=["src"],c2=Q1(()=>M("h2",null,"\u6570\u636E\u7EDF\u8BA1",-1)),f2={class:"w-full h-20px flex justify-between items-center"},e2={class:"w-full flex justify-center"},i2={name:"Login"},p2=A({...i2,setup(t){var T;(T=K().appContext.config.globalProperties.$config)==null||T.Title;const l=z(""),e=Q(),h=z(!1),Z=z(!1),a=z(),r=D(()=>E().currentPage),{loginByUsername:u}=E(),{VITE_IS_PROD:y}=l1(),c=J({username:"",password:"",verifyCode:""}),q=async V=>{h.value=!0,V&&await V.validate(async(i,C)=>{if(i)u(c).then(async x=>{const{code:g,message:m,data:k}=x;if(Number(g)===1){const{userinfo:$,token:s}=k!=null?k:{},{nickname:R}=$!=null?$:{};t1.setItem("info",{username:R!=null?R:"",accessToken:s!=null?s:""}),h1().then(w=>{!w||(w==null?void 0:w.length)===0?(h.value=!1,I.warning("\u8BE5\u7528\u6237\u5F53\u524D\u516C\u53F8\u65E0\u83DC\u5355\u6743\u9650\uFF01")):(I.success("\u767B\u5F55\u6210\u529F"),e.push("/"))}).catch(w=>{w===1e4&&e.push("/welcome?error=roleExcption")}).catch(()=>{h.value=!1})}else g>100&&g<200?(g===104&&I.error(m!=null?m:""),h.value=!1):(h.value=!1,I.error(m!=null?m:""))});else return h.value=!1,C}).catch(()=>{h.value=!1})};function O(){window.open("https://beian.miit.gov.cn/")}return F(l,V=>{E().SET_VERIFYCODE(V)}),F(c,()=>{c.username.length>11&&(c.username=c.username.slice(0,11))}),(V,i)=>{const C=b("el-input"),x=b("el-form-item"),g=b("el-checkbox"),m=b("el-button"),k=b("ElButton"),$=b("el-form");return n(),v(a1,null,[M("img",{src:f(i1),class:"wave"},null,8,J1),M("div",X1,[M("div",Y1,[(n(),G(X(f(U1))))]),M("div",a2,[M("div",l2,[B(' '),M("div",t2,[M("img",{src:f(K1),style:{height:"100px"}},null,8,h2)]),p(f(L),null,{default:d(()=>[B("

{{ title }}

"),c2]),_:1}),f(r)===0?(n(),G($,{key:0,ref_key:"ruleFormRef",ref:a,model:c,rules:f(e1),size:"large",onKeyup:i[6]||(i[6]=Y(s=>q(a.value),["enter"]))},{default:d(()=>[p(f(L),{delay:100},{default:d(()=>[p(x,{prop:"username"},{default:d(()=>[p(C,{clearable:"",modelValue:c.username,"onUpdate:modelValue":i[0]||(i[0]=s=>c.username=s),placeholder:"\u8D26\u53F7","prefix-icon":f(P)("user")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),p(f(L),{delay:150},{default:d(()=>[p(x,{prop:"password"},{default:d(()=>[p(C,{clearable:"","show-password":"",modelValue:c.password,"onUpdate:modelValue":i[1]||(i[1]=s=>c.password=s),placeholder:"\u5BC6\u7801","prefix-icon":f(P)("lock")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),p(f(L),{delay:200},{default:d(()=>[p(x,{prop:"verifyCode"},{default:d(()=>[p(C,{clearable:"",modelValue:c.verifyCode,"onUpdate:modelValue":i[3]||(i[3]=s=>c.verifyCode=s),placeholder:"\u9A8C\u8BC1\u7801","prefix-icon":f(P)("ri:shield-keyhole-line",{online:!0})},{append:d(()=>[p(f(W1),{code:l.value,"onUpdate:code":i[2]||(i[2]=s=>l.value=s)},null,8,["code"])]),_:1},8,["modelValue","prefix-icon"])]),_:1})]),_:1}),p(f(L),{delay:250},{default:d(()=>[p(x,null,{default:d(()=>[M("div",f2,[p(g,{modelValue:Z.value,"onUpdate:modelValue":i[4]||(i[4]=s=>Z.value=s)},{default:d(()=>[H("\u8BB0\u4F4F\u5BC6\u7801")]),_:1},8,["modelValue"])]),p(m,{class:"w-full mt-4",size:"default",type:"primary",loading:h.value,onClick:i[5]||(i[5]=s=>q(a.value))},{default:d(()=>[H(" \u767B\u5F55 ")]),_:1},8,["loading"])]),_:1}),f(y)?(n(),G(x,{key:0},{default:d(()=>[M("div",e2,[p(k,{link:"",onClick:O},{default:d(()=>[H("\u4EACICP\u59072022033072\u53F7-1")]),_:1})])]),_:1})):B("v-if",!0)]),_:1})]),_:1},8,["model","rules"])):B("v-if",!0)])])])],64)}}});var o2=N(p2,[["__scopeId","data-v-37dfd6fc"],["__file","D:/work/rep-v3/report-v3/src/views/login/index.vue"]]);export{o2 as default};