ProcessOnlineForm-98ede18d-DAQlVV8y.js 4.4 KB

1
  1. import S from"./OnlineForm-58282699-BOkJ_UjQ.js";import{d as N,f as m,w as T,n as x,ag as f,aq as v,ar as y,k as h,aD as g,ah as w,G as B}from"./vue-vendor-Be68asQ6.js";import{co as L,j as P}from"./index-BFfnEkVs.js";import{g as b}from"./useExtendComponent-bb98e568-D2z9GsqT.js";import"./index-D68l__AG.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./index-CETWS1o0.js";import"./useCustomHook-acb00837-ChkSbIz5.js";import"./constant-fa63bd66-Ddbq-fz2.js";import"./OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7-l0sNRNKZ.js";import"./componentMap-BUTAcOmo.js";import"./index-DPdfb5jl.js";import"./user.api-BMRcwGEd.js";import"./customExpression-BHJdu2h2.js";import"./index-D2G57Sln.js";import"./useListPage-aOfrd-Tw.js";import"./LinkTableListPiece-e016b8e6-BV6j69dt.js";import"./OnlineSelectCascade-d631ed72-woz5vuX0.js";import"./JModalTip-a927f85d-cvoo-Gj-.js";import"./useForm-kcRIHoe0.js";import"./BasicForm-Cv-dsB-e.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./BasicModal-D4gc2R81.js";import"./useWindowSizeFn-BTSGGcie.js";import"./JAreaLinkage-BNOKwn5l.js";import"./areaDataUtil-Cik-Rc_P.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JSelectDept-DT6g7V5M.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./JCodeEditor-CSivhUhT.js";import"./useFormItem-CtGMPcLp.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./JAddInput-BBXQvvpq.js";import"./index-BOEzG86y.js";import"./depart.api-CDwTvdwQ.js";import"./JPopup-DKJW27Yk.js";import"./EasyCronInput-wCv2YMHn.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./BasicTable-CuSLkXEu.js";import"./injectionKey-DPVn4AgL.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";var u=(t,o,i)=>new Promise((l,p)=>{var s=e=>{try{n(i.next(e))}catch(r){p(r)}},a=e=>{try{n(i.throw(e))}catch(r){p(r)}},n=e=>e.done?l(e.value):Promise.resolve(e.value).then(s,a);n((i=i.apply(t,o)).next())});const R=N({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=m(),i=m(""),l=m(1),p=m(!1),s=m(""),a=m(!1);T(()=>t.tableName,c=>{c&&n()},{immediate:!0});function n(){return u(this,null,function*(){a.value=!0;const c=`/online/cgform/api/getFormItemBytbname/${t.tableName}`,C={taskId:t.taskId};try{let d=yield P.get({url:c,params:C});i.value=d.head.id,l.value=Number(d.head.formTemplate||1),p.value=d.head.isTree==="Y",s.value=d.head.treeParentIdField||"",yield x(()=>u(this,null,function*(){(yield b(o)).createRootProperties(d)}))}catch(d){}})}function e(){return u(this,null,function*(){let c=yield b(o);a.value=!1,c.show(!0,{id:t.dataId})})}const r=m(!1);function k(){return u(this,null,function*(){r.value=!0,o.value.handleSubmit()})}function I(){r.value=!1}function F(){r.value=!1}return{onlineFormCompRef:o,formId:i,formTemplate:l,isTreeForm:p,pidFieldName:s,renderSuccess:e,handleSuccess:I,handleClose:F,handleSubmit:k,buttonLoading:r,spinLoading:a}}}),_={class:"cust-onl-form"},V={key:0,style:{width:"100%","text-align":"center","margin-top":"5px"}};function O(t,o,i,l,p,s){const a=f("a-button"),n=f("online-form"),e=f("a-spin");return y(),v("div",_,[h(e,{spinning:t.spinLoading},{default:g(()=>[h(n,{ref:"onlineFormCompRef",id:t.formId,disabled:t.disabled,"form-template":t.formTemplate,isTree:t.isTreeForm,pidField:t.pidFieldName,taskId:t.taskId,onRendered:t.renderSuccess,onSuccess:t.handleSuccess,onClose:t.handleClose},{bottom:g(()=>[!t.disabled&&!t.spinLoading?(y(),v("div",V,[h(a,{preIcon:"ant-design:check",style:{width:"126px"},type:"primary",onClick:t.handleSubmit,loading:t.buttonLoading},{default:g(()=>o[0]||(o[0]=[B(" 提 交 ")])),_:1},8,["onClick","loading"])])):w("",!0)]),_:1},8,["id","disabled","form-template","isTree","pidField","taskId","onRendered","onSuccess","onClose"])]),_:1},8,["spinning"])])}const Ht=L(R,[["render",O],["__scopeId","data-v-a4356798"]]);export{Ht as default};