|
35 | 35 | </div> |
36 | 36 | <div class="connection-status" :class="`${getStatus(ds.status)}`">{{ ds.status }}</div> |
37 | 37 | <div class="connection-actions"> |
38 | | - <el-button class="action-btn" @click="getTables(ds.id)">Info</el-button> |
| 38 | + <el-button class="action-btn" circle @click="getTables(ds.id)" :icon="List" /> |
39 | 39 | <el-button type="primary" class="action-btn" circle @click="editDs(ds)" :icon="IconOpeEdit"/> |
40 | 40 | <el-button type="danger" class="action-btn" circle @click="deleteDs(ds)" :icon="IconOpeDelete"/> |
41 | 41 | </div> |
42 | 42 | </div> |
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | <DsForm ref="dsForm" @refresh="refresh"/> |
| 46 | + <TableList ref="tableList" /> |
46 | 47 | </template> |
47 | 48 | <script lang="ts" setup> |
48 | 49 | import IconOpeAdd from '@/assets/svg/operate/ope-add.svg' |
49 | 50 | import IconOpeEdit from '@/assets/svg/operate/ope-edit.svg' |
50 | 51 | import IconOpeDelete from '@/assets/svg/operate/ope-delete.svg' |
51 | | -import { Search } from '@element-plus/icons-vue' |
| 52 | +import { Search, List } from '@element-plus/icons-vue' |
52 | 53 | import { ref, onMounted } from 'vue' |
53 | 54 | import DsForm from './form.vue' |
54 | 55 | import { datasourceApi } from '@/api/datasource' |
55 | 56 | import { datetimeFormat } from '@/utils/utils' |
56 | 57 | import { ElMessageBox } from 'element-plus' |
| 58 | +import TableList from './TableList.vue' |
57 | 59 |
|
58 | 60 | const searchValue = ref<string>('') |
59 | 61 | const dsForm = ref() |
| 62 | +const tableList = ref() |
60 | 63 | const dsList = ref<any>([])// show ds list |
61 | 64 | const allDsList = ref<any>([])// all ds list |
62 | 65 |
|
@@ -124,9 +127,10 @@ const getTables = (id: Number) => { |
124 | 127 | // console.log(res) |
125 | 128 | // }) |
126 | 129 |
|
127 | | - datasourceApi.execSql(id,'select id,name,table_name from core_dataset_table limit 10').then((res) => { |
128 | | - console.log(res) |
129 | | - }) |
| 130 | + // datasourceApi.execSql(id,'select id,name,table_name from core_dataset_table limit 10').then((res) => { |
| 131 | + // console.log(res) |
| 132 | + // }) |
| 133 | + tableList.value.open(id) |
130 | 134 | } |
131 | 135 |
|
132 | 136 | onMounted(() => { |
|
0 commit comments