1 |
- import{d as J,h as X,u as A,r as _,e as B,q as E,M as L,o as s,c as O,f as e,w as t,a as l,N as F,y as i,z as p,x as u,t as Q,F as W,R as Z,C as $,D as ee,j as ae,G as te,H as le,I as re,J as oe,K as ne,_ as ie,__tla as ce}from"./index-8dc1e40a.js";import{_ as se,__tla as me}from"./index-64aeaa78.js";import{_ as de,__tla as _e}from"./ContentWrap-0aca5216.js";import{d as H,__tla as pe}from"./formatTime-8a155b2e.js";import{d as ue}from"./download-20922b56.js";import{d as fe,e as ye,s as we,f as he,__tla as ge}from"./index-15900a03.js";import{g as be,__tla as ke}from"./index-564b9bfc.js";import Ce,{__tla as ve}from"./ImportTable-9118a7ff.js";import xe,{__tla as Ne}from"./PreviewCode-b6d8a93e.js";import{u as Ve,__tla as ze}from"./useMessage-7a27dd80.js";import{__tla as Se}from"./index-803dbf9a.js";import{__tla as Te}from"./el-card-18df90f0.js";import{__tla as De}from"./Dialog-41802231.js";import"./tree-0af4953a.js";import{__tla as Ue}from"./java-caedb1fb.js";let K,Re=Promise.all([(()=>{try{return ce}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return ge}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()=>{K=ie(J({name:"InfraCodegen",__name:"index",setup(Fe){const w=Ve(),{t:x}=X(),{push:M}=A(),b=_(!0),N=_(0),V=_([]),o=B({pageNo:1,pageSize:10,tableName:void 0,tableComment:void 0,createTime:[]}),z=_(),S=_([]),y=async()=>{b.value=!0;try{const k=await fe(o);V.value=k.list,N.value=k.total}finally{b.value=!1}},h=()=>{o.pageNo=1,y()},Y=()=>{z.value.resetFields(),h()},T=_(),D=_();return E(async()=>{await y(),S.value=await be()}),(k,n)=>{const U=Z,g=$,I=ee,C=ae,c=te,P=le,R=de,m=re,q=oe,j=se,f=L("hasPermi"),G=ne;return s(),O(W,null,[e(R,null,{default:t(()=>[e(P,{ref_key:"queryFormRef",ref:z,inline:!0,model:l(o),class:"-mb-15px","label-width":"68px"},{default:t(()=>[e(g,{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:F(h,["enter"])},null,8,["modelValue"])]),_:1}),e(g,{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:F(h,["enter"])},null,8,["modelValue"])]),_:1}),e(g,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(I,{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(g,null,{default:t(()=>[e(c,{onClick:h},{default:t(()=>[e(C,{class:"mr-5px",icon:"ep:search"}),i(" \u641C\u7D22 ")]),_:1}),e(c,{onClick:Y},{default:t(()=>[e(C,{class:"mr-5px",icon:"ep:refresh"}),i(" \u91CD\u7F6E ")]),_:1}),p((s(),u(c,{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(R,null,{default:t(()=>[p((s(),u(q,{data:l(V)},{default:t(()=>[e(m,{align:"center",label:"\u6570\u636E\u6E90"},{default:t(a=>{var d;return[i(Q((d=l(S).find(r=>r.id===a.row.dataSourceConfigId))==null?void 0:d.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(H),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),e(m,{formatter:l(H),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((s(),u(c,{link:"",type:"primary",onClick:d=>{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((s(),u(c,{link:"",type:"primary",onClick:d=>{return r=a.row.id,void M("/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:d=>(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((s(),u(c,{link:"",type:"primary",onClick:d=>(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((s(),u(c,{link:"",type:"primary",onClick:d=>(async r=>{const v=await he(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"])),[[G,l(b)]]),e(j,{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","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/codegen/index.vue"]])});export{Re as __tla,K as default};
|