table_data-cf504062.js 3.0 KB

123456789
  1. /**
  2. * 由 Fantastic-admin 提供技术支持
  3. * Powered by Fantastic-admin
  4. * Gitee https://gitee.com/hooray/fantastic-admin
  5. * Github https://github.com/hooray/fantastic-admin
  6. */
  7. import{_ as T}from"./index-ce0821b6.js";import{_ as V}from"./index.vue_vue_type_script_setup_true_name_SvgIcon_lang-9ad2d3e0.js";import{g as D,a as u}from"./dbApi-9cb5be90.js";import{j as g,J as P,o as z,a3 as s,k as p,l as f,E as e,y as o,u as r,m as c,x as E,B as b,D as M,C as S}from"./runtime-core.esm-bundler-5fc1c360.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./runtime-dom.esm-bundler-e65f1c43.js";import"./iconify-3d8b277a.js";import"./menu-2c9c5182.js";import"./settings-be8974ad.js";import"./pinia-7162f4ce.js";import"./_MapCache-1b613190.js";import"./vue-router-8a13d09b.js";import"./index-5cddd228.js";import"./index-c228ae8f.js";import"./iframe-10768394.js";const q={class:"page-main"},F={key:0},I={class:"custom-tree-node"},J=["title"],U={class:"text"},$={class:"container"},A=g({name:"table_data"}),G=g({...A,setup(H,{expose:h}){const l=P({layoutMode:"table",sqlStatement:"",treeData:[],dataList:[],curPage:1}),y=async(t="")=>{const n=await u(t);l.dataList=n.data};function x(t){t.isLeaf&&y(t.label)}const d=async()=>{const{data:t}=await D(),n=[];if(t.forEach(i=>{n.push({isLeaf:!0,label:i})}),l.treeData=[{label:"数据库表",isLeaf:!1,children:n}],t&&t.length>0){const i=await u(t[0]);l.dataList=i.data}};return z(()=>{d()}),h({init:d}),(t,n)=>{const i=V,v=s("el-icon"),k=s("el-tree"),L=s("el-scrollbar"),a=s("el-table-column"),C=s("el-button"),N=s("el-table"),w=s("el-pagination"),B=T;return p(),f("div",q,[e(B,{"left-side-width":"300px","hide-left-side-toggle":""},{leftSide:o(()=>[e(L,{class:"tree"},{default:o(()=>[r(l).layoutMode!=="sql"?(p(),f("div",F,[e(k,{data:r(l).treeData,"default-expand-all":"","highlight-current":"",onNodeClick:x},{default:o(({node:_,data:m})=>[c("div",I,[c("div",{class:"label",title:_.label},[m.isLeaf?(p(),E(v,{key:0,size:"16px",style:{"margin-right":"5px"}},{default:o(()=>[e(i,{name:"ep:tickets"})]),_:1})):b("",!0),c("div",U,M(m.label),1)],8,J)])]),_:1},8,["data"])])):b("",!0)]),_:1})]),default:o(()=>[c("div",$,[e(N,{ref:"table",class:"list-table",data:r(l).dataList,border:"",stripe:"","highlight-current-row":""},{default:o(()=>[e(a,{prop:"comment",label:"comment"}),e(a,{prop:"defaultValue",label:"defaultValue"}),e(a,{prop:"extra",label:"extra"}),e(a,{prop:"fieldName",label:"fieldName"}),e(a,{prop:"accident_cat_id",label:"accident_cat_id"}),e(a,{prop:"fieldType",label:"fieldType"}),e(a,{prop:"key",label:"key"}),e(a,{prop:"nullable",label:"nullable"}),e(a,{label:"操作",width:"200",align:"center"},{default:o(()=>[e(C,{type:"danger",size:"small",plain:""},{default:o(()=>[S(" 删除 ")]),_:1})]),_:1})]),_:1},8,["data"]),e(w,{"current-page":r(l).curPage,"onUpdate:currentPage":n[0]||(n[0]=_=>r(l).curPage=_),total:100,layout:"total, sizes, ->, prev, pager, next, jumper",style:{padding:"10px 0"}},null,8,["current-page"])])]),_:1})])}}});const ie=j(G,[["__scopeId","data-v-b0902201"]]);export{ie as default};