|
@@ -45,7 +45,7 @@
|
45
|
45
|
<ul id="treeMenu" class="tree tree-menu nav-menu-submenu nav-menu-report active" data-ride="tree">
|
46
|
46
|
<th:block th:each="menu:${user.menus}">
|
47
|
47
|
<li th:id="${menu.oldId}" th:if="${menu.oldId == '100009' || menu.oldId == '100381' || menu.oldId == '100383' || menu.oldId == '100008' || menu.oldId == '100382' || menu.oldId == '100384' || menu.oldId == '100296'} ">
|
48
|
|
- <a th:href="@{'javascript:childMenuHandle(\''+ ${menu.oldId} + '\',\'' + ${menu.nodepath} + '\',\'' + ${menu.nodename} + '\',\'' + ${menu.openimg} + '\')'}">
|
|
48
|
+ <a th:href="@{'javascript:childMenuHandle(\''+ ${menu.oldId} + '\',\'' + ${menu.nodepath} + '\',\'' + ${menu.nodename} + '\',\'' + ${menu.openimg} + '\', \'nav-menu-report\')'}">
|
49
|
49
|
<i th:class="'iconfont '+${menu.nodeimg}"></i><i th:class="'iconfont '+${menu.openimg}"></i>[[${menu.nodename}]]
|
50
|
50
|
</a>
|
51
|
51
|
</li>
|
|
@@ -54,7 +54,7 @@
|
54
|
54
|
<ul id="treeMenu" class="tree tree-menu nav-menu-submenu nav-menu-government" data-ride="tree">
|
55
|
55
|
<th:block th:each="menu:${user.menus}">
|
56
|
56
|
<li th:id="${menu.oldId}" th:if="${menu.oldId == '100003' || menu.oldId == '100007' || menu.oldId == '100005' || menu.oldId == '100004' || menu.oldId == '100010' || menu.oldId == '100380'}">
|
57
|
|
- <a th:href="@{'javascript:childMenuHandle(\''+ ${menu.oldId} + '\',\'' + ${menu.nodepath} + '\',\'' + ${menu.nodename} + '\',\'' + ${menu.openimg} + '\')'}">
|
|
57
|
+ <a th:href="@{'javascript:childMenuHandle(\''+ ${menu.oldId} + '\',\'' + ${menu.nodepath} + '\',\'' + ${menu.nodename} + '\',\'' + ${menu.openimg} + '\', \'nav-menu-government\')'}">
|
58
|
58
|
<i th:class="'iconfont '+${menu.nodeimg}"></i><i th:class="'iconfont '+${menu.openimg}"></i>[[${menu.nodename}]]
|
59
|
59
|
</a>
|
60
|
60
|
</li>
|
|
@@ -63,7 +63,7 @@
|
63
|
63
|
<ul id="treeMenu" class="tree tree-menu nav-menu-submenu nav-menu-system" data-ride="tree">
|
64
|
64
|
<th:block th:each="menu:${user.menus}">
|
65
|
65
|
<li th:id="${menu.oldId}" th:if="${menu.oldId == '100272' || menu.oldId == '100273' }">
|
66
|
|
- <a th:href="@{'javascript:childMenuHandle(\''+ ${menu.oldId} + '\',\'' + ${menu.nodepath} + '\',\'' + ${menu.nodename} + '\',\'' + ${menu.openimg} + '\')'}">
|
|
66
|
+ <a th:href="@{'javascript:childMenuHandle(\''+ ${menu.oldId} + '\',\'' + ${menu.nodepath} + '\',\'' + ${menu.nodename} + '\',\'' + ${menu.openimg} + '\', \'nav-menu-system\')'}">
|
67
|
67
|
<i th:class="'iconfont '+${menu.nodeimg}"></i><i th:class="'iconfont '+${menu.openimg}"></i>[[${menu.nodename}]]
|
68
|
68
|
</a>
|
69
|
69
|
</li>
|
|
@@ -103,7 +103,7 @@
|
103
|
103
|
bootbox.confirm(confirmData);
|
104
|
104
|
}
|
105
|
105
|
//二级菜单事件处理
|
106
|
|
- function childMenuHandle(tmpId, tmpUrl, tmpText, openimg) {
|
|
106
|
+ function childMenuHandle(tmpId, tmpUrl, tmpText, openimg, parentMenu) {
|
107
|
107
|
var arr = document.getElementsByTagName("li");
|
108
|
108
|
for (var j = 0; j < arr.length; j++) {
|
109
|
109
|
arr[j].classList.remove("active");
|
|
@@ -125,19 +125,27 @@
|
125
|
125
|
localStorage.setItem("parentUrl",url);
|
126
|
126
|
localStorage.setItem("openimg",openimg);
|
127
|
127
|
window.top.hideMask();
|
|
128
|
+
|
|
129
|
+ activeNavMenu(parentMenu);
|
128
|
130
|
}
|
129
|
131
|
function passwordEdit(){
|
130
|
132
|
toPage(ctxPath + 'api/operator/toChangePwd')
|
131
|
133
|
}
|
132
|
134
|
function toMain(){
|
133
|
135
|
toPage(ctxPath +"main");
|
134
|
|
- // 父级菜单回显
|
135
|
|
- $(".nav-menu .nav-menu-item.active").removeClass("active");
|
136
|
|
- $(".nav-menu .nav-menu-item").first().addClass("active");
|
137
|
|
-
|
|
136
|
+ activeNavMenu('nav-menu-index');
|
138
|
137
|
}
|
139
|
|
- window.onload=function(){
|
140
|
|
-
|
|
138
|
+
|
|
139
|
+ function subMenuClick(menuText) {
|
|
140
|
+ var found = false;
|
|
141
|
+ $('.menu li').each(function(_, el) {
|
|
142
|
+ if (found) return;
|
|
143
|
+
|
|
144
|
+ if ($(el).text().includes(menuText)) {
|
|
145
|
+ $(el).find('a').get(0).click()
|
|
146
|
+ found = true;
|
|
147
|
+ }
|
|
148
|
+ });
|
141
|
149
|
}
|
142
|
150
|
</script>
|
143
|
151
|
</html>
|