var f=(o,l,r)=>new Promise((c,s)=>{var d=e=>{try{t(r.next(e))}catch(i){s(i)}},a=e=>{try{t(r.throw(e))}catch(i){s(i)}},t=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,a);t((r=r.apply(o,l)).next())});import{d as v,e as g,U as u,a2 as $,ad as F,af as k,a4 as n,a6 as m,a5 as h,k as _,G as y,ag as S}from"./vue-vendor-CxLCUzY4.js";import{C as b,ab as I,a8 as L,K as M,_ as R}from"./index-CLZzJyTP.js";import{B as N}from"./index-XZKTTfG1.js";import{u as P,B as U}from"./useForm-Dx3lJ3DG.js";import{u as V}from"./lock-DfuR2SXg.js";import{h as A}from"./header-OZa5fSDc.js";import"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useTimeout-KpZCXEcl.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-DpsJvoqz.js";import"./useFormItem-IOFWTdED.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-C7yPiS0L.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";const D=v({name:"LockModal",components:{BasicModal:N,BasicForm:U},setup(){const{t:o}=M(),{prefixCls:l}=b("header-lock-modal"),r=I(),c=V(),s=g(()=>{var p;return(p=r.getUserInfo)==null?void 0:p.realname}),[d,{closeModal:a}]=L(),[t,{validateFields:e,resetFields:i}]=P({labelWidth:74,labelAlign:"left",wrapperCol:{},showActionButtonGroup:!1,schemas:[{field:"password",label:o("layout.header.lockScreenPassword"),component:"InputPassword",componentProps:{autocomplete:"new-password"}}]});function C(){return f(this,null,function*(){const B=(yield e()).password;a(),c.setLockInfo({isLock:!0,pwd:B}),yield i()})}const w=g(()=>{const{avatar:p}=r.getUserInfo;return p||A});return{t:o,prefixCls:l,getRealName:s,register:d,registerForm:t,handleLock:C,avatar:w}}}),G=["src"];function z(o,l,r,c,s,d){const a=u("BasicForm"),t=u("a-button"),e=u("BasicModal");return $(),F(e,S({footer:null,title:o.t("layout.header.lockScreen")},o.$attrs,{class:o.prefixCls,onRegister:o.register,canFullscreen:!1}),{default:k(()=>[n("div",{class:m(`${o.prefixCls}__entry`)},[n("div",{class:m(`${o.prefixCls}__header`)},[n("img",{src:o.avatar,class:m(`${o.prefixCls}__header-img`)},null,10,G),n("p",{class:m(`${o.prefixCls}__header-name`)},h(o.getRealName),3)],2),_(a,{onRegister:o.registerForm},null,8,["onRegister"]),n("div",{class:m(`${o.prefixCls}__footer`)},[_(t,{type:"primary",block:"",class:"mt-2",onClick:o.handleLock},{default:k(()=>[y(h(o.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}const Uo=R(D,[["render",z]]);export{Uo as default};
