import{c9 as g,h as F,u as S,bf as y}from"./index-B_2CoVdl.js";import{U as w,a2 as B,ad as k,f,w as d}from"./vue-vendor-CxLCUzY4.js";import"./index-ARbUvvsq.js";import{L as D,k as T}from"./useExtendComponent-bb7cca20-GHWcCVHB.js";import x from"./DetailForm-4aa2570b-DhakTra8.js";import"./componentMap-CzCGDP7x.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-D2AmS0aU.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./index-h7B1dCH2.js";import"./user.api-BLHI3_6c.js";import"./customExpression-CGrP-C85.js";import"./index-LwlFn7Y4.js";import"./useListPage-BEtybUiF.js";import"./index-khU3p_On.js";import"./LinkTableListPiece-2660d709-DDMDnGr2.js";import"./OnlineSelectCascade-471fcc76-Cn70lvcH.js";import"./JModalTip-4a83aaed-DJGQp0DH.js";import"./index-Dug0Hu36.js";import{B as I}from"./useForm-CcjrODHR.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./JAreaLinkage-CSgDAlrn.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JSelectDept-wKz_Qtmc.js";import"./index-BKs2x_To.js";import"./index-DAURrYyA.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContextMenu-CSt5a1-F.js";import"./JCodeEditor-esTLnfS3.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-YFlAniYT.js";import"./index-CkL00Q0a.js";import"./depart.api-0qTriT9h.js";import"./JPopup-BJBYqoWe.js";import"./EasyCronInput-DclSHT47.js";import"./JEllipsis-Cn7GCKHR.js";import"./JDictSelectTag-CxpDdimB.js";import"./JUpload-DzM-D4DX.js";import"./BasicTable-Clbg3fHx.js";import"./injectionKey-DPVn4AgL.js";import"./useWindowSizeFn-C3WExEpc.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.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"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";var L=(t,e,o)=>new Promise((m,i)=>{var l=r=>{try{a(o.next(r))}catch(s){i(s)}},p=r=>{try{a(o.throw(r))}catch(s){i(s)}},a=r=>r.done?m(r.value):Promise.resolve(r.value).then(l,p);a((o=o.apply(t,e)).next())});const O="/online/cgform/api/subform",P={name:"OnlineSubFormDetail",components:{BasicForm:I,Loading:y,DetailForm:x},props:{properties:{type:Object,required:!0},mainId:{type:String,default:""},table:{type:String,default:""},formTemplate:{type:Number,default:1}},emits:["formChange"],setup(t){const e=f(!1),{createMessage:o}=S(),m=f(""),i=f({}),{detailFormSchemas:l,createFormSchemas:p,formSpan:a}=D(t);d(()=>t.table,()=>{m.value=t.table},{immediate:!0}),d(()=>t.properties,()=>{e.value=!1,p(t.properties),e.value=!0},{deep:!0,immediate:!0}),d(()=>t.mainId,()=>{setTimeout(()=>{r()},100)},{immediate:!0});function r(){return L(this,null,function*(){yield T(e),i.value={};const{table:n,mainId:c}=t;if(!n||!c)return;let u=(yield s(n,c))||{};i.value=u})}function s(n,c){let u=`${O}/${n}/${c}`;return new Promise((v,b)=>{F.get({url:u},{isTransformResponse:!1}).then(h=>{h.success?v(h.result):b()})}).catch(()=>{o.warning("子表获取数据失败:"+n)})}return{detailFormSchemas:l,subFormData:i,formSpan:a}}};function $(t,e,o,m,i,l){const p=w("detail-form");return B(),k(p,{schemas:m.detailFormSchemas,data:m.subFormData,span:m.formSpan},null,8,["schemas","data","span"])}const Et=g(P,[["render",$]]);export{Et as default};
