diff --git a/src/api/monitor/cache.ts b/src/api/monitor/cache.ts new file mode 100644 index 0000000..e061681 --- /dev/null +++ b/src/api/monitor/cache.ts @@ -0,0 +1,31 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 缓存名称列表 + */ +export function getCacheNames(params?) { + return http.request({ + url: '/cache/getNames', + method: 'GET', + 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 + }); +} \ No newline at end of file diff --git a/src/hooks/web/usePermission.ts b/src/hooks/web/usePermission.ts index 2692385..30a3085 100644 --- a/src/hooks/web/usePermission.ts +++ b/src/hooks/web/usePermission.ts @@ -9,6 +9,9 @@ export function usePermission() { */ function _somePermissions(accesses: string[]) { const permissionsList = userStore.getPermissions; + if(permissionsList[0]=='*:*:*') { + return true + } return accesses.some((item) => { return permissionsList.includes(item); }); @@ -29,6 +32,9 @@ export function usePermission() { */ function hasEveryPermission(accesses: string[]): boolean { const permissionsList = userStore.getPermissions; + if(permissionsList[0]=='*:*:*') { + return true + } if (Array.isArray(accesses)) { return accesses.every((access: any) => permissionsList.includes(access)); } @@ -42,6 +48,9 @@ export function usePermission() { */ function hasSomePermission(accesses: string[]): boolean { const permissionsList = userStore.getPermissions; + if(permissionsList[0]=='*:*:*') { + return true + } if (Array.isArray(accesses)) { return accesses.some((access: any) => permissionsList.includes(access)); } diff --git a/src/layout/components/Header/index.vue b/src/layout/components/Header/index.vue index 196d4cc..8e90897 100644 --- a/src/layout/components/Header/index.vue +++ b/src/layout/components/Header/index.vue @@ -365,13 +365,13 @@ click: () => openAppSearch(), }, }, - { - icon: GithubOutlined, - tips: 'github', - eventObject: { - click: () => window.open('https://github.com/jekip/naive-ui-admin'), - }, - }, + // { + // icon: GithubOutlined, + // tips: 'github', + // eventObject: { + // click: () => window.open('https://github.com/jekip/naive-ui-admin'), + // }, + // }, { icon: LockOutlined, tips: '锁屏', diff --git a/src/views/monitor/caches/index.vue b/src/views/monitor/caches/index.vue new file mode 100644 index 0000000..f5968ca --- /dev/null +++ b/src/views/monitor/caches/index.vue @@ -0,0 +1,144 @@ + + + + \ No newline at end of file