index-f9c79cea.js 6.0 KB

1
  1. import{d as J,B as L,u as X,r as d,f as A,z as E,S as G,o as s,c as O,i as a,w as t,a as l,T as R,m as i,D as p,j as u,t as Q,F as W,X as Z,I as $,p as aa,_ as ea,q as ta,J as la,K as ra,L as oa,M as na,__tla as ia}from"./index-1e808f2e.js";import{_ as ca,__tla as sa}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{_ as ma,__tla as _a}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{d as Y,__tla as da}from"./formatTime-a348c3be.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-b050c2e9.js";import{g as ga,__tla as ba}from"./index-68958c15.js";import{_ as ka,__tla as Ca}from"./ImportTable.vue_vue_type_script_setup_true_lang-a955945f.js";import{_ as va,__tla as xa}from"./PreviewCode.vue_vue_type_style_index_0_lang-24d2a416.js";import{u as Na,__tla as Va}from"./useMessage-5f9e8917.js";import{__tla as za}from"./index-73afebcf.js";import{__tla as Sa}from"./el-card-03b3588b.js";import{__tla as Ta}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./tree-fd3a041e.js";import{__tla as Da}from"./java-16bbac62.js";let F,Ua=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 Da}catch{}})()]).then(async()=>{F=J({name:"InfraCodegen",__name:"index",setup(Ka){const h=Na(),{t:x}=L(),{push:H}=X(),b=d(!0),N=d(0),V=d([]),o=A({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()},I=()=>{z.value.resetFields(),w()},T=d(),D=d();return E(async()=>{await y(),S.value=await ga()}),(k,n)=>{const U=Z,g=$,M=aa,C=ea,c=ta,P=la,K=ma,m=ra,q=oa,j=ca,f=G("hasPermi"),B=na;return s(),O(W,null,[a(K,null,{default:t(()=>[a(P,{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(U,{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:R(w,["enter"])},null,8,["modelValue"])]),_:1}),a(g,{label:"\u8868\u63CF\u8FF0",prop:"tableComment"},{default:t(()=>[a(U,{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:R(w,["enter"])},null,8,["modelValue"])]),_:1}),a(g,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(M,{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:I},{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(K,null,{default:t(()=>[p((s(),u(q,{data:l(V)},{default:t(()=>[a(m,{align:"center",label:"\u6570\u636E\u6E90"},{default:t(e=>{var _;return[i(Q((_=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(Y),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),a(m,{formatter:l(Y),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 D.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 H("/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(j,{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:D},null,512)],64)}}})});export{Ua as __tla,F as default};