|
|
|
@ -113,7 +113,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup name="Gen" lang="ts">
|
|
|
|
<script setup name="Gen" lang="ts">
|
|
|
|
import { listTable, previewTable, delTable, genCode, synchDb, getDataNames } from '@/api/tool/gen';
|
|
|
|
import {delTable, genCode, getDataNames, listTable, previewTable, synchDb} from '@/api/tool/gen';
|
|
|
|
import {TableQuery, TableVO} from '@/api/tool/gen/types';
|
|
|
|
import {TableQuery, TableVO} from '@/api/tool/gen/types';
|
|
|
|
import router from '@/router';
|
|
|
|
import router from '@/router';
|
|
|
|
import ImportTable from './importTable.vue';
|
|
|
|
import ImportTable from './importTable.vue';
|
|
|
|
@ -155,17 +155,6 @@ const dialog = reactive<DialogOption>({
|
|
|
|
title: '代码预览'
|
|
|
|
title: '代码预览'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
onActivated(() => {
|
|
|
|
|
|
|
|
const time = route.query.t;
|
|
|
|
|
|
|
|
if (time != null && time != uniqueId.value) {
|
|
|
|
|
|
|
|
uniqueId.value = time as string;
|
|
|
|
|
|
|
|
queryParams.value.pageNum = Number(route.query.pageNum);
|
|
|
|
|
|
|
|
dateRange.value = ['', ''];
|
|
|
|
|
|
|
|
queryFormRef.value?.resetFields();
|
|
|
|
|
|
|
|
getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询多数据源名称 */
|
|
|
|
/** 查询多数据源名称 */
|
|
|
|
const getDataNameList = async () => {
|
|
|
|
const getDataNameList = async () => {
|
|
|
|
const res = await getDataNames();
|
|
|
|
const res = await getDataNames();
|
|
|
|
@ -248,7 +237,14 @@ const handleDelete = async (row?: TableVO) => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
const time = route.query.t;
|
|
|
|
|
|
|
|
if (time != null && time != uniqueId.value) {
|
|
|
|
|
|
|
|
uniqueId.value = time as string;
|
|
|
|
|
|
|
|
queryParams.value.pageNum = Number(route.query.pageNum);
|
|
|
|
|
|
|
|
dateRange.value = ['', ''];
|
|
|
|
|
|
|
|
queryFormRef.value?.resetFields();
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
getDataNameList();
|
|
|
|
getDataNameList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|