import{c9 as g,h as F,u as S,bf as y}from"./index-CLZzJyTP.js";import{U as w,a2 as B,ad as k,f,w as d}from"./vue-vendor-CxLCUzY4.js";import"./index-ByX9XNkE.js";import{L as D,k as T}from"./useExtendComponent-bb7cca20-DLrsSGUN.js";import x from"./DetailForm-4aa2570b-CNmLfkjP.js";import"./componentMap-DpsJvoqz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-XZKTTfG1.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./index-Bz3DhbXN.js";import"./user.api-DAu0nuTv.js";import"./customExpression-CGrP-C85.js";import"./index-KOQNKxnC.js";import"./useListPage-CevWQ3ci.js";import"./index-Bn2zmO2L.js";import"./LinkTableListPiece-2660d709-C_0uiCkV.js";import"./OnlineSelectCascade-471fcc76-D9SPP1nv.js";import"./JModalTip-4a83aaed-HQN1qwWE.js";import"./index-BZa-EKMZ.js";import{B as I}from"./useForm-Dx3lJ3DG.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./JAreaLinkage-M9TGy8nY.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JSelectDept-CaEHrQp6.js";import"./index-44tRnyoF.js";import"./index-DvqyyN77.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContextMenu-BGU2vdqV.js";import"./JCodeEditor-CR57XeIe.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-B36c3B5x.js";import"./index-C7yPiS0L.js";import"./depart.api-DHG2p2Yd.js";import"./JPopup-BvqhHpPl.js";import"./EasyCronInput-CWOTSpxK.js";import"./JEllipsis-C_gT_vEQ.js";import"./JDictSelectTag-CfF54ALX.js";import"./JImageUpload-BFwNYdm5.js";import"./JUpload-DgDEmizw.js";import"./BasicTable-DUJWN3yz.js";import"./injectionKey-DPVn4AgL.js";import"./useWindowSizeFn-D9PllI8g.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.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 Gt=g(P,[["render",$]]);export{Gt as default};
