From a7e6761ba0cfccdf33ed552eb2d3b783c8e4ab4a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 16 Apr 2025 20:49:12 +0800
Subject: [PATCH] feat:事件弹窗显示调整
---
src/layout/Header.vue | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/layout/Header.vue b/src/layout/Header.vue
index 43ba79e..3e67c19 100644
--- a/src/layout/Header.vue
+++ b/src/layout/Header.vue
@@ -31,6 +31,7 @@
import { useRouter, useRoute } from 'vue-router';
import { Message } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
+import { ELocalStorageKey } from '@/utils/http/enums';
const router = useRouter();
const route = useRoute();
@@ -50,17 +51,20 @@
]);
const handleClick = ({ path, name }) => {
- if (!['首页', '任务管理'].includes(name)) return ElMessage.warning('正在开发中');
+ if (['系统运维'].includes(name)) {
+ window.open(import.meta.env.VITE_APP_ADMIN_URL + '?token=' + localStorage.getItem(ELocalStorageKey.Token), '_blank');
+ return;
+ }
+ if (!['首页', '任务管理'].includes(name)) return ElMessage.warning('正在加急开发中...');
// 更新 leftList 的 active 状态
leftList.value.forEach(item => {
- item.active = item.router === path;
+ item.active = item.path === path;
});
// 更新 rightList 的 active 状态
rightList.value.forEach(item => {
- item.active = item.router === path;
+ item.active = item.path === path;
});
- console.log(path);
// 跳转到指定页面
router.push(path);
};
@@ -69,12 +73,12 @@
// 初始化 leftList 的 active 状态
const currentPath = route.path;
leftList.value.forEach(item => {
- item.active = item.router === currentPath;
+ item.active = item.path === currentPath;
});
// 初始化 rightList 的 active 状态
rightList.value.forEach(item => {
- item.active = item.router === currentPath;
+ item.active = item.path === currentPath;
});
});
</script>
@@ -83,7 +87,7 @@
.header {
width: calc(100% - 57px - 59px);
margin-left: 57px;
- padding-top: 38px;
+ padding-top: 30px;
display: flex;
justify-content: space-between;
// position: relative;
@@ -153,6 +157,7 @@
text-align: center;
font-style: normal;
text-transform: none;
+ cursor: pointer;
}
}
}
--
Gitblit v1.9.3