From 298fabfdecca5dccd20129a59090003daa00f44d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 18 九月 2020 17:38:23 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue --- ruoyi-ui/src/views/tool/gen/index.vue | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index f003a35..7e95bfa 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -135,6 +135,13 @@ <el-button type="text" size="small" + icon="el-icon-refresh" + @click="handleSynchDb(scope.row)" + v-hasPermi="['tool:gen:edit']" + >鍚屾</el-button> + <el-button + type="text" + size="small" icon="el-icon-download" @click="handleGenTable(scope.row)" v-hasPermi="['tool:gen:code']" @@ -167,7 +174,7 @@ </template> <script> -import { listTable, previewTable, delTable, genCode } from "@/api/tool/gen"; +import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen"; import importTable from "./importTable"; import { downLoadZip } from "@/utils/zipdownload"; export default { @@ -252,6 +259,19 @@ downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); } }, + /** 鍚屾鏁版嵁搴撴搷浣� */ + handleSynchDb(row) { + const tableName = row.tableName; + this.$confirm('纭瑕佸己鍒跺悓姝�"' + tableName + '"琛ㄧ粨鏋勫悧锛�', "璀﹀憡", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning" + }).then(function() { + return synchDb(tableName); + }).then(() => { + this.msgSuccess("鍚屾鎴愬姛"); + }).catch(function() {}); + }, /** 鎵撳紑瀵煎叆琛ㄥ脊绐� */ openImportTable() { this.$refs.import.show(); -- Gitblit v1.9.3