OnlineAutoModal-95f46901-CZvR9r5G.js 5.8 KB

1
  1. import{d as A,f as k,w as H,ag as l,aB as b,ar as u,aE as y,aD as a,k as C,aq as q,ah as N,F as G,aC as Z,G as z,au as B,at as F}from"./vue-vendor-Be68asQ6.js";import{B as J}from"./index-CETWS1o0.js";import K from"./OnlineForm-58282699-BOkJ_UjQ.js";import{b as Q}from"./useExtendComponent-bb98e568-D2z9GsqT.js";import{t as U}from"./CommentPanel-C_uukvSf.js";import{E as X}from"./constant-fa63bd66-Ddbq-fz2.js";import{co as Y}from"./index-BFfnEkVs.js";import"./index-D68l__AG.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./useCustomHook-acb00837-ChkSbIz5.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"./BasicModal-D4gc2R81.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./useForm-kcRIHoe0.js";import"./BasicForm-Cv-dsB-e.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";import"./index-jjY34ziH.js";var tt=(t,p,o)=>new Promise((d,c)=>{var f=e=>{try{i(o.next(e))}catch(r){c(r)}},m=e=>{try{i(o.throw(e))}catch(r){c(r)}},i=e=>e.done?d(e.value):Promise.resolve(e.value).then(f,m);i((o=o.apply(t,p)).next())});const et=A({name:"OnlineAutoModal",props:{id:{type:String,default:""},source:{type:String,default:""},buttonSwitch:Object,cgBIBtnMap:Object,confirmBtnCfg:{type:Object,default:()=>({enabled:!0,buttonName:"确定",buttonIcon:""})},cancelBtnCfg:{type:Object,default:()=>({enabled:!0,buttonName:"关闭",buttonIcon:""})}},components:{BasicModal:J,OnlineForm:K,CommentPanel:U},emits:["success","register","formConfig"],setup(t,{emit:p}){const o=k(),d=k(0);function c(){o.value&&o.value.reload()}const{title:f,modalWidth:m,registerModal:i,closeModal:e,cgButtonList:r,handleCgButtonClick:g,disableSubmit:h,handleSubmit:n,submitLoading:I,handleCancel:T,handleFormConfig:v,onlineFormCompRef:w,formTemplate:M,isTreeForm:O,pidFieldName:R,renderSuccess:L,formRendered:D,tableName:E,tableId:P,formDataId:j,enableComment:x,onCloseEvent:S,themeTemplate:_}=Q(!1,{emit:p},c);function V(s){p("success",s),e(),S()}H(()=>t.id,$,{immediate:!0});function $(){return tt(this,null,function*(){if(D.value=!1,!t.id)return;const s={};t.source===X&&(s.tabletype=3),yield v(t.id,s)})}return{title:f,onlineFormCompRef:w,renderSuccess:L,registerModal:i,handleSubmit:n,handleSuccess:V,handleCancel:T,modalWidth:m,formTemplate:M,disableSubmit:h,cgButtonList:r,handleCgButtonClick:g,isTreeForm:O,pidFieldName:R,submitLoading:I,tableName:E,tableId:P,formDataId:j,enableComment:x,commentPanelRef:o,onCloseEvent:S,themeTemplate:_,handleCommentOpen:(s,W)=>{d.value=W},commentSpan:d}}});function ot(t,p,o,d,c,f){const m=l("a-button"),i=l("a-col"),e=l("a-row"),r=l("online-form"),g=l("comment-panel"),h=l("BasicModal");return u(),b(h,y({title:t.title,onCancel:t.onCloseEvent,enableComment:t.enableComment,width:t.modalWidth},t.$attrs,{maxHeight:600,onRegister:t.registerModal,wrapClassName:"jeecg-online-modal",onOk:t.handleSubmit,onCommentOpen:t.handleCommentOpen}),{footer:a(()=>[C(e,null,{default:a(()=>[C(i,{span:24-t.commentSpan},{default:a(()=>[(u(!0),q(G,null,Z(t.cgButtonList,n=>(u(),b(m,{key:n.id,type:"primary",onClick:I=>t.handleCgButtonClick(n.optType,n.buttonCode),preIcon:n.buttonIcon?"ant-design:"+n.buttonIcon:""},{default:a(()=>[z(B(n.buttonName),1)]),_:2},1032,["onClick","preIcon"]))),128)),!t.disableSubmit&&t.confirmBtnCfg.enabled?(u(),b(m,{key:"submit",type:"primary",preIcon:t.confirmBtnCfg.buttonIcon,loading:t.submitLoading,onClick:t.handleSubmit},{default:a(()=>[F("span",null,B(t.confirmBtnCfg.buttonName),1)]),_:1},8,["preIcon","loading","onClick"])):N("",!0),t.cancelBtnCfg.enabled?(u(),b(m,{key:"back",onClick:t.handleCancel},{default:a(()=>[F("span",null,B(t.cancelBtnCfg.buttonName),1)]),_:1},8,["onClick"])):N("",!0)]),_:1},8,["span"])]),_:1})]),comment:a(()=>[C(g,{ref:"commentPanelRef",tableId:t.tableId,tableName:t.tableName,dataId:t.formDataId},null,8,["tableId","tableName","dataId"])]),default:a(()=>[C(r,y(t.$attrs,{ref:"onlineFormCompRef",id:t.id,disabled:t.disableSubmit,"form-template":t.formTemplate,isTree:t.isTreeForm,pidField:t.pidFieldName,themeTemplate:t.themeTemplate,cgBIBtnMap:t.cgBIBtnMap,buttonSwitch:t.buttonSwitch,onRendered:t.renderSuccess,onSuccess:t.handleSuccess}),null,16,["id","disabled","form-template","isTree","pidField","themeTemplate","cgBIBtnMap","buttonSwitch","onRendered","onSuccess"])]),_:1},16,["title","onCancel","enableComment","width","onRegister","onOk","onCommentOpen"])}const se=Y(et,[["render",ot]]);export{se as default};