This commit is contained in:
陈红丽 2024-08-05 16:22:33 +08:00
parent ae62676c5e
commit cef8b4a5a1
3 changed files with 9 additions and 25 deletions

View File

@ -1,31 +1,12 @@
import { http } from '@/utils/http/axios'; import { http } from '@/utils/http/axios';
/** /**
* @description: * @description:
*/ */
export function getCacheNames(params?) { export function getCacheInfo(params?) {
return http.request({ return http.request({
url: '/cache/getNames', url: '/cache/info',
method: 'GET', method: 'GET',
params, params,
}); });
} }
/**
* @description: key列表
*/
export function getCacheKeys(cacheName) {
return http.request({
url: '/cache/getKeys/'+cacheName,
method: 'get',
});
}
/**
* @description: value列表
*/
export function getCacheValue(params?) {
return http.request({
url: '/cache/getValue',
method: 'get',
params
});
}

View File

@ -124,10 +124,14 @@ const handleDelete = async(row,type)=> {
await confirm('确定要删除?'); await confirm('确定要删除?');
if(type=='cacheName') { if(type=='cacheName') {
await deleteCacheName(row.cacheName) await deleteCacheName(row.cacheName)
message("删除成功");
loadCacheNames()
}else { }else {
await deleteCacheKey(row.cacheKey) await deleteCacheKey(row.cacheKey)
}
message("删除成功"); message("删除成功");
loadCachekeys()
}
} }
const clearAll = async()=> { const clearAll = async()=> {
await confirm('确定要清理全部?'); await confirm('确定要清理全部?');

View File

@ -76,7 +76,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted,ref,reactive } from 'vue'; import { onMounted,ref,reactive } from 'vue';
import { getServerInfo} from '@/api/monitor/server'; import { getServerInfo} from '@/api/monitor/server';
import { message, confirm } from "@/utils/auth";
const tabledata = ref([{}]) const tabledata = ref([{}])
const formData = reactive({ const formData = reactive({