From 7272158c8e133afcdf752ca09a70c0bd969d7393 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 25 三月 2026 19:57:26 +0800
Subject: [PATCH] #
---
src/main/webapp/views/index.html | 131 +++++++++++++++++++++++++++++--------------
1 files changed, 87 insertions(+), 44 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 12d725e..7f4c3e4 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -474,11 +474,24 @@
}
.page-frame {
+ position: absolute;
+ inset: 0;
width: 100%;
height: 100%;
border: 0;
display: block;
background: #fff;
+ opacity: 0;
+ visibility: hidden;
+ pointer-events: none;
+ z-index: 0;
+ }
+
+ .page-frame.is-active {
+ opacity: 1;
+ visibility: visible;
+ pointer-events: auto;
+ z-index: 1;
}
.page-loading {
@@ -792,7 +805,7 @@
<el-main class="content-main">
<div class="frame-wrapper">
- <div class="page-loading" v-if="pageLoading">
+ <div key="page-loading" class="page-loading" v-show="pageLoading">
<i class="el-icon-loading"></i>
<span>{{ loadingText }}</span>
</div>
@@ -800,9 +813,8 @@
<iframe
v-for="tab in tabs"
:key="'frame-' + tab.name"
- class="page-frame"
+ :class="['page-frame', { 'is-active': activeTab === tab.name }]"
:data-tab-name="tab.name"
- v-show="activeTab === tab.name"
:src="tab.currentSrc"
@load="handleFrameLoad(tab.name)">
</iframe>
@@ -862,7 +874,7 @@
<script type="text/javascript" src="../static/vue/js/vue.min.js"></script>
<script type="text/javascript" src="../static/vue/element/element.js"></script>
<script>
- var DASHBOARD_VIEW_VERSION = "20260316-hero-two-rows-flat-compact";
+ var DASHBOARD_VIEW_VERSION = "20260317-dashboard-stop-password-mask";
var HOME_TAB_CONFIG = {
title: "绯荤粺浠〃鐩�",
url: baseUrl + "/views/dashboard/dashboard.html?layoutVersion=" + encodeURIComponent(DASHBOARD_VIEW_VERSION),
@@ -1177,7 +1189,7 @@
return this.tl(title);
},
findMenuMeta: function (tab) {
- var normalizedUrl;
+ var menuEntry;
var i;
var j;
var group;
@@ -1185,20 +1197,69 @@
if (!tab) {
return null;
}
- normalizedUrl = this.resolveViewSrc(tab.url);
+ if (tab.menuKey) {
+ for (i = 0; i < this.menus.length; i++) {
+ group = this.menus[i];
+ for (j = 0; j < group.subMenu.length; j++) {
+ item = group.subMenu[j];
+ if (item.tabKey === tab.menuKey) {
+ return {
+ group: group,
+ item: item
+ };
+ }
+ }
+ }
+ }
+ menuEntry = this.findMenuEntryByUrl(tab.url);
+ if (menuEntry) {
+ return menuEntry;
+ }
+ return null;
+ },
+ normalizeMenuMatchUrl: function (url, stripQuery) {
+ var normalized = this.resolveViewSrc(url || "");
+ var hashIndex = normalized.indexOf("#");
+ var queryIndex;
+ if (hashIndex > -1) {
+ normalized = normalized.substring(0, hashIndex);
+ }
+ if (stripQuery) {
+ queryIndex = normalized.indexOf("?");
+ if (queryIndex > -1) {
+ normalized = normalized.substring(0, queryIndex);
+ }
+ }
+ return normalized;
+ },
+ findMenuEntryByUrl: function (url) {
+ var normalized = this.normalizeMenuMatchUrl(url, false);
+ var normalizedBase = this.normalizeMenuMatchUrl(url, true);
+ var fallback = null;
+ var i;
+ var j;
+ var group;
+ var item;
+
for (i = 0; i < this.menus.length; i++) {
group = this.menus[i];
for (j = 0; j < group.subMenu.length; j++) {
item = group.subMenu[j];
- if ((tab.menuKey && item.tabKey === tab.menuKey) || item.url === normalizedUrl) {
+ if (item.url === normalized) {
return {
+ group: group,
+ item: item
+ };
+ }
+ if (!fallback && this.normalizeMenuMatchUrl(item.url, true) === normalizedBase) {
+ fallback = {
group: group,
item: item
};
}
}
}
- return null;
+ return fallback;
},
syncTabMeta: function (tab, homeConfig, profileConfig) {
var menuMeta;
@@ -1602,38 +1663,16 @@
});
},
findMenuKeyByUrl: function (url) {
- var normalized = this.resolveViewSrc(url);
- var i;
- var j;
- var group;
- var item;
-
- for (i = 0; i < this.menus.length; i++) {
- group = this.menus[i];
- for (j = 0; j < group.subMenu.length; j++) {
- item = group.subMenu[j];
- if (item.url === normalized) {
- return item.tabKey;
- }
- }
+ var entry = this.findMenuEntryByUrl(url);
+ if (entry && entry.item) {
+ return entry.item.tabKey || "";
}
return "";
},
findMenuGroupIndexByUrl: function (url) {
- var normalized = this.resolveViewSrc(url);
- var i;
- var j;
- var group;
- var item;
-
- for (i = 0; i < this.menus.length; i++) {
- group = this.menus[i];
- for (j = 0; j < group.subMenu.length; j++) {
- item = group.subMenu[j];
- if (item.url === normalized) {
- return "group-" + group.menuId;
- }
- }
+ var entry = this.findMenuEntryByUrl(url);
+ if (entry && entry.group) {
+ return "group-" + entry.group.menuId;
}
return "";
},
@@ -2027,31 +2066,35 @@
window.index = window.index || {};
window.index.loadView = function (param) {
var url;
+ var menuEntry;
if (!param || !param.menuPath) {
return;
}
url = that.resolveViewSrc(param.menuPath);
+ menuEntry = that.findMenuEntryByUrl(url);
that.addOrActivateTab({
- title: that.stripTags(param.menuName) || that.t("common.workPage"),
- url: url,
+ title: that.stripTags(param.menuName) || (menuEntry && menuEntry.item ? menuEntry.item.name : that.t("common.workPage")),
+ url: menuEntry && menuEntry.item ? menuEntry.item.url : url,
home: false,
- group: that.t("common.businessPage"),
- menuKey: that.findMenuKeyByUrl(url)
+ group: menuEntry && menuEntry.group ? menuEntry.group.menu : that.t("common.businessPage"),
+ menuKey: menuEntry && menuEntry.item ? menuEntry.item.tabKey : that.findMenuKeyByUrl(url)
});
};
window.index.loadHome = function (param) {
var url;
+ var menuEntry;
if (!param || !param.menuPath) {
that.openHomeTab();
return;
}
url = that.resolveViewSrc(param.menuPath);
+ menuEntry = that.findMenuEntryByUrl(url);
that.addOrActivateTab({
- title: that.stripTags(param.menuName) || that.resolveHomeConfig().title,
- url: url,
+ title: that.stripTags(param.menuName) || (menuEntry && menuEntry.item ? menuEntry.item.name : that.resolveHomeConfig().title),
+ url: menuEntry && menuEntry.item ? menuEntry.item.url : url,
home: true,
- group: that.resolveHomeConfig().group,
- menuKey: that.findMenuKeyByUrl(url)
+ group: menuEntry && menuEntry.group ? menuEntry.group.menu : that.resolveHomeConfig().group,
+ menuKey: menuEntry && menuEntry.item ? menuEntry.item.tabKey : that.findMenuKeyByUrl(url)
});
};
--
Gitblit v1.9.1