From b368ad764f123ced6b48052c490decafe93e5402 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期四, 10 十二月 2020 12:08:18 +0800 Subject: [PATCH] 升级core-js到最新版本3.8.1 --- ruoyi-ui/src/views/tool/gen/index.vue | 35 ++++++++++++++++++++++++----------- 1 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index fcbbfe5..e720a08 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -76,14 +76,7 @@ v-hasPermi="['tool:gen:remove']" >鍒犻櫎</el-button> </el-col> - <div class="top-right-btn"> - <el-tooltip class="item" effect="dark" content="鍒锋柊" placement="top"> - <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> - </el-tooltip> - <el-tooltip class="item" effect="dark" :content="showSearch ? '闅愯棌鎼滅储' : '鏄剧ず鎼滅储'" placement="top"> - <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> - </el-tooltip> - </div> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> @@ -142,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']" @@ -159,7 +159,7 @@ <!-- 棰勮鐣岄潰 --> <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body> <el-tabs v-model="preview.activeName"> - <el-tab-pane + <el-tab-pane style="overflow-x: scroll;" v-for="(value, key) in preview.data" :label="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))" :name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))" @@ -174,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 { @@ -259,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("鍚屾鎴愬姛"); + }) + }, /** 鎵撳紑瀵煎叆琛ㄥ脊绐� */ openImportTable() { this.$refs.import.show(); @@ -300,7 +313,7 @@ }).then(() => { this.getList(); this.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(function() {}); + }) } } }; -- Gitblit v1.9.3