From fe030cc02248f2a0481d09182e2e9c94b9bbd77f Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期一, 27 七月 2020 16:55:51 +0800 Subject: [PATCH] 修改 node-sass 为 dart-sass --- ruoyi-ui/src/views/tool/gen/index.vue | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index ad7d3d8..06306c2 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -80,7 +80,11 @@ <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"></el-table-column> - <el-table-column label="序号" align="center" prop="tableId" width="60px" /> + <el-table-column label="序号" type="index" width="50" align="center"> + <template slot-scope="scope"> + <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span> + </template> + </el-table-column> <el-table-column label="表名称" align="center" @@ -162,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 { @@ -237,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() { @@ -266,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