|
@@ -15,16 +15,13 @@
|
|
<el-table
|
|
<el-table
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:data="cacheNames"
|
|
:data="cacheNames"
|
|
|
|
+ border
|
|
:height="tableHeight"
|
|
:height="tableHeight"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
@row-click="getCacheKeys"
|
|
@row-click="getCacheKeys"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
- <el-table-column
|
|
|
|
- label="序号"
|
|
|
|
- width="60"
|
|
|
|
- type="index"
|
|
|
|
- ></el-table-column>
|
|
|
|
|
|
+ <el-table-column label="序号" width="60" type="index"></el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
label="缓存名称"
|
|
label="缓存名称"
|
|
@@ -73,16 +70,13 @@
|
|
<el-table
|
|
<el-table
|
|
v-loading="subLoading"
|
|
v-loading="subLoading"
|
|
:data="cacheKeys"
|
|
:data="cacheKeys"
|
|
|
|
+ border
|
|
:height="tableHeight"
|
|
:height="tableHeight"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
@row-click="handleCacheValue"
|
|
@row-click="handleCacheValue"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
- <el-table-column
|
|
|
|
- label="序号"
|
|
|
|
- width="60"
|
|
|
|
- type="index"
|
|
|
|
- ></el-table-column>
|
|
|
|
|
|
+ <el-table-column label="序号" width="60" type="index"></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="缓存键名"
|
|
label="缓存键名"
|
|
align="center"
|
|
align="center"
|
|
@@ -152,7 +146,14 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache";
|
|
|
|
|
|
+import {
|
|
|
|
+ listCacheName,
|
|
|
|
+ listCacheKey,
|
|
|
|
+ getCacheValue,
|
|
|
|
+ clearCacheName,
|
|
|
|
+ clearCacheKey,
|
|
|
|
+ clearCacheAll,
|
|
|
|
+} from "@/api/monitor/cache";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "CacheList",
|
|
name: "CacheList",
|
|
@@ -164,7 +165,7 @@ export default {
|
|
loading: true,
|
|
loading: true,
|
|
subLoading: false,
|
|
subLoading: false,
|
|
nowCacheName: "",
|
|
nowCacheName: "",
|
|
- tableHeight: window.innerHeight - 200
|
|
|
|
|
|
+ tableHeight: window.innerHeight - 200,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -174,7 +175,7 @@ export default {
|
|
/** 查询缓存名称列表 */
|
|
/** 查询缓存名称列表 */
|
|
getCacheNames() {
|
|
getCacheNames() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listCacheName().then(response => {
|
|
|
|
|
|
+ listCacheName().then((response) => {
|
|
this.cacheNames = response.data;
|
|
this.cacheNames = response.data;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
@@ -186,7 +187,7 @@ export default {
|
|
},
|
|
},
|
|
/** 清理指定名称缓存 */
|
|
/** 清理指定名称缓存 */
|
|
handleClearCacheName(row) {
|
|
handleClearCacheName(row) {
|
|
- clearCacheName(row.cacheName).then(response => {
|
|
|
|
|
|
+ clearCacheName(row.cacheName).then((response) => {
|
|
this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
|
|
this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
|
|
this.getCacheKeys();
|
|
this.getCacheKeys();
|
|
});
|
|
});
|
|
@@ -198,7 +199,7 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.subLoading = true;
|
|
this.subLoading = true;
|
|
- listCacheKey(cacheName).then(response => {
|
|
|
|
|
|
+ listCacheKey(cacheName).then((response) => {
|
|
this.cacheKeys = response.data;
|
|
this.cacheKeys = response.data;
|
|
this.subLoading = false;
|
|
this.subLoading = false;
|
|
this.nowCacheName = cacheName;
|
|
this.nowCacheName = cacheName;
|
|
@@ -211,7 +212,7 @@ export default {
|
|
},
|
|
},
|
|
/** 清理指定键名缓存 */
|
|
/** 清理指定键名缓存 */
|
|
handleClearCacheKey(cacheKey) {
|
|
handleClearCacheKey(cacheKey) {
|
|
- clearCacheKey(cacheKey).then(response => {
|
|
|
|
|
|
+ clearCacheKey(cacheKey).then((response) => {
|
|
this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功");
|
|
this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功");
|
|
this.getCacheKeys();
|
|
this.getCacheKeys();
|
|
});
|
|
});
|
|
@@ -226,16 +227,16 @@ export default {
|
|
},
|
|
},
|
|
/** 查询缓存内容详细 */
|
|
/** 查询缓存内容详细 */
|
|
handleCacheValue(cacheKey) {
|
|
handleCacheValue(cacheKey) {
|
|
- getCacheValue(this.nowCacheName, cacheKey).then(response => {
|
|
|
|
|
|
+ getCacheValue(this.nowCacheName, cacheKey).then((response) => {
|
|
this.cacheForm = response.data;
|
|
this.cacheForm = response.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 清理全部缓存 */
|
|
/** 清理全部缓存 */
|
|
handleClearCacheAll() {
|
|
handleClearCacheAll() {
|
|
- clearCacheAll().then(response => {
|
|
|
|
|
|
+ clearCacheAll().then((response) => {
|
|
this.$modal.msgSuccess("清理全部缓存成功");
|
|
this.$modal.msgSuccess("清理全部缓存成功");
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|