From 90063ad03c406c0cf88f5e6a1860bb43926bfddf Mon Sep 17 00:00:00 2001
From: 朱杰 <693337446@qq.com>
Date: 星期一, 31 五月 2021 17:37:34 +0800
Subject: [PATCH] update 修改框架中批量接口,改为原生mybatis执行foreach,改善性能
---
ruoyi-ui/src/views/system/config/index.vue | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue
index e26ed90..4d6f7ae 100644
--- a/ruoyi-ui/src/views/system/config/index.vue
+++ b/ruoyi-ui/src/views/system/config/index.vue
@@ -88,6 +88,7 @@
plain
icon="el-icon-download"
size="mini"
+ :loading="exportLoading"
@click="handleExport"
v-hasPermi="['system:config:export']"
>瀵煎嚭</el-button>
@@ -98,9 +99,9 @@
plain
icon="el-icon-refresh"
size="mini"
- @click="handleClearCache"
+ @click="handleRefreshCache"
v-hasPermi="['system:config:remove']"
- >娓呯悊缂撳瓨</el-button>
+ >鍒锋柊缂撳瓨</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -180,7 +181,7 @@
</template>
<script>
-import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, clearCache } from "@/api/system/config";
+import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, refreshCache } from "@/api/system/config";
export default {
name: "Config",
@@ -188,6 +189,8 @@
return {
// 閬僵灞�
loading: true,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -344,18 +347,20 @@
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
- }).then(function() {
+ }).then(() => {
+ this.exportLoading = true;
return exportConfig(queryParams);
}).then(response => {
this.download(response.msg);
+ this.exportLoading = false;
})
},
- /** 娓呯悊缂撳瓨鎸夐挳鎿嶄綔 */
- handleClearCache() {
- clearCache().then(response => {
- this.msgSuccess("娓呯悊鎴愬姛");
+ /** 鍒锋柊缂撳瓨鎸夐挳鎿嶄綔 */
+ handleRefreshCache() {
+ refreshCache().then(() => {
+ this.msgSuccess("鍒锋柊鎴愬姛");
});
}
}
};
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3