代码生成编辑修改后同步列表显示

master
RuoYi 3 years ago
parent bd3b20e8ad
commit 6d63e64505
  1. 2
      src/router/index.js
  2. 2
      src/views/tool/gen/editTable.vue
  3. 15
      src/views/tool/gen/index.vue

@ -139,7 +139,7 @@ export const constantRoutes = [
hidden: true,
children: [
{
path: 'index',
path: 'index/:tableId(\\d+)',
component: () => import('@/views/tool/gen/editTable'),
name: 'GenEdit',
meta: { title: '修改生成配置', activeMenu: '/tool/gen' }

@ -181,7 +181,7 @@ function close() {
}
(() => {
const tableId = route.query && route.query.tableId;
const tableId = route.params && route.params.tableId;
if (tableId) {
//
getGenTable(tableId).then(res => {

@ -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) {

Loading…
Cancel
Save