From 1147ea5f8aba836dbde5969988fcb7db9c49fb11 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 30 Nov 2020 11:10:27 +0800
Subject: [PATCH] 设置用户头像悬停高度
---
ruoyi-ui/src/views/tool/gen/index.vue | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue
index 7f37f62..824148e 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("同步成功");
+ })
+ },
/** 打开导入表弹窗 */
openImportTable() {
this.$refs.import.show();
@@ -293,7 +313,7 @@
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
- }).catch(function() {});
+ })
}
}
};
--
Gitblit v1.9.2