|
|
|
@ -176,6 +176,7 @@ import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/
|
|
|
|
|
import router from "@/router";
|
|
|
|
|
import importTable from "./importTable";
|
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
const tableList = ref([]);
|
|
|
|
@ -187,6 +188,7 @@ const multiple = ref(true);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
const tableNames = ref([]);
|
|
|
|
|
const dateRange = ref([]);
|
|
|
|
|
const uniqueId = ref("");
|
|
|
|
|
|
|
|
|
|
const data = reactive({
|
|
|
|
|
queryParams: {
|
|
|
|
@ -205,6 +207,17 @@ const data = reactive({
|
|
|
|
|
|
|
|
|
|
const { queryParams, preview } = toRefs(data);
|
|
|
|
|
|
|
|
|
|
onActivated(() => {
|
|
|
|
|
const time = route.query.t;
|
|
|
|
|
if (time != null && time != uniqueId.value) {
|
|
|
|
|
uniqueId.value = time;
|
|
|
|
|
queryParams.value.pageNum = Number(route.query.pageNum);
|
|
|
|
|
dateRange.value = [];
|
|
|
|
|
proxy.resetForm("queryForm");
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/** 查询表集合 */
|
|
|
|
|
function getList() {
|
|
|
|
|
loading.value = true;
|
|
|
|
@ -271,7 +284,7 @@ function handleSelectionChange(selection) {
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
function handleEditTable(row) {
|
|
|
|
|
const tableId = row.tableId || ids.value[0];
|
|
|
|
|
router.push({ path: "/tool/gen-edit/index", query: { tableId: tableId, pageNum: queryParams.value.pageNum } });
|
|
|
|
|
router.push({ path: "/tool/gen-edit/index/" + tableId, query: { pageNum: queryParams.value.pageNum } });
|
|
|
|
|
}
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
function handleDelete(row) {
|
|
|
|
|