var M=(t,l,i)=>new Promise((c,s)=>{var d=e=>{try{r(i.next(e))}catch(n){s(n)}},u=e=>{try{r(i.throw(e))}catch(n){s(n)}},r=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,u);r((i=i.apply(t,l)).next())});import{B as R}from"./TableImg.2aabef6a.js";import{j as L}from"./BasicForm.d11b68fd.js";import{u as N}from"./useTable.13a8b0ff.js";import{aP as k,a as I,aD as w,aQ as p,o as C,h as f,j as m,p as E,t as D,aS as O,q as y,x as v}from"./index.0d073eaa.js";import{T as B}from"./table.0ba2e59f.js";import{b as g}from"./index.c05f9254.js";import S from"./Modify.25b171a1.js";import h from"./CreateMenu.9f2036a2.js";import{g as x,b as $}from"./common.f56e6fca.js";import"./index.965098be.js";import"./Checkbox.476f6e92.js";import"./index.1491cab6.js";import"./index.e8b360cf.js";import"./eagerComputed.156e81ff.js";import"./useForm.868c8e81.js";import"./index.566277e5.js";import"./index.e9a84cba.js";import"./index.0972fd96.js";import"./useSize.bb4e5ce5.js";import"./useWindowSizeFn.ef20ece8.js";import"./useContentViewHeight.01b9d1c6.js";import"./ArrowLeftOutlined.90d2e05e.js";import"./index.8680e4c4.js";import"./transButton.8c1b1a4f.js";import"./index.7075e2b7.js";import"./index.04f7e044.js";import"./index.e317a008.js";import"./uuid.2b29000c.js";import"./index.2b5ea4f6.js";import"./_baseIteratee.3919e7cf.js";import"./get.49a42f2e.js";import"./DeleteOutlined.247d1f35.js";import"./index.a8c197b8.js";import"./useRefs.e81831e2.js";import"./Form.48352728.js";import"./Col.a2eadc78.js";import"./useFlexGapSupport.474c31b7.js";import"./index.0fb15725.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.32117fb5.js";import"./FullscreenOutlined.401a7bcd.js";import"./index.dd1f987c.js";import"./fromPairs.84aabb58.js";import"./scrollTo.f8a2fd00.js";import"./index.2ed1a060.js";/* empty css              *//* empty css              */import"./index.e8daa066.js";import"./index.81899e8a.js";import"./index.ffb8ac7d.js";import"./download.bb4c9304.js";import"./base64Conver.08b9f4ec.js";import"./index.31930d74.js";import"./index.1d29734e.js";import"./uniqBy.ac0f9c38.js";import"./index.abdcab42.js";import"./index.aa6b7013.js";import"./index.78efd931.js";import"./PlusOutlined.64d8e001.js";import"./tableData.d0a972e1.js";const W=[{title:"\u8868\u540D",dataIndex:"TABLE_NAME",sorter:!0},{title:"\u8BB0\u5F55\u6570",dataIndex:"TABLE_ROWS",sorter:!0},{title:"\u5907\u6CE8",dataIndex:"TABLE_COMMENT",sorter:!0},{title:"\u5F15\u64CE",dataIndex:"ENGINE",sorter:!0},{title:"\u5B57\u7B26\u96C6",sorter:!0,dataIndex:"TABLE_COLLATION"},{title:"\u521B\u5EFA\u65F6\u95F4",sorter:!0,dataIndex:"CREATE_TIME"}],H=I({components:{Modal:S,BasicTable:R,TableAction:L,ModalCreateMenu:h},setup(){const[t,{openModal:l}]=g(),[i,{openModal:c}]=g(),{createMessage:s}=v(),{success:d}=s,u=w(),[r,{reload:e}]=N({title:"\u6240\u6709\u8868",api:x(B.SHOW),columns:W,bordered:!0,actionColumn:{width:250,title:"Action",dataIndex:"action",slots:{customRender:"action"}}});function n(){l(!0,{table:""})}function T(){e()}function a(o){l(!0,{table:o.TABLE_NAME})}function b(o){return M(this,null,function*(){yield $(B.DROP,{table:o.TABLE_NAME}),d("\u5220\u9664\u6210\u529F"),e()})}function _(o){return M(this,null,function*(){c(!0,{table:o.TABLE_NAME})})}function A(o){console.log("\u70B9\u51FB\u4E86\u542F\u7528",o)}function F(o){u(`/database/table/view/${o}`)}return{registerTable:r,handleEdit:a,handleDelete:b,handleOpen:A,view:F,openTableModal:n,register:t,createMenuRegister:i,reloadTables:T,handleCreateMenu:_,ModalCreateMenu:h}}}),P={class:"p-4"},V=y(" \u521B\u5EFA\u8868\u683C "),j=["onClick"];function G(t,l,i,c,s,d){const u=p("a-button"),r=p("TableAction"),e=p("BasicTable"),n=p("Modal"),T=p("ModalCreateMenu");return C(),f("div",P,[m(e,{onRegister:t.registerTable,showTableSetting:""},{toolbar:E(()=>[m(u,{type:"primary",onClick:t.openTableModal},{default:E(()=>[V]),_:1},8,["onClick"])]),bodyCell:E(({column:a,record:b,text:_})=>[a.key==="TABLE_ROWS"?(C(),f("a",{key:0,onClick:A=>t.view(b.TABLE_NAME)},D(b.TABLE_ROWS),9,j)):O("",!0)]),action:E(({record:a})=>[m(r,{actions:[{label:"\u7F16\u8F91",onClick:t.handleEdit.bind(null,a)},{label:"\u5220\u9664",icon:"ic:outline-delete-outline",popConfirm:{title:"\u662F\u5426\u5220\u9664\uFF1F",confirm:t.handleDelete.bind(null,a)}}],dropDownActions:[{label:"\u4E00\u952E\u83DC\u5355",onClick:t.handleCreateMenu.bind(null,a)}]},null,8,["actions","dropDownActions"])]),_:1},8,["onRegister"]),m(n,{onRegister:t.register,defaultFullscreen:!0,minHeight:100,onReload:t.reloadTables},null,8,["onRegister","onReload"]),m(T,{onRegister:t.createMenuRegister,minHeight:300},null,8,["onRegister"])])}var Yt=k(H,[["render",G]]);export{Yt as default};
