| | |
| | | <script setup lang="ts"> |
| | | import { listDbTable, importTable, getDataNames } from '@/api/tool/gen'; |
| | | import { DbTableQuery, DbTableVO } from '@/api/tool/gen/types'; |
| | | import { ComponentInternalInstance } from 'vue'; |
| | | import { ElTable, ElForm } from 'element-plus'; |
| | | |
| | | const total = ref(0); |
| | | const visible = ref(false); |
| | |
| | | const dbTableList = ref<Array<DbTableVO>>([]); |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | | |
| | | const tableRef = ref(ElTable); |
| | | const queryFormRef = ref(ElForm); |
| | | const tableRef = ref<ElTableInstance>(); |
| | | const queryFormRef = ref<ElFormInstance>(); |
| | | |
| | | const queryParams = reactive<DbTableQuery>({ |
| | | pageNum: 1, |
| | |
| | | } |
| | | /** 单击选择行 */ |
| | | const clickRow = (row: DbTableVO) => { |
| | | tableRef.value.toggleRowSelection(row); |
| | | // ele bug |
| | | tableRef.value?.toggleRowSelection(row); |
| | | } |
| | | /** 多选框选中数据 */ |
| | | const handleSelectionChange = (selection: DbTableVO[]) => { |
| | |
| | | } |
| | | /** 重置按钮操作 */ |
| | | const resetQuery = () => { |
| | | queryFormRef.value.resetFields(); |
| | | queryFormRef.value?.resetFields(); |
| | | handleQuery(); |
| | | } |
| | | /** 导入按钮操作 */ |