import{_ as b,o as x,c as y,a as e,b as a,w as o,d as h,r as n,u as V,e as B,f as R,g as d}from"./index-BO9jfAEj.js";import{_ as k}from"./logo-CxXS7KxG.js";import{u as A}from"./auth-QJFhhynd.js";import"./index-3KNrlnzw.js";const I={class:"internal-login"},z={class:"internal-login__panel med-panel"},M={__name:"LoginView",setup(N){const m=V(),p=A(),i=d(null),r=d(!1),s=R({username:"",password:""}),_={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]};async function f(){if(await i.value.validate().catch(()=>!1)){r.value=!0;try{await p.login(s.username,s.password),m.push("/")}finally{r.value=!1}}}return(g,l)=>{const u=n("el-input"),c=n("el-form-item"),v=n("el-button"),w=n("el-form");return x(),y("div",I,[l[5]||(l[5]=e("section",{class:"internal-login__brand"},[e("div",{class:"internal-login__brand-main"},[e("img",{src:k,class:"internal-login__logo",alt:"医梦AI"}),e("div",null,[e("h1",null,"OKR 绩效管理系统"),e("p",null,"医梦AI 内部绩效运营工作台"),e("svg",{class:"medical-pulse",viewBox:"0 0 220 24","aria-hidden":"true",focusable:"false"},[e("path",{d:"M2 12h72l8-8 10 16 12-16 8 8h106"})])])]),e("svg",{class:"molecule-mark",viewBox:"0 0 180 150","aria-hidden":"true",focusable:"false"},[e("path",{d:"M48 44 92 28 134 58 116 112 62 112 48 44Z"}),e("circle",{cx:"48",cy:"44",r:"7"}),e("circle",{cx:"92",cy:"28",r:"7"}),e("circle",{cx:"134",cy:"58",r:"7"}),e("circle",{cx:"116",cy:"112",r:"7"}),e("circle",{cx:"62",cy:"112",r:"7"})])],-1)),e("section",z,[l[3]||(l[3]=e("div",{class:"login-panel__header"},[e("span",{class:"login-panel__eyebrow"},"Internal Access"),e("h2",null,"账号登录")],-1)),a(w,{model:s,rules:_,ref_key:"formRef",ref:i,onSubmit:h(f,["prevent"]),class:"login-form"},{default:o(()=>[a(c,{prop:"username"},{default:o(()=>[a(u,{modelValue:s.username,"onUpdate:modelValue":l[0]||(l[0]=t=>s.username=t),placeholder:"用户名",size:"large",class:"custom-input"},null,8,["modelValue"])]),_:1}),a(c,{prop:"password"},{default:o(()=>[a(u,{modelValue:s.password,"onUpdate:modelValue":l[1]||(l[1]=t=>s.password=t),type:"password",placeholder:"密码",size:"large","show-password":"",class:"custom-input"},null,8,["modelValue"])]),_:1}),a(v,{class:"login-btn",size:"large","native-type":"submit",loading:r.value},{default:o(()=>[...l[2]||(l[2]=[B(" 登录 ",-1)])]),_:1},8,["loading"])]),_:1},8,["model"]),l[4]||(l[4]=e("div",{class:"login-panel__footer"},[e("span",{class:"login-help"},"账号由 HR 管理员创建，如需开通请联系组织管理员")],-1))])])}}},U=b(M,[["__scopeId","data-v-66de099a"]]);export{U as default};
