From 721b20aeb58c9f3450ff5ac4a7ba4f1891afc752 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期二, 18 六月 2024 17:49:01 +0800
Subject: [PATCH] 1
---
src/layout/index.vue | 47 ++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/src/layout/index.vue b/src/layout/index.vue
index 7f8571a..6672cb4 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -96,14 +96,15 @@
<template v-else-if="layout=='dock'">
<header class="adminui-header">
<div class="adminui-header-left">
- <div class="logo-bar">
- <img class="logo" src="img/logo.png">
- <span>{{ $CONFIG.APP_NAME }}</span>
+ <div class="logo-bar personalized-logo">
+ <!-- <img class="logo" src="img/logo.png">
+ <span>{{ $CONFIG.APP_NAME }}</span> -->
+ <img src="/img/initiallong.b9495273.png" class="img" style="width: 100%; height: 70%;padding-left: 8px;">
</div>
</div>
<div class="adminui-header-right">
<div v-if="!ismobile" class="adminui-header-menu">
- <el-menu mode="horizontal" :default-active="active" router background-color="#222b45" text-color="#fff" active-text-color="var(--el-color-primary)">
+ <el-menu mode="horizontal" @select="handleSelect" :default-active="active" background-color="#222b45" text-color="#fff" active-text-color="var(--el-color-primary)">
<NavMenu :navMenus="menu"></NavMenu>
</el-menu>
</div>
@@ -145,11 +146,11 @@
</div>
<section class="aminui-wrapper">
<div v-if="!ismobile" class="aminui-side-split">
- <div class="aminui-side-split-top">
+ <!-- <div class="aminui-side-split-top">
<router-link :to="$CONFIG.DASHBOARD_URL">
<img class="logo" :title="$CONFIG.APP_NAME" src="img/logo-r.png">
</router-link>
- </div>
+ </div> -->
<div class="adminui-side-split-scroll">
<el-scrollbar>
<ul>
@@ -193,7 +194,7 @@
<div class="main-maximize-exit" @click="exitMaximize"><el-icon><el-icon-close /></el-icon></div>
- <div class="layout-setting" @click="openSetting"><el-icon><el-icon-brush-filled /></el-icon></div>
+ <!-- <div class="layout-setting" @click="openSetting"><el-icon><el-icon-brush-filled /></el-icon></div> -->
<el-drawer title="甯冨眬瀹炴椂婕旂ず" v-model="settingDialog" :size="400" append-to-body destroy-on-close>
<setting></setting>
@@ -266,6 +267,38 @@
}
},
methods: {
+ findRouteByPath(routes, targetPath) {
+ for (let i = 0; i < routes.length; i++) {
+ if (routes[i].path === targetPath) {
+ // 濡傛灉鎵惧埌鍖归厤鐨刾ath锛岀洿鎺ヨ繑鍥炲綋鍓嶅璞�
+ return routes[i];
+ }
+ if (routes[i].children) {
+ // 濡傛灉褰撳墠瀵硅薄鏈塩hildren锛岄�掑綊鏌ユ壘
+ const found = this.findRouteByPath(routes[i].children, targetPath);
+ if (found) {
+ return found;
+ }
+ }
+ }
+ // 濡傛灉娌℃湁鎵惧埌鍖归厤鐨刾ath锛岃繑鍥瀗ull
+ return null;
+ },
+ handleSelect(key, keyPath) {
+ var MENU = this.$TOOL.data.get("MENU");
+ var foundRoute = this.findRouteByPath(MENU, key);
+ //http://116.63.148.72:8080/xxl-job-admin
+ var TOKEN = this.$TOOL.cookie.get("TOKEN");
+ if(key == '/i/浠诲姟璋冨害') {
+ window.open("http://116.63.148.72:8080/xxl-job-admin");
+ return;
+ }
+ if(foundRoute.name != "鏁板瓧鐪嬫澘") {
+ this.$router.push({path: key});
+ }else {
+ window.open(key + `?token=${TOKEN}`,'_blank');
+ }
+ },
openSetting(){
this.settingDialog = true;
},
--
Gitblit v1.9.3