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-CF_FJn6P.js";import"./index-BkgeZpOO.js";import{c9 as V,u as I,a8 as O}from"./index-CYriLmQo.js";import{R as Q}from"./useSchemas-47e45edc-DSyc5PKk.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./validator-0TDlyteC.js";import{u as U,B as _}from"./useForm-8o5KRzWo.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-7D1QIeNI.js";import"./useFormItem-CWa0w7fA.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTSd5ebC.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./JAreaLinkage-DFTeDmm8.js";import"./JCodeEditor-_KZ8XnNK.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-XK54XB3r.js";import"./user.api-BUwWVSBN.js";var d=(i,l,r)=>new Promise((s,m)=>{var c=o=>{try{n(r.next(o))}catch(p){m(p)}},e=o=>{try{n(r.throw(o))}catch(p){m(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}),[m,{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:a}=i.parentForm.getFieldsValue(["themeTemplate"]);a==="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 a=n().reportPrintUrl;t===0?a===f&&(yield e({reportPrintUrl:""})):t===1&&a===""&&(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:a,isTree:M,tableType:g}=i.parentForm.getFieldsValue(["themeTemplate","isTree","tableType"]);a==="erp"&&(r.warning("请注意：erp风格不支持联合查询，配置无效!"),e({joinQuery:0})),a==="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:m}}});function A(i,l,r,s,m,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 Ae=V(S,[["render",A],["__scopeId","data-v-f3d939e5"]]);export{Ae as default};
