index-6c3166ee.js 6.1 KB

1
  1. import{d as B,h as G,u as Q,r as d,e as W,l as X,Q as E,o as s,c as J,f as a,w as t,a as l,R as H,n as i,x as p,v as u,t as L,F as O,V as Z,A as $,B as aa,j as ea,C as ta,D as la,G as ra,H as oa,I as na,_ as ia,__tla as ca}from"./index-11e4820e.js";import{_ as sa,__tla as ma}from"./index-c8f58bd0.js";import{_ as _a,__tla as da}from"./ContentWrap-694014d4.js";import{d as P,__tla as pa}from"./formatTime-f6a2c881.js";import{d as ua}from"./download-20922b56.js";import{d as fa,e as ya,s as ha,f as wa,__tla as ga}from"./index-fc625b9f.js";import{g as ba,__tla as ka}from"./index-6665ad87.js";import Ca,{__tla as va}from"./ImportTable-a7158ec9.js";import xa,{__tla as Na}from"./PreviewCode-bdfcce96.js";import{u as Va,__tla as za}from"./useMessage-06ddf735.js";import{__tla as Sa}from"./index-dd73c59d.js";import{__tla as Da}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as Ta}from"./el-card-919c14be.js";import{__tla as Ua}from"./Dialog-bbfaf85c.js";import"./tree-0af4953a.js";import{__tla as Ra}from"./java-daf83ac3.js";let Y,Ha=Promise.all([(()=>{try{return ca}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ra}catch{}})()]).then(async()=>{Y=ia(B({name:"InfraCodegen",__name:"index",setup(Pa){const h=Va(),{t:x}=G(),{push:F}=Q(),b=d(!0),N=d(0),V=d([]),o=W({pageNo:1,pageSize:10,tableName:void 0,tableComment:void 0,createTime:[]}),z=d(),S=d([]),y=async()=>{b.value=!0;try{const k=await fa(o);V.value=k.list,N.value=k.total}finally{b.value=!1}},w=()=>{o.pageNo=1,y()},I=()=>{z.value.resetFields(),w()},D=d(),T=d();return X(async()=>{await y(),S.value=await ba()}),(k,n)=>{const U=Z,g=$,M=aa,C=ea,c=ta,K=la,R=_a,m=ra,j=oa,q=sa,f=E("hasPermi"),A=na;return s(),J(O,null,[a(R,null,{default:t(()=>[a(K,{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:H(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:H(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=>{D.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(R,null,{default:t(()=>[p((s(),u(j,{data:l(V)},{default:t(()=>[a(m,{align:"center",label:"\u6570\u636E\u6E90"},{default:t(e=>{var _;return[i(L((_=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(P),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),a(m,{formatter:l(P),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 T.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 F("/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 ya(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 ha(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 wa(r.id);ua.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"])),[[A,l(b)]]),a(q,{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(Ca,{ref_key:"importRef",ref:D,onSuccess:y},null,512),a(xa,{ref_key:"previewRef",ref:T},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/codegen/index.vue"]])});export{Ha as __tla,Y as default};