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-CYriLmQo.js";import{B as N}from"./index-CF_FJn6P.js";import{u as P,B as U}from"./useForm-8o5KRzWo.js";import{u as V}from"./lock-tgLu2R2K.js";import{h as A}from"./header-OZa5fSDc.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-7D1QIeNI.js";import"./useFormItem-CWa0w7fA.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTSd5ebC.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.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 Po=R(D,[["render",z]]);export{Po as default};
