import{U as h,a2 as b,ad as v,af as j,k as x,d as L,n as P}from"./vue-vendor-CxLCUzY4.js";import{B as R}from"./index-XZKTTfG1.js";import"./index-ByX9XNkE.js";import{c9 as V,u as I,a8 as O}from"./index-CLZzJyTP.js";import{R as Q}from"./useSchemas-47e45edc-BYgTIBkG.js";import"./antd-vue-vendor-CahNzUUa.js";import"./validator-Dx9kcZ5e.js";import{u as U,B as _}from"./useForm-Dx3lJ3DG.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-DpsJvoqz.js";import"./useFormItem-IOFWTdED.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-C7yPiS0L.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./JAreaLinkage-M9TGy8nY.js";import"./JCodeEditor-CR57XeIe.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CWOTSpxK.js";import"./user.api-DAu0nuTv.js";var d=(i,l,r)=>new Promise((s,a)=>{var c=o=>{try{n(r.next(o))}catch(p){a(p)}},e=o=>{try{n(r.throw(o))}catch(p){a(p)}},n=o=>o.done?s(o.value):Promise.resolve(o.value).then(c,e);n((r=r.apply(i,l)).next())});const S=L({name:"CgformExtConfigModel",components:{BasicModal:R,BasicForm:_},props:{parentForm:{type:Object,required:!0}},emits:["register","ok"],setup(i,{emit:l}){const{createMessage:r}=I(),{formSchemas:s}=Q(i,{onIsDesformChange:C,onJoinQueryChange:B,onReportPrintShowChange:T,onFormLabelLengthShow:k}),[a,{resetFields:c,setFieldsValue:e,getFieldsValue:n,clearValidate:o,validate:p}]=U({schemas:s,showActionButtonGroup:!1,labelAlign:"right"}),[y,{closeModal:u}]=O(t=>d(this,null,function*(){yield c(),yield e(t.extConfigJson)}));function F(){return d(this,null,function*(){yield o(),yield P();try{const t=yield p();l("ok",t),u()}catch(t){}})}function w(){u()}function C(t){if(t==="Y"){let{themeTemplate:m}=i.parentForm.getFieldsValue(["themeTemplate"]);m==="erp"&&(i.parentForm.setFieldsValue({themeTemplate:"normal"}),r.warning("请注意：erp风格不支持对接表单设计，已自动改为默认风格！"))}else o("desFormCode")}const f="{{ window._CONFIG['domianURL'] }}/jmreport/view/{积木报表ID}";function T(t){return d(this,null,function*(){let m=n().reportPrintUrl;t===0?m===f&&(yield e({reportPrintUrl:""})):t===1&&m===""&&(yield e({reportPrintUrl:f})),o("reportPrintUrl")})}function k(t){return d(this,null,function*(){t==0&&(yield e({formLabelLength:null})),yield o("formLabelLength")})}function B(t){if(t===1){let{themeTemplate:m,isTree:M,tableType:g}=i.parentForm.getFieldsValue(["themeTemplate","isTree","tableType"]);m==="erp"&&(r.warning("请注意：erp风格不支持联合查询，配置无效!"),e({joinQuery:0})),m==="innerTable"&&(r.warning("请注意：内嵌风格不支持联合查询，配置无效!"),e({joinQuery:0})),g===1?(r.warning("请注意：单表不支持联合查询，配置无效!"),e({joinQuery:0})):g===3?(r.warning("请注意：当前表为附表，请在对应主表配置!"),e({joinQuery:0})):M==="Y"&&(r.warning("请注意：树形列表不支持联合查询，配置无效!"),e({joinQuery:0}))}}return{handleOk:F,handleCancel:w,registerModal:y,registerForm:a}}});function A(i,l,r,s,a,c){const e=h("BasicForm"),n=h("BasicModal");return b(),v(n,{onRegister:i.registerModal,title:"表单扩展配置项",width:1e3,onOk:i.handleOk,onCancel:i.handleCancel},{default:j(()=>[x(e,{onRegister:i.registerForm},null,8,["onRegister"])]),_:1},8,["onRegister","onOk","onCancel"])}const De=V(S,[["render",A],["__scopeId","data-v-f3d939e5"]]);export{De as default};
