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-B_2CoVdl.js";import{B as N}from"./index-D2AmS0aU.js";import{u as P,B as U}from"./useForm-CcjrODHR.js";import{u as V}from"./lock-BLpRs_CF.js";import{h as A}from"./header-OZa5fSDc.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.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};
