diff --git a/OpenAuth.Mvc/wwwroot/css/main.css b/OpenAuth.Mvc/wwwroot/css/main.css index 752ecf57f6d5115152e288cf5d70b2d783922e1c..dbb5a3179301bda63c0f4a20e70d2f6091af0f45 100644 --- a/OpenAuth.Mvc/wwwroot/css/main.css +++ b/OpenAuth.Mvc/wwwroot/css/main.css @@ -202,3 +202,11 @@ .top_menu .layui-nav-item.showNotice[pc]{ display:none !important; } .panel{ width:100%; } } + +ol li a { + background-color: rgba(0,0,0,1) !important; +} + +.three_this { + background-color: #808080 !important; +} \ No newline at end of file diff --git a/OpenAuth.Mvc/wwwroot/js/index.js b/OpenAuth.Mvc/wwwroot/js/index.js index d7670a908c8a8ab4a3559f3b93fef4a19d50445a..8b49b556c33e55c2c044798eec4527f932f2dd39 100644 --- a/OpenAuth.Mvc/wwwroot/js/index.js +++ b/OpenAuth.Mvc/wwwroot/js/index.js @@ -9,7 +9,23 @@ layui.config({ tab = layui.bodyTab({ openTabNum : "50", //最大可打开窗口数量 url: "/UserSession/GetModulesTree" //获取菜单json地址 - }); + }); + + $(".menu_three").on("click", function () { + + $(this).next().toggle(); + $.each($(this).parent().siblings(), function (i, e) { + + $(e).find("ol").hide();; + }); + + }) + $("ol").on("click", "li a", function () { + $.each($(this).parent().siblings(), function (i, e) { + $(e).find("a").removeClass('three_this') + }); + $(this).addClass('three_this'); // 添加当前元素的样式 + }) $.get('/UserSession/GetUserName', function(data) { diff --git a/OpenAuth.Mvc/wwwroot/js/leftNav.js b/OpenAuth.Mvc/wwwroot/js/leftNav.js index 86489bb75da13ed38676c84f9809712f124cd4c6..67f4ef5b0959f42403c9b4c4b78dc8b64ac51d30 100644 --- a/OpenAuth.Mvc/wwwroot/js/leftNav.js +++ b/OpenAuth.Mvc/wwwroot/js/leftNav.js @@ -32,7 +32,33 @@ function navBar(strData){ if(data[i].Children[j].Item.IconName != undefined && data[i].Children[j].Item.IconName != ''){ ulHtml += '' } - ulHtml += ''+data[i].Children[j].Item.Name+''; + ulHtml += '' + data[i].Children[j].Item.Name + ''; + + if (data[i].Children[j].Children != undefined && data[i].Children[j].Children.length > 0) { + + let idx = 0; + for (var k = 0; k < data[i].Children[j].Children.length; k++) { + + if (data[i].Children[j].Children[k].Item.Status === -1) continue; + + idx++; + + if (idx == 1) { + ulHtml += '