Files
qhmes/deploy-qhmes/frontend/js/CodeGeneratorModal-viKXvb1o-DztcJSBV.js

2 lines
8.0 KiB
Java
Raw Normal View History

2026-05-15 11:34:12 +08:00
import{d as me,f as T,e as I,r as L,n as pe,l as k,ah as m,ar as ce,as as R,F as ue,k as p,aF as n,aC as J,ag as D,G as $,au as U,aG as de}from"./vue-vendor-C7Zq48Yl.js";import{aa as ge,u as fe,n as be,bC as x,ak as ve,f as q,di as A,al as H}from"./index-BI6CMai0.js";import"./index-Di-j2gt4.js";import{B as he}from"./index-Du0A3ksf.js";import{D as ye}from"./useSchemas-svH7q1tm-S_YQfH9s.js";import Ne from"./CodeFileListModal-CFDK1gP9-H6vS2nty.js";import Te from"./FileSelectModal-DynYW6cD-Dea8x5Q6.js";import{f as Se}from"./antd-vue-vendor-BPnV8VqP.js";import{h as we}from"./main.index-Cs5ETdXF.js";import{u as Ce}from"./useForm-BZtHZyx2.js";import{B as Me}from"./BasicForm-BJnSRkIE.js";import"./vxe-table-vendor-B88kchpX.js";import"./componentMap-BBZeqR-K.js";import"./useFormItem-BdW6EoZe.js";import"./index-pxs5MULf.js";import"./index-BgYCgfME.js";import"./index-DeEq83Ov.js";import"./index-f8O7TghW.js";import"./useTimeout-DDl4l82I.js";import"./useIntersectionObserver-BMxdTqP3.js";import"./BasicModal-0sAdFEk_.js";import"./ModalHeader-keHdAHWH.js";import"./useWindowSizeFn-PRZSD86C.js";import"./download-UE0L9Rfp.js";import"./base64Conver-24EVOS6V.js";import"./index-CIBZG4nR.js";import"./index-BhQEwnQQ.js";import"./useCountdown-DqnNWBp6.js";import"./useFormItemSingle-BbRhswfn.js";import"./JSelectUser-B71zikzw.js";import"./props-DAezUTeZ.js";import"./JSelectBiz-CnEaVMUF.js";import"./JAddInput-D6qcyZjQ.js";import"./areaDataUtil-CbYCy3Ig.js";import"./index-CNkz_PUv.js";import"./index-CUdllngZ.js";import"./bem-EhXRi4nW.js";import"./props-D4vdsy3J.js";import"./useContextMenu-Cwx1lIOK.js";import"./depart.api-DeMNV8zW.js";import"./TreeIcon-DE4jdeZV.js";import"./JSelectDept-DRDVeruW.js";import"./JPopup-Bva6u6tk.js";import"./usePopBiz-CG0vVpgI.js";import"./useMethods-DVip17X8.js";import"./index-Dg4HCEvo.js";import"./JEllipsis-DqRFTSm0.js";import"./JUpload-Cz9HN61B.js";import"./index-MGIrEF-A.js";import"./index-MREkPhsT.js";import"./JAreaLinkage-BeRUFHSB.js";import"./JCodeEditor-CLVZA7Uj.js";import"./htmlmixed-NhwyF9-q.js";import"./vue-CgbRSACy.js";/* empty css */import"./EasyCronInput-7xfJ3nBh.js";import"./validator-D5SvXAAX.js";import"./user.api-C1eRtqao.js";import"./CodeFileViewModal-uGoHy1QM-NK3O04lK.js";var B=(t,a,c)=>new Promise((v,u)=>{var C=r=>{try{i(c.next(r))}catch(g){u(g)}},d=r=>{try{i(c.throw(r))}catch(g){u(g)}},i=r=>r.done?v(r.value):Promise.resolve(r.value).then(C,d);i((c=c.apply(t,a)).next())});const je=ge(),{notification:Fe}=fe(),_e=me({name:"CodeGenerator",components:{BasicForm:Me,BasicModal:he,FileSelectModal:Te,CodeFileListModal:Ne},emits:["register"],setup(t){const a="JEECG_ONL_PROJECT_PATH",c="JEECG_ONL_PROJECT_NAME",v=T(!0),u=T(),C=I(()=>v.value?800:1200),d=T("代码生成"),i=T(!1),{prefixCls:r}=be("code-generator-modal"),g=r,S=T(""),M=L({projectPath:"",packageStyle:"service",jspMode:"",jformType:"1",tableName_tmp:"",ftlDescription:"",entityName:"",codeTypes:"controller,service,dao,mapper,entity,vue"}),o=L({}),w=T([]),h=L({dataSource:[],columns:[{title:"子表名",key:"tableName",type:x.input,disabled:!0,validateRules:[{required:!0,message:"请输入${title}"}]},{title:"子表实体",key:"entityName",type:x.input,validateRules:[{required:!0,message:"请输入${title}"}]},{title:"功能说明",key:"ftlDescription",type:x.input,validateRules:[{required:!0,message:"请输入${title}"}]}]}),j=I(()=>h.dataSource.length>0),{formSchemas:y}=ye(t,{onProjectPathChange:se,onProjectPathSearch:oe,jspModeOptions:w},v),[F,{resetFields:P,setFieldsValue:O,validate:K}]=Ce({schemas:y,showActionButtonGroup:!1,labelAlign:"right"}),[W,{closeModal:E}]=ve(e=>B(null,null,function*(){yield P(),S.value=e.code,i.value=!1,h.dataSource=[],w.value=[],le(),Object.assign(o,M),z()}));function z(){return B(this,null,function*(){let{main:e,sub:l,jspModeList:f,projectPath:s}=yield q.get({url:"/online/cgform/head/tableInfo",params:{code:S.value}}),N=[];for(let b of f){const{code:G,note:ne}=b;G=="many"||N.push({label:ne,value:G})}w.value=N,e.isTree=="Y"?o.jspMode="tree":N.find(b=>b.value===e.themeTemplate)?o.jspMode=e.themeTemplate:o.jspMode=N[