1 |
- import{d as G,h as Q,u as j,r as d,e as E,k as J,P as L,o as s,c as O,f as a,w as t,a as l,Q as P,m as i,v as p,q as u,t as W,F as X,U as Z,z as $,A as aa,_ as ea,B as ta,C as la,D as ra,G as oa,H as na,__tla as ia}from"./index-2eab2d23.js";import{_ as ca,__tla as sa}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{_ as ma,__tla as _a}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{d as F,__tla as da}from"./formatTime-41155543.js";import{d as pa}from"./download-20922b56.js";import{d as ua,e as fa,s as ya,f as ha,__tla as wa}from"./index-75c8efb1.js";import{g as ga,__tla as ba}from"./index-c3596353.js";import{_ as ka,__tla as Ca}from"./ImportTable.vue_vue_type_script_setup_true_lang-8e5539dc.js";import{_ as va,__tla as xa}from"./PreviewCode.vue_vue_type_style_index_0_lang-e743bb8f.js";import{u as Na,__tla as Va}from"./useMessage-171aa63e.js";import{__tla as za}from"./index-cc63c3c4.js";import{__tla as Sa}from"./el-card-c558f0ec.js";import{__tla as Ta}from"./Dialog-c2716df6.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./tree-fd3a041e.js";import{__tla as Ua}from"./java-8a1b58d5.js";let H,Da=Promise.all([(()=>{try{return ia}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ua}catch{}})()]).then(async()=>{H=G({name:"InfraCodegen",__name:"index",setup(Ya){const h=Na(),{t:x}=Q(),{push:I}=j(),b=d(!0),N=d(0),V=d([]),o=E({pageNo:1,pageSize:10,tableName:void 0,tableComment:void 0,createTime:[]}),z=d(),S=d([]),y=async()=>{b.value=!0;try{const k=await ua(o);V.value=k.list,N.value=k.total}finally{b.value=!1}},w=()=>{o.pageNo=1,y()},M=()=>{z.value.resetFields(),w()},T=d(),U=d();return J(async()=>{await y(),S.value=await ga()}),(k,n)=>{const D=Z,g=$,R=aa,C=ea,c=ta,q=la,Y=ma,m=ra,K=oa,A=ca,f=L("hasPermi"),B=na;return s(),O(X,null,[a(Y,null,{default:t(()=>[a(q,{ref_key:"queryFormRef",ref:z,inline:!0,model:l(o),class:"-mb-15px","label-width":"68px"},{default:t(()=>[a(g,{label:"\u8868\u540D\u79F0",prop:"tableName"},{default:t(()=>[a(D,{modelValue:l(o).tableName,"onUpdate:modelValue":n[0]||(n[0]=e=>l(o).tableName=e),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8868\u540D\u79F0",onKeyup:P(w,["enter"])},null,8,["modelValue"])]),_:1}),a(g,{label:"\u8868\u63CF\u8FF0",prop:"tableComment"},{default:t(()=>[a(D,{modelValue:l(o).tableComment,"onUpdate:modelValue":n[1]||(n[1]=e=>l(o).tableComment=e),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8868\u63CF\u8FF0",onKeyup:P(w,["enter"])},null,8,["modelValue"])]),_:1}),a(g,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(R,{modelValue:l(o).createTime,"onUpdate:modelValue":n[2]||(n[2]=e=>l(o).createTime=e),"default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px","end-placeholder":"\u7ED3\u675F\u65E5\u671F","start-placeholder":"\u5F00\u59CB\u65E5\u671F",type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","default-time"])]),_:1}),a(g,null,{default:t(()=>[a(c,{onClick:w},{default:t(()=>[a(C,{class:"mr-5px",icon:"ep:search"}),i(" \u641C\u7D22 ")]),_:1}),a(c,{onClick:M},{default:t(()=>[a(C,{class:"mr-5px",icon:"ep:refresh"}),i(" \u91CD\u7F6E ")]),_:1}),p((s(),u(c,{type:"primary",onClick:n[3]||(n[3]=e=>{T.value.open()})},{default:t(()=>[a(C,{class:"mr-5px",icon:"ep:zoom-in"}),i(" \u5BFC\u5165 ")]),_:1})),[[f,["infra:codegen:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(Y,null,{default:t(()=>[p((s(),u(K,{data:l(V)},{default:t(()=>[a(m,{align:"center",label:"\u6570\u636E\u6E90"},{default:t(e=>{var _;return[i(W((_=l(S).find(r=>r.id===e.row.dataSourceConfigId))==null?void 0:_.name),1)]}),_:1}),a(m,{align:"center",label:"\u8868\u540D\u79F0",prop:"tableName",width:"200"}),a(m,{"show-overflow-tooltip":!0,align:"center",label:"\u8868\u63CF\u8FF0",prop:"tableComment",width:"200"}),a(m,{align:"center",label:"\u5B9E\u4F53",prop:"className",width:"200"}),a(m,{formatter:l(F),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),a(m,{formatter:l(F),align:"center",label:"\u66F4\u65B0\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),a(m,{align:"center",fixed:"right",label:"\u64CD\u4F5C",width:"300px"},{default:t(e=>[p((s(),u(c,{link:"",type:"primary",onClick:_=>{return r=e.row,void U.value.open(r.id);var r}},{default:t(()=>[i(" \u9884\u89C8 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:preview"]]]),p((s(),u(c,{link:"",type:"primary",onClick:_=>{return r=e.row.id,void I("/codegen/edit?id="+r);var r}},{default:t(()=>[i(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:update"]]]),p((s(),u(c,{link:"",type:"danger",onClick:_=>(async r=>{try{await h.delConfirm(),await fa(r),h.success(x("common.delSuccess")),await y()}catch{}})(e.row.id)},{default:t(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:delete"]]]),p((s(),u(c,{link:"",type:"primary",onClick:_=>(async r=>{const v=r.tableName;try{await h.confirm("\u786E\u8BA4\u8981\u5F3A\u5236\u540C\u6B65"+v+"\u8868\u7ED3\u6784\u5417?",x("common.reminder")),await ya(r.id),h.success("\u540C\u6B65\u6210\u529F")}catch{}})(e.row)},{default:t(()=>[i(" \u540C\u6B65 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:update"]]]),p((s(),u(c,{link:"",type:"primary",onClick:_=>(async r=>{const v=await ha(r.id);pa.zip(v,"codegen-"+r.className+".zip")})(e.row)},{default:t(()=>[i(" \u751F\u6210\u4EE3\u7801 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:download"]]])]),_:1})]),_:1},8,["data"])),[[B,l(b)]]),a(A,{limit:l(o).pageSize,"onUpdate:limit":n[4]||(n[4]=e=>l(o).pageSize=e),page:l(o).pageNo,"onUpdate:page":n[5]||(n[5]=e=>l(o).pageNo=e),total:l(N),onPagination:y},null,8,["limit","page","total"])]),_:1}),a(ka,{ref_key:"importRef",ref:T,onSuccess:y},null,512),a(va,{ref_key:"previewRef",ref:U},null,512)],64)}}})});export{Da as __tla,H as default};
|