LockModal-Bp0MvCgV.js 3.2 KB

1
  1. var f=(o,l,r)=>new Promise((c,t)=>{var d=e=>{try{s(r.next(e))}catch(i){t(i)}},a=e=>{try{s(r.throw(e))}catch(i){t(i)}},s=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,a);s((r=r.apply(o,l)).next())});import{d as v,e as g,ag as u,aB as F,ar as $,aE as y,aD as h,at as p,as as m,k,au as _,G as S}from"./vue-vendor-Be68asQ6.js";import{F as I,ah as L,ac as M,N as b,a as N}from"./index-BFfnEkVs.js";import{B as R}from"./index-CETWS1o0.js";import{B as P}from"./BasicForm-Cv-dsB-e.js";import{u as D}from"./useForm-kcRIHoe0.js";import{u as U}from"./lock-DSGgVsLa.js";import{h as V}from"./header-DrqstxrB.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./BasicModal-D4gc2R81.js";import"./useTimeout-Ca5eqGu-.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./componentMap-BUTAcOmo.js";import"./useFormItem-CtGMPcLp.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JAddInput-BBXQvvpq.js";import"./areaDataUtil-Cik-Rc_P.js";import"./index-BOEzG86y.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./depart.api-CDwTvdwQ.js";import"./JSelectDept-DT6g7V5M.js";import"./JPopup-DKJW27Yk.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";const A=v({name:"LockModal",components:{BasicModal:R,BasicForm:P},setup(){const{t:o}=b(),{prefixCls:l}=I("header-lock-modal"),r=L(),c=U(),t=g(()=>{var n;return(n=r.getUserInfo)==null?void 0:n.realname}),[d,{closeModal:a}]=M(),[s,{validateFields:e,resetFields:i}]=D({labelWidth:74,labelAlign:"left",wrapperCol:{},showActionButtonGroup:!1,schemas:[{field:"password",label:o("layout.header.lockScreenPassword"),component:"InputPassword",componentProps:{autocomplete:"new-password"}}]});function B(){return f(this,null,function*(){const w=(yield e()).password;a(),c.setLockInfo({isLock:!0,pwd:w}),yield i()})}const C=g(()=>{const{avatar:n}=r.getUserInfo;return n||V});return{t:o,prefixCls:l,getRealName:t,register:d,registerForm:s,handleLock:B,avatar:C}}}),G=["src"];function z(o,l,r,c,t,d){const a=u("BasicForm"),s=u("a-button"),e=u("BasicModal");return $(),F(e,y({footer:null,title:o.t("layout.header.lockScreen")},o.$attrs,{class:o.prefixCls,onRegister:o.register,canFullscreen:!1}),{default:h(()=>[p("div",{class:m(`${o.prefixCls}__entry`)},[p("div",{class:m(`${o.prefixCls}__header`)},[p("img",{src:o.avatar,class:m(`${o.prefixCls}__header-img`)},null,10,G),p("p",{class:m(`${o.prefixCls}__header-name`)},_(o.getRealName),3)],2),k(a,{onRegister:o.registerForm},null,8,["onRegister"]),p("div",{class:m(`${o.prefixCls}__footer`)},[k(s,{type:"primary",block:"",class:"mt-2",onClick:o.handleLock},{default:h(()=>[S(_(o.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}const Mo=N(A,[["render",z]]);export{Mo as default};