#
Junjie
昨天 2e7dbd705fc82e8db74b073e55af938d67d8c19f
src/main/webapp/views/index.html
@@ -862,7 +862,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-network-balanced-columns";
  var HOME_TAB_CONFIG = {
    title: "系统仪表盘",
    url: baseUrl + "/views/dashboard/dashboard.html?layoutVersion=" + encodeURIComponent(DASHBOARD_VIEW_VERSION),
@@ -1177,7 +1177,7 @@
        return this.tl(title);
      },
      findMenuMeta: function (tab) {
        var normalizedUrl;
        var menuEntry;
        var i;
        var j;
        var group;
@@ -1185,12 +1185,12 @@
        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 ((tab.menuKey && item.tabKey === tab.menuKey) || item.url === normalizedUrl) {
              if (item.tabKey === tab.menuKey) {
              return {
                group: group,
                item: item
@@ -1198,7 +1198,56 @@
            }
          }
        }
        }
        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 (item.url === normalized) {
              return {
                group: group,
                item: item
              };
            }
            if (!fallback && this.normalizeMenuMatchUrl(item.url, true) === normalizedBase) {
              fallback = {
                group: group,
                item: item
              };
            }
          }
        }
        return fallback;
      },
      syncTabMeta: function (tab, homeConfig, profileConfig) {
        var menuMeta;
@@ -1602,38 +1651,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 +2054,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)
          });
        };