From 949a21a036d3c5b5df4e07bd5ecc80b08eeff841 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 18 Apr 2025 08:44:06 +0800
Subject: [PATCH] feat:打印系统运维地址
---
src/layout/Header.vue | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/layout/Header.vue b/src/layout/Header.vue
index 822e18f..0c727d2 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,7 +51,12 @@
]);
const handleClick = ({ path, name }) => {
- if (!['首页', '任务管理'].includes(name)) return ElMessage.warning('正在开发中');
+ if (['系统运维'].includes(name)) {
+ console.log('打印地址',import.meta.env.VITE_APP_ADMIN_URL);
+ 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.path === path;
@@ -60,7 +66,6 @@
rightList.value.forEach(item => {
item.active = item.path === path;
});
- console.log(path);
// 跳转到指定页面
router.push(path);
};
@@ -153,6 +158,7 @@
text-align: center;
font-style: normal;
text-transform: none;
+ cursor: pointer;
}
}
}
--
Gitblit v1.9.3