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-D2AmS0aU.js";import"./index-ARbUvvsq.js";import{c9 as V,u as I,a8 as O}from"./index-B_2CoVdl.js";import{R as Q}from"./useSchemas-47e45edc-DM6z_UTa.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./validator-jM63P_3m.js";import{u as U,B as _}from"./useForm-CcjrODHR.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.js";import"./user.api-BLHI3_6c.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};
