import{c9 as g,h as F,u as S,bf as y}from"./index-CYriLmQo.js";import{U as w,a2 as B,ad as k,f,w as d}from"./vue-vendor-CxLCUzY4.js";import"./index-BkgeZpOO.js";import{L as D,k as T}from"./useExtendComponent-bb7cca20-qwBBEorv.js";import x from"./DetailForm-4aa2570b-DVPV0ggH.js";import"./componentMap-7D1QIeNI.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-CF_FJn6P.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./index-C143YDY6.js";import"./user.api-BUwWVSBN.js";import"./customExpression-CGrP-C85.js";import"./index-BN5Ac_IG.js";import"./useListPage-i3Wl0_Fg.js";import"./index-Bx9Mnn3N.js";import"./LinkTableListPiece-2660d709-BxbO6G9v.js";import"./OnlineSelectCascade-471fcc76-BhQCunHf.js";import"./JModalTip-4a83aaed-BVM0v87K.js";import"./index-CEZCyHDA.js";import{B as I}from"./useForm-8o5KRzWo.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./JAreaLinkage-DFTeDmm8.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JSelectDept-DorRVguN.js";import"./index-BTAl55Kt.js";import"./index-CxQILSKV.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useTimeout-DC8132dd.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContextMenu-DYyhcDf7.js";import"./JCodeEditor-_KZ8XnNK.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-CXT54-j9.js";import"./index-BTSd5ebC.js";import"./depart.api-C9T5xfw6.js";import"./JPopup-KP1kIsae.js";import"./EasyCronInput-XK54XB3r.js";import"./JEllipsis-287cEHxd.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JUpload-pyrTRFCz.js";import"./BasicTable-DAfCfXmD.js";import"./injectionKey-DPVn4AgL.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.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};
