From fb19dd3e4e7e99f3c11d91a35b5eccfb64bd4dc0 Mon Sep 17 00:00:00 2001 From: yongdaidai <7805924+yongdaidai@user.noreply.gitee.com> Date: 星期五, 31 七月 2020 14:59:23 +0800 Subject: [PATCH] update ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml. 解决如果导入多个同名部门dept_name,parent_id相同,但是删除状态(del_flag)不同,导致查询结果为多条,mybatis不能映射为一条数据的问题. --- ruoyi-ui/src/views/tool/gen/index.vue | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index f32c7d4..06306c2 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -166,7 +166,7 @@ </template> <script> -import { listTable, previewTable, delTable } from "@/api/tool/gen"; +import { listTable, previewTable, delTable, genCode } from "@/api/tool/gen"; import importTable from "./importTable"; import { downLoadZip } from "@/utils/zipdownload"; export default { @@ -241,7 +241,13 @@ this.msgError("请选择要生成的数据"); return; } - downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); + if(row.genType === "1") { + genCode(row.tableName).then(response => { + this.msgSuccess("成功生成到自定义路径:" + row.genPath); + }); + } else { + downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); + } }, /** 打开导入表弹窗 */ openImportTable() { @@ -270,7 +276,7 @@ /** 修改按钮操作 */ handleEditTable(row) { const tableId = row.tableId || this.ids[0]; - this.$router.push({ path: "/gen/edit", query: { tableId: tableId } }); + this.$router.push("/gen/edit/" + tableId); }, /** 删除按钮操作 */ handleDelete(row) { -- Gitblit v1.9.2