var c=(r,n,e)=>new Promise((m,s)=>{var l=t=>{try{a(e.next(t))}catch(o){s(o)}},i=t=>{try{a(e.throw(t))}catch(o){s(o)}},a=t=>t.done?m(t.value):Promise.resolve(t.value).then(l,i);a((e=e.apply(r,n)).next())});import{B}from"./BasicForm.d11b68fd.js";import{aP as _,r as h,a as g,I as d,dw as C,aQ as f,o as M,aR as b,p as F,i as v,j as E,aU as P,ft as w,fu as y,x as I}from"./index.0d073eaa.js";import{C as R}from"./index.abdcab42.js";import"./index.78efd931.js";/* empty css              */import{B as S,a as $}from"./index.c05f9254.js";/* empty css              */import"./index.0fb15725.js";import"./index.965098be.js";import"./Checkbox.476f6e92.js";import"./index.1491cab6.js";import"./index.e317a008.js";import"./index.7075e2b7.js";import"./index.04f7e044.js";import"./index.e8daa066.js";import"./get.49a42f2e.js";import"./index.e8b360cf.js";import"./eagerComputed.156e81ff.js";import"./index.2b5ea4f6.js";import"./_baseIteratee.3919e7cf.js";import"./DeleteOutlined.247d1f35.js";import"./index.a8c197b8.js";import"./useRefs.e81831e2.js";import"./Form.48352728.js";import"./Col.a2eadc78.js";import"./useFlexGapSupport.474c31b7.js";import"./useSize.bb4e5ce5.js";import"./index.81899e8a.js";import"./index.ffb8ac7d.js";import"./index.dd1f987c.js";import"./uuid.2b29000c.js";import"./download.bb4c9304.js";import"./base64Conver.08b9f4ec.js";import"./index.31930d74.js";import"./index.1d29734e.js";import"./uniqBy.ac0f9c38.js";import"./index.aa6b7013.js";import"./PlusOutlined.64d8e001.js";import"./useWindowSizeFn.ef20ece8.js";import"./FullscreenOutlined.401a7bcd.js";const u=h(null),k=g({components:{BasicForm:B,[d.name]:d,Button:C,Card:R,BasicModal:S},emits:["reload","register"],setup(r,{emit:n}){const e=h(""),m=[{field:"name",component:"Input",label:"\u540D\u5B57",colProps:{span:24},required:!0},{field:"pid",component:"ApiTreeSelect",label:"\u4E0A\u7EA7\u83DC\u5355",componentProps:{api:w,resultField:"list"},colProps:{span:24}}],[s,{closeModal:l}]=$(o=>c(this,null,function*(){var p;e.value=o.table,(p=u.value)==null||p.appendSchemaByField({field:"table",component:"Input",label:"",colProps:{span:0},componentProps:{hidden:!0},defaultValue:e},"")})),{createMessage:i}=I(),{success:a}=i;return{formElRef:u,handleSubmit:()=>c(this,null,function*(){try{const o=u.value;if(!o)return;const p=yield o.validate();yield y(p),console.log(p),l(),a("\u64CD\u4F5C\u6210\u529F"),n("reload")}catch(o){console.log(o)}}),schemas:m,register:s}}}),A={class:"mt-3"};function D(r,n,e,m,s,l){const i=f("BasicForm"),a=f("BasicModal");return M(),b(a,P(r.$attrs,{destroyOnClose:"",onRegister:r.register,title:"\u4E00\u952E\u751F\u6210\u83DC\u5355",onOk:r.handleSubmit}),{default:F(()=>[v("div",A,[E(i,{schemas:r.schemas,ref:"formElRef",labelWidth:75,showActionButtonGroup:!1},null,8,["schemas"])])]),_:1},16,["onRegister","onOk"])}var vo=_(k,[["render",D]]);export{vo as default};
