var M=Object.defineProperty;var g=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var h=(i,t,o)=>t in i?M(i,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[t]=o,w=(i,t)=>{for(var o in t||(t={}))k.call(t,o)&&h(i,o,t[o]);if(g)for(var o of g(t))y.call(t,o)&&h(i,o,t[o]);return i};var u=(i,t,o)=>new Promise((n,s)=>{var l=e=>{try{p(o.next(e))}catch(a){s(a)}},c=e=>{try{p(o.throw(e))}catch(a){s(a)}},p=e=>e.done?n(e.value):Promise.resolve(e.value).then(l,c);p((o=o.apply(i,t)).next())});import{d as R,f as d,u as m,a2 as C,ad as L,af as O,k as P,ag as S}from"./vue-vendor-CxLCUzY4.js";import"./index-ARbUvvsq.js";import{B as U}from"./index-D2AmS0aU.js";import{s as b,f as x}from"./template.api-DAsI2Su5.js";import{u as V,B as A}from"./useForm-CcjrODHR.js";import{a8 as G}from"./index-B_2CoVdl.js";import"./componentMap-CzCGDP7x.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useFormItem-CWa0w7fA.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-DAURrYyA.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useWindowSizeFn-C3WExEpc.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";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.js";import"./validator-jM63P_3m.js";import"./user.api-BLHI3_6c.js";const To=R({__name:"TemplateModal",emits:["success","register"],setup(i,{emit:t}){const o=t,n=d(""),s=d(!1),[l,{resetFields:c,setFieldsValue:p,validate:e,updateSchema:a,setProps:B}]=V({schemas:x,showActionButtonGroup:!1}),[F,{setModalProps:f,closeModal:_}]=G(r=>u(this,null,function*(){f({confirmLoading:!1,showCancelBtn:!!(r!=null&&r.showFooter),showOkBtn:!!(r!=null&&r.showFooter)}),s.value=m(r.isUpdate),n.value=m(r.title),yield c(),yield p(w({},r.record)),B({disabled:!(r!=null&&r.showFooter)})}));function v(){return u(this,null,function*(){try{const r=yield e();f({confirmLoading:!0}),yield b(r,s),_(),o("success")}finally{f({confirmLoading:!1})}})}return(r,I)=>(C(),L(m(U),S({onRegister:m(F),title:n.value,width:800},r.$attrs,{onOk:v}),{default:O(()=>[P(m(A),{onRegister:m(l)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});export{To as default};
