From ded99502ae2d7824d9584b5c69f4dfcf7bdb6759 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期一, 27 九月 2021 10:38:29 +0800
Subject: [PATCH] 新增通用方法简化下载使用
---
ruoyi-ui/src/views/monitor/cache/index.vue | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/ruoyi-ui/src/views/monitor/cache/index.vue b/ruoyi-ui/src/views/monitor/cache/index.vue
index c78a220..36957ed 100644
--- a/ruoyi-ui/src/views/monitor/cache/index.vue
+++ b/ruoyi-ui/src/views/monitor/cache/index.vue
@@ -74,8 +74,6 @@
name: "Server",
data() {
return {
- // 鍔犺浇灞備俊鎭�
- loading: [],
// 缁熻鍛戒护淇℃伅
commandstats: null,
// 浣跨敤鍐呭瓨
@@ -93,7 +91,7 @@
getList() {
getCache().then((response) => {
this.cache = response.data;
- this.loading.close();
+ this.$modal.closeLoading();
this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
this.commandstats.setOption({
@@ -117,14 +115,16 @@
this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
this.usedmemory.setOption({
tooltip: {
- formatter: "{b} <br/>{a} : {c}M",
+ formatter: "{b} <br/>{a} : " + this.cache.info.used_memory_human,
},
series: [
{
name: "宄板��",
type: "gauge",
+ min: 0,
+ max: 1000,
detail: {
- formatter: "{value}M",
+ formatter: this.cache.info.used_memory_human,
},
data: [
{
@@ -139,12 +139,7 @@
},
// 鎵撳紑鍔犺浇灞�
openLoading() {
- this.loading = this.$loading({
- lock: true,
- text: "鎷煎懡璇诲彇涓�",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
+ this.$modal.loading("姝e湪鍔犺浇缂撳瓨鐩戞帶鏁版嵁锛岃绋嶅悗锛�");
},
},
};
--
Gitblit v1.9.3