index-0594f3f2.js 5.9 KB

1
  1. import{d as L,B as j,u as A,r as d,g as E,z as G,T as O,o as c,c as Q,i as e,w as t,a as l,U as I,l as i,D as p,k as u,t as W,F as X,Y as Z,I as $,q as ee,n as ae,s as te,J as le,K as re,L as oe,M as ne,_ as ie,__tla as se}from"./index-2f799233.js";import{_ as ce,__tla as me}from"./index-e6cd813f.js";import{_ as _e,__tla as de}from"./ContentWrap-9da801df.js";import{d as K,__tla as pe}from"./formatTime-2157894c.js";import{d as ue}from"./download-20922b56.js";import{d as fe,e as ye,s as we,f as ge,__tla as he}from"./index-67cad294.js";import{g as be,__tla as ke}from"./index-057d9f7f.js";import Ce,{__tla as ve}from"./ImportTable-a11850a2.js";import xe,{__tla as Ne}from"./PreviewCode-73df409f.js";import{u as Ve,__tla as ze}from"./useMessage-e567ad40.js";import{__tla as Se}from"./index-1c180a16.js";import{__tla as Te}from"./el-card-c64c83d1.js";import{__tla as De}from"./Dialog-6fd39e06.js";import"./tree-0af4953a.js";import{__tla as Ue}from"./java-8dc20ec9.js";let P,Ye=Promise.all([(()=>{try{return se}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Ue}catch{}})()]).then(async()=>{P=ie(L({name:"InfraCodegen",__name:"index",setup(Ie){const w=Ve(),{t:x}=j(),{push:F}=A(),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 fe(o);V.value=k.list,N.value=k.total}finally{b.value=!1}},g=()=>{o.pageNo=1,y()},M=()=>{z.value.resetFields(),g()},T=d(),D=d();return G(async()=>{await y(),S.value=await be()}),(k,n)=>{const U=Z,h=$,R=ee,C=ae,s=te,q=le,Y=_e,m=re,H=oe,B=ce,f=O("hasPermi"),J=ne;return c(),Q(X,null,[e(Y,null,{default:t(()=>[e(q,{ref_key:"queryFormRef",ref:z,inline:!0,model:l(o),class:"-mb-15px","label-width":"68px"},{default:t(()=>[e(h,{label:"\u8868\u540D\u79F0",prop:"tableName"},{default:t(()=>[e(U,{modelValue:l(o).tableName,"onUpdate:modelValue":n[0]||(n[0]=a=>l(o).tableName=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8868\u540D\u79F0",onKeyup:I(g,["enter"])},null,8,["modelValue"])]),_:1}),e(h,{label:"\u8868\u63CF\u8FF0",prop:"tableComment"},{default:t(()=>[e(U,{modelValue:l(o).tableComment,"onUpdate:modelValue":n[1]||(n[1]=a=>l(o).tableComment=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8868\u63CF\u8FF0",onKeyup:I(g,["enter"])},null,8,["modelValue"])]),_:1}),e(h,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(R,{modelValue:l(o).createTime,"onUpdate:modelValue":n[2]||(n[2]=a=>l(o).createTime=a),"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}),e(h,null,{default:t(()=>[e(s,{onClick:g},{default:t(()=>[e(C,{class:"mr-5px",icon:"ep:search"}),i(" \u641C\u7D22 ")]),_:1}),e(s,{onClick:M},{default:t(()=>[e(C,{class:"mr-5px",icon:"ep:refresh"}),i(" \u91CD\u7F6E ")]),_:1}),p((c(),u(s,{type:"primary",onClick:n[3]||(n[3]=a=>{T.value.open()})},{default:t(()=>[e(C,{class:"mr-5px",icon:"ep:zoom-in"}),i(" \u5BFC\u5165 ")]),_:1})),[[f,["infra:codegen:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(Y,null,{default:t(()=>[p((c(),u(H,{data:l(V)},{default:t(()=>[e(m,{align:"center",label:"\u6570\u636E\u6E90"},{default:t(a=>{var _;return[i(W((_=l(S).find(r=>r.id===a.row.dataSourceConfigId))==null?void 0:_.name),1)]}),_:1}),e(m,{align:"center",label:"\u8868\u540D\u79F0",prop:"tableName",width:"200"}),e(m,{"show-overflow-tooltip":!0,align:"center",label:"\u8868\u63CF\u8FF0",prop:"tableComment",width:"200"}),e(m,{align:"center",label:"\u5B9E\u4F53",prop:"className",width:"200"}),e(m,{formatter:l(K),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),e(m,{formatter:l(K),align:"center",label:"\u66F4\u65B0\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),e(m,{align:"center",fixed:"right",label:"\u64CD\u4F5C",width:"300px"},{default:t(a=>[p((c(),u(s,{link:"",type:"primary",onClick:_=>{return r=a.row,void D.value.open(r.id);var r}},{default:t(()=>[i(" \u9884\u89C8 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:preview"]]]),p((c(),u(s,{link:"",type:"primary",onClick:_=>{return r=a.row.id,void F("/codegen/edit?id="+r);var r}},{default:t(()=>[i(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:update"]]]),p((c(),u(s,{link:"",type:"danger",onClick:_=>(async r=>{try{await w.delConfirm(),await ye(r),w.success(x("common.delSuccess")),await y()}catch{}})(a.row.id)},{default:t(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:delete"]]]),p((c(),u(s,{link:"",type:"primary",onClick:_=>(async r=>{const v=r.tableName;try{await w.confirm("\u786E\u8BA4\u8981\u5F3A\u5236\u540C\u6B65"+v+"\u8868\u7ED3\u6784\u5417?",x("common.reminder")),await we(r.id),w.success("\u540C\u6B65\u6210\u529F")}catch{}})(a.row)},{default:t(()=>[i(" \u540C\u6B65 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:update"]]]),p((c(),u(s,{link:"",type:"primary",onClick:_=>(async r=>{const v=await ge(r.id);ue.zip(v,"codegen-"+r.className+".zip")})(a.row)},{default:t(()=>[i(" \u751F\u6210\u4EE3\u7801 ")]),_:2},1032,["onClick"])),[[f,["infra:codegen:download"]]])]),_:1})]),_:1},8,["data"])),[[J,l(b)]]),e(B,{limit:l(o).pageSize,"onUpdate:limit":n[4]||(n[4]=a=>l(o).pageSize=a),page:l(o).pageNo,"onUpdate:page":n[5]||(n[5]=a=>l(o).pageNo=a),total:l(N),onPagination:y},null,8,["limit","page","total"])]),_:1}),e(Ce,{ref_key:"importRef",ref:T,onSuccess:y},null,512),e(xe,{ref_key:"previewRef",ref:D},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/infra/codegen/index.vue"]])});export{Ye as __tla,P as default};