fix 修复 代码生成 编辑之后查两遍列表的问题
This commit is contained in:
parent
116a214ce6
commit
4075b838fc
@ -113,8 +113,8 @@
|
|||||||
</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(() => {
|
||||||
getList();
|
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();
|
||||||
|
}
|
||||||
getDataNameList();
|
getDataNameList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user