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-Cy4uayzW.js";import{B as N}from"./index-zKZnG1QC.js";import{u as P,B as U}from"./useForm-DfoT2G6J.js";import{u as V}from"./lock-BJMZxYoe.js";import{h as A}from"./header-OZa5fSDc.js";import"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useTimeout-gJpgadD6.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-0iK4HQBq.js";import"./useFormItem-IOFWTdED.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-tDBMxW9-.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.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};
