import{c9 as g,h as F,u as S,bf as y}from"./index-Cy4uayzW.js";import{U as w,a2 as B,ad as k,f,w as d}from"./vue-vendor-CxLCUzY4.js";import"./index-BN26Feep.js";import{L as D,k as T}from"./useExtendComponent-bb7cca20-BI3wCIBy.js";import x from"./DetailForm-4aa2570b-BsHyLfvx.js";import"./componentMap-0iK4HQBq.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-zKZnG1QC.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./index-CsJ9aAmV.js";import"./user.api-CoaMxYm2.js";import"./customExpression-CGrP-C85.js";import"./index-gyz1IdHU.js";import"./useListPage-TMORxSEa.js";import"./index-B4vNk56t.js";import"./LinkTableListPiece-2660d709-DrzfYgba.js";import"./OnlineSelectCascade-471fcc76-RMDlPcWh.js";import"./JModalTip-4a83aaed-B3Ect82j.js";import"./index-DmeKrdZg.js";import{B as I}from"./useForm-DfoT2G6J.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./JAreaLinkage-CTMEfTuh.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JSelectDept-D-TUaHvK.js";import"./index-CNQBnF3P.js";import"./index-Bdn0r8CG.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContextMenu-Q6J5bB_u.js";import"./JCodeEditor-U9QIstNN.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-DP4caUmw.js";import"./index-tDBMxW9-.js";import"./depart.api-B8q8MC-j.js";import"./JPopup-CVHkQZFq.js";import"./EasyCronInput-CZdChTcP.js";import"./JEllipsis-TuDc52fh.js";import"./JDictSelectTag-CalJXNVe.js";import"./JImageUpload-C5OCTlCG.js";import"./JUpload-DSWoDwh2.js";import"./BasicTable-CgafrQwz.js";import"./injectionKey-DPVn4AgL.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.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};
