2 lines
4.1 KiB
Java
2 lines
4.1 KiB
Java
import{f,r as T,ah as w,ar as v,as as C,F as y,k as p,aF as s,au as M,aB as b,aD as x,G as u,av as F}from"./vue-vendor-C7Zq48Yl.js";import{u as R,ak as _,f as G,al as z}from"./index-BI6CMai0.js";import"./index-Di-j2gt4.js";import{B as I}from"./index-Du0A3ksf.js";import{bW as N}from"./antd-vue-vendor-BPnV8VqP.js";import S from"./CodeFileViewModal-uGoHy1QM-NK3O04lK.js";import{downloadByData as H}from"./download-UE0L9Rfp.js";import{h as K}from"./main.index-Cs5ETdXF.js";import"./vxe-table-vendor-B88kchpX.js";import"./BasicForm-BJnSRkIE.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"./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"./useForm-BZtHZyx2.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"./base64Conver-24EVOS6V.js";var j=(m,e,a)=>new Promise((o,d)=>{var c=t=>{try{r(a.next(t))}catch(l){d(l)}},n=t=>{try{r(a.throw(t))}catch(l){d(l)}},r=t=>t.done?o(t.value):Promise.resolve(t.value).then(c,n);r((a=a.apply(m,e)).next())});const P={name:"CodeFileListModal",components:{BasicModal:I,InfoCircleTwoTone:N,CodeFileViewModal:S},emits:["register"],setup(){const{createMessage:m}=R(),e=f([]),a=window.innerHeight-150,o=T({overflowY:"auto",maxHeight:a+"px"}),d=f(!1),c=f(""),n=f(""),[r,{closeModal:t}]=_(i=>j(null,null,function*(){e.value=i.codeList,c.value=i.tableName,n.value=i.pathKey}));function l(){t()}function g(){let i=e.value;if(!i||i.length==0){m.warning("无代码!");return}let V=i.join(",");return G.post({url:"/online/cgform/api/downGenerateCode",params:{fileList:encodeURI(V),pathKey:n.value},responseType:"blob"},{isTransformResponse:!1}).then(h=>{if(!h||h.size==0){m.warning("导出代码失败!");return}let L="导到生成代码_"+c.value+"_"+new Date().getTime()+".zip";H(h,L,"application/zip")})}const[k,{openModal:D}]=z();function B(){let i=e.value;D(!0,{codeList:i,pathKey:n.value})}return{registerModal:r,registerCodeViewModal:k,divStyle:o,codeList:e,onDownloadGenerateCode:g,handleClose:l,handleView:B,loading:d}}};function U(m,e,a,o,d,c){const n=w("info-circle-two-tone"),r=w("a-button"),t=w("BasicModal"),l=w("code-file-view-modal");return C(),v(y,null,[p(t,{onRegister:o.registerModal,width:1200,defaultFullscreen:!1,canFullscreen:!1},{title:s(()=>[p(n),e[0]||(e[0]=u(" 代码生成结果 ",-1))]),footer:s(()=>[p(r,{onClick:o.handleClose},{default:s(()=>[...e[2]||(e[2]=[u("关闭",-1)])]),_:1},8,["onClick"]),p(r,{type:"primary",ghost:"",onClick:o.handleView},{default:s(()=>[...e[3]||(e[3]=[u("在线预览",-1)])]),_:1},8,["onClick"]),p(r,{type:"primary",onClick:o.onDownloadGenerateCode,loading:o.loading},{default:s(()=>[...e[4]||(e[4]=[u("下载到本地",-1)])]),_:1},8,["onClick","loading"])]),default:s(()=>[M("div",{style:b(o.divStyle)},[M("p",null,[(C(!0),v(y,null,x(o.codeList,g=>(C(),v(y,null,[u(F(g),1),e[1]||(e[1]=M("br",null,null,-1))],64))),256))])],4)]),_:1},8,["onRegister"]),p(l,{onRegister:o.registerCodeViewModal,onDownload:o.onDownloadGenerateCode,onClose:o.handleClose},null,8,["onRegister","onDownload","onClose"])],64)}const $e=K(P,[["render",U]]);export{$e as default};
|