var V=Object.defineProperty,z=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var b=(t,e,a)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,_=(t,e)=>{for(var a in e||(e={}))N.call(e,a)&&b(t,a,e[a]);if(k)for(var a of k(e))O.call(e,a)&&b(t,a,e[a]);return t},y=(t,e)=>z(t,E(e));var g=(t,e,a)=>new Promise((u,o)=>{var l=s=>{try{c(a.next(s))}catch(m){o(m)}},f=s=>{try{c(a.throw(s))}catch(m){o(m)}},c=s=>s.done?u(s.value):Promise.resolve(s.value).then(l,f);c((a=a.apply(t,e)).next())});import{d as w,r as P,f as M,U as d,a2 as j,ad as q,af as i,k as n,G,ag as I,u as L}from"./vue-vendor-CxLCUzY4.js";import{B as T}from"./BasicModal-D3g2CFhF.js";import{ab as $,a8 as A,u as D}from"./index-B_2CoVdl.js";import"./index-D2AmS0aU.js";import{rules as H}from"./validator-jM63P_3m.js";import{a5 as J}from"./antd-vue-vendor-CDWW6V_M.js";import{b as K}from"./UserSetting.api-CrEn9FF2.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.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"./user.api-BLHI3_6c.js";const Q=w({name:"user-replace-email-modal"}),fe=w(y(_({},Q),{emits:["register","success"],setup(t,{emit:e}){const a=$(),{createMessage:u}=D(),o=P({email:""}),l=M(),f={email:[_({},H.duplicateCheckRule("sys_user","email",o,{label:"邮箱"})[0]),{required:!0,type:"email",message:"邮箱格式不正确"}]},c=J.useForm,s=M(""),m=e,[B,{setModalProps:C,closeModal:R}]=A(r=>g(this,null,function*(){l.value.resetFields(),l.value.clearValidate(),C({confirmLoading:!1}),s.value="修改邮箱",r.record.smscode="",Object.assign(o,r.record)}));function F(){return g(this,null,function*(){yield l.value.validateFields(),K(o).then(r=>{r.success?(u.success("修改邮箱成功"),m("success"),R()):u.warning(r.message)})})}return(r,p)=>{const h=d("a-input"),v=d("a-form-item"),x=d("a-button"),S=d("a-form");return j(),q(T,I(r.$attrs,{onRegister:L(B),width:"500px",title:s.value,showCancelBtn:!1,showOkBtn:!1}),{default:i(()=>[n(S,{class:"antd-modal-form",ref_key:"formRef",ref:l,model:o,rules:f},{default:i(()=>[n(v,{name:"email"},{default:i(()=>[n(h,{size:"large",value:o.email,"onUpdate:value":p[0]||(p[0]=U=>o.email=U),placeholder:"请输入邮箱"},null,8,["value"])]),_:1}),n(v,null,{default:i(()=>[n(x,{size:"large",type:"primary",block:"",onClick:F},{default:i(()=>p[1]||(p[1]=[G(" 确认 ")])),_:1})]),_:1})]),_:1},8,["model"])]),_:1},16,["onRegister","title"])}}}));export{fe as default};
