index-71e6b7f5.js 5.9 KB

1
  1. import{d as J,n as L,u as Q,r as _,f as X,B as A,P as E,o as s,c as G,i as e,w as t,a as l,Q as F,j as i,C as p,l as u,t as O,F as W,U as Z,H as $,I as ee,v as ae,J as te,K as le,L as re,M as oe,N as ne,_ as ie,__tla as ce}from"./index-af173888.js";import{_ as se,__tla as me}from"./index-a33d7937.js";import{_ as de,__tla as _e}from"./ContentWrap-b959c1be.js";import{d as H,__tla as pe}from"./formatTime-8a6f6c49.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-d4091e8f.js";import{g as be,__tla as ke}from"./index-4c2d79b3.js";import Ce,{__tla as ve}from"./ImportTable-376a3deb.js";import xe,{__tla as Ne}from"./PreviewCode-b450e7c5.js";import{u as Ve,__tla as ze}from"./useMessage-170c1b43.js";import{__tla as Se}from"./index-54b8f773.js";import{__tla as Ue}from"./el-card-178b9654.js";import{__tla as Te}from"./Dialog-987c90a1.js";import"./tree-02f455f9.js";import{__tla as De}from"./java-71da4e9e.js";let K,Pe=Promise.all([(()=>{try{return ce}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return _e}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 Ue}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return De}catch{}})()]).then(async()=>{K=ie(J({name:"InfraCodegen",__name:"index",setup(Fe){const w=Ve(),{t:x}=L(),{push:R}=Q(),b=_(!0),N=_(0),V=_([]),o=X({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}},g=()=>{o.pageNo=1,y()},Y=()=>{z.value.resetFields(),g()},U=_(),T=_();return A(async()=>{await y(),S.value=await be()}),(k,n)=>{const D=Z,h=$,I=ee,C=ae,c=te,M=le,P=de,m=re,j=oe,q=se,f=E("hasPermi"),B=ne;return s(),G(W,null,[e(P,null,{default:t(()=>[e(M,{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(D,{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(g,["enter"])},null,8,["modelValue"])]),_:1}),e(h,{label:"\u8868\u63CF\u8FF0",prop:"tableComment"},{default:t(()=>[e(D,{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(g,["enter"])},null,8,["modelValue"])]),_:1}),e(h,{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(h,null,{default:t(()=>[e(c,{onClick:g},{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=>{U.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(P,null,{default:t(()=>[p((s(),u(j,{data:l(V)},{default:t(()=>[e(m,{align:"center",label:"\u6570\u636E\u6E90"},{default:t(a=>{var d;return[i(O((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 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:d=>{return r=a.row.id,void R("/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 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"])),[[B,l(b)]]),e(q,{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:U,onSuccess:y},null,512),e(xe,{ref_key:"previewRef",ref:T},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/codegen/index.vue"]])});export{Pe as __tla,K as default};