From 3ee85454a619cd69ddf1417fddb7bb05f994f119 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com>
Date: Fri, 2 Aug 2024 16:34:44 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=A1=E6=9D=83=E9=99=90=EF=BC=8C?=
=?UTF-8?q?=E7=BC=93=E5=AD=98=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/monitor/cache.ts | 31 ++++++
src/hooks/web/usePermission.ts | 9 ++
src/layout/components/Header/index.vue | 14 +--
src/views/monitor/caches/index.vue | 144 +++++++++++++++++++++++++
4 files changed, 191 insertions(+), 7 deletions(-)
create mode 100644 src/api/monitor/cache.ts
create mode 100644 src/views/monitor/caches/index.vue
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