import{d as v,k as h,v as u,c as e,x as n,I as d,l as r,B as w}from"./index-e87cc119.js";import{F as l,R as x,a as i}from"./Form-3b38c25f.js";import"./useFlexGapSupport-4ee3092d.js";const y={wrapperCol:{span:24}},I={wrapperCol:{span:24}},F=v({setup(){const m=h(),p=u({loading:!1,loginType:"default"}),a=u({name:"",nid:"",password:"",role:"student"}),c=u({name:[{required:!0,message:"请输入用户名",trigger:"change"}],nid:[{required:!0,message:"请输入用户编码",trigger:"change"}],password:[{required:!0,message:"请输入正确的密码",trigger:"change"}],role:[{required:!0,message:"用户角色不能为空",trigger:"change"}]}),{validate:g,validateInfos:s}=l.useForm(a,c);async function f(){g().then(t=>{const o={...t};o.loginName=o.name+"_"+o.nid,m.passwordLogin(o)})}return()=>e("div",{class:b},[e("div",{class:"content"},[e("div",{class:"title"},["米系列直升机尾传动轴机上维护测量",e("br",null,null),"虚拟训练系统管理后台"]),e("div",{class:"py-30px px-20px"},[e(l,n(y,{name:"basic"}),{default:()=>[e(l.Item,n({name:"name"},s.name),{default:()=>[e(d,{placeholder:"请输入用户名",value:a.name,"onUpdate:value":t=>a.name=t,maxlength:30},null)]}),e(l.Item,n({name:"nid"},s.nid),{default:()=>[e(d,{placeholder:"请输入用户编码",value:a.nid,"onUpdate:value":t=>a.nid=t},null)]}),e(l.Item,n({name:"password"},s.password),{default:()=>[e(d.Password,{placeholder:"请输入登录密码",value:a.password,"onUpdate:value":t=>a.password=t,maxlength:18},null)]}),e(l.Item,n({name:"role"},s.role),{default:()=>[e(x,{class:"flex justify-between w-full login_role",value:a.role,"onUpdate:value":t=>a.role=t},{default:()=>[e(i,{value:"student"},{default:()=>[r("学员")]}),e(i,{value:"teacher"},{default:()=>[r("教员")]}),e(i,{value:"admin"},{default:()=>[r("管理员")]})]})]}),e(l.Item,n(I,{style:{marginBottom:0}}),{default:()=>[e(w,{htmlType:"submit",type:"primary",block:!0,class:"login_btn",size:"large",loading:p.loading,onClick:f},{default:()=>[r("登录")]})]})]})])])])}}),b="p1fwmfaj";export{F as default};
