import S from"./OnlineForm-018981b2-BnPnE-sG.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-B_2CoVdl.js";import{k as y}from"./useExtendComponent-bb7cca20-GHWcCVHB.js";import"./index-ARbUvvsq.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./index-D2AmS0aU.js";import"./useCustomHook-acb00837-8eJF1uHw.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7-l0sNRNKZ.js";import"./componentMap-CzCGDP7x.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"./useForm-CcjrODHR.js";import"./index-DAURrYyA.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useWindowSizeFn-C3WExEpc.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"./bem-C6eT35UB.js";import"./props-BLY2qIO5.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"./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 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 Dt=L(P,[["render",V],["__scopeId","data-v-530d8f91"]]);export{Dt as default};
