import S from"./OnlineForm-018981b2-CJJHtzax.js";import{U as f,a2 as b,a3 as g,k as h,af as v,G as N,V as T,d as x,f as p,w as C,n as w}from"./vue-vendor-CxLCUzY4.js";import{c9 as L,h as B}from"./index-Cy4uayzW.js";import{k as y}from"./useExtendComponent-bb7cca20-BI3wCIBy.js";import"./index-BN26Feep.js";import"./antd-vue-vendor-CahNzUUa.js";import"./index-zKZnG1QC.js";import"./useCustomHook-acb00837-SAzzNXM4.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7-l0sNRNKZ.js";import"./componentMap-0iK4HQBq.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"./useForm-DfoT2G6J.js";import"./index-Bdn0r8CG.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useWindowSizeFn-DDyhhqyw.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"./bem-IZKqD41e.js";import"./props-CG-jAkbI.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"./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 u=(t,o,i)=>new Promise((l,a)=>{var s=e=>{try{m(i.next(e))}catch(n){a(n)}},r=e=>{try{m(i.throw(e))}catch(n){a(n)}},m=e=>e.done?l(e.value):Promise.resolve(e.value).then(s,r);m((i=i.apply(t,o)).next())});const P=x({name:"ProcessOnlineForm",inheritAttrs:!1,components:{OnlineForm:S},props:{dataId:{type:String,default:""},tableName:{type:String,default:""},taskId:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(t){const o=p(),i=p(""),l=p(1),a=p(!1),s=p(""),r=p(!1);C(()=>t.tableName,c=>{c&&m()},{immediate:!0});function m(){return u(this,null,function*(){r.value=!0;const c=`/online/cgform/api/getFormItemBytbname/${t.tableName}`,I={taskId:t.taskId};try{let d=yield B.get({url:c,params:I});i.value=d.head.id,l.value=Number(d.head.formTemplate||1),a.value=d.head.isTree==="Y",s.value=d.head.treeParentIdField||"",yield w(()=>u(this,null,function*(){(yield y(o)).createRootProperties(d)}))}catch(d){}})}function e(){return u(this,null,function*(){let c=yield y(o);r.value=!1,c.show(!0,{id:t.dataId})})}const n=p(!1);function k(){return u(this,null,function*(){n.value=!0,o.value.handleSubmit()})}function F(){n.value=!1}return{onlineFormCompRef:o,formId:i,formTemplate:l,isTreeForm:a,pidFieldName:s,renderSuccess:e,handleSuccess:F,handleSubmit:k,buttonLoading:n,spinLoading:r}}}),R={class:"cust-onl-form"},_={key:0,style:{width:"100%","text-align":"center","margin-top":"5px"}};function V(t,o,i,l,a,s){const r=f("a-button"),m=f("online-form"),e=f("a-spin");return b(),g("div",R,[h(e,{spinning:t.spinLoading},{default:v(()=>[h(m,{ref:"onlineFormCompRef",id:t.formId,disabled:t.disabled,"form-template":t.formTemplate,isTree:t.isTreeForm,pidField:t.pidFieldName,onRendered:t.renderSuccess,onSuccess:t.handleSuccess},{bottom:v(()=>[!t.disabled&&!t.spinLoading?(b(),g("div",_,[h(r,{preIcon:"ant-design:check",style:{width:"126px"},type:"primary",onClick:t.handleSubmit,loading:t.buttonLoading},{default:v(()=>[N(" 提 交 ")]),_:1},8,["onClick","loading"])])):T("",!0)]),_:1},8,["id","disabled","form-template","isTree","pidField","onRendered","onSuccess"])]),_:1},8,["spinning"])])}const Jt=L(P,[["render",V],["__scopeId","data-v-530d8f91"]]);export{Jt as default};
