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-zKZnG1QC.js";import"./index-BN26Feep.js";import{c9 as V,u as I,a8 as O}from"./index-Cy4uayzW.js";import{R as Q}from"./useSchemas-47e45edc-CcKsVTpE.js";import"./antd-vue-vendor-CahNzUUa.js";import"./validator-CyHCj96y.js";import{u as U,B as _}from"./useForm-DfoT2G6J.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-0iK4HQBq.js";import"./useFormItem-IOFWTdED.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"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-tDBMxW9-.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./JAreaLinkage-CTMEfTuh.js";import"./JCodeEditor-U9QIstNN.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CZdChTcP.js";import"./user.api-CoaMxYm2.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};
