1、单页面字典调用问题处理
yisha-data.js中修改,注意如果想要无权限也可以查看界面,当前请求接口权限标识去除,注意也把字典信息查询接口权限标识去除。
function getDataDict(dictType) { var arr = []; try { for (var i = 0; i < dataDict[dictType].length; i++) { if (dataDict[dictType][i].DictStatus == 1) { arr.push(dataDict[dictType][i]); } } if (arr.length == 0) { ys.ajax({ url: ctx + 'SystemManage/DataDictDetail/GetListJson', type: "get", async: false, data: { DictType: dictType }, success: function (obj) { if (obj.Tag == 1) { for (var i = 0; i < obj.Data.length; i++) { arr.push(obj.Data[i]); } } } }); } } catch (e) { ys.ajax({ url: ctx + 'SystemManage/DataDictDetail/GetListJson', type: "get", async: false, data: { DictType: dictType }, success: function (obj) { if (obj.Tag == 1) { for (var i = 0; i < obj.Data.length; i++) { arr.push(obj.Data[i]); } } } }); } return arr; }
2、菜单文字重合问题
// 滚动到指定菜单 function scrollToMenu(element) { var menuTabUrl = $(element).data('id'); $(".nav ul, .nav li").removeClass("selected").removeClass("active").removeClass("in"); $(".nav ul, .nav li").each(function () { if ($(this).children().length > 0) { var link = $(this).children()[0]; if (link) { var menuUrl = $(link).data('url'); if (menuUrl == menuTabUrl) { var dataType = "[data-type=menu]"; var parent1_li = $(link).parent(dataType); parent1_li.addClass("active"); var parent2_ul = parent1_li.parent(dataType); parent2_ul.addClass("in").addClass("active"); //对高度进行调整 add hangxing.pang
parent2_ul.height("auto"); var parent3_li = parent2_ul.parent(dataType); parent3_li.addClass("active"); var parent4_ul = parent3_li.parent(dataType); if (parent4_ul) { parent4_ul.addClass("in").addClass("active"); var parent5_li = parent4_ul.parent(dataType); parent5_li.addClass("active"); } return false; // 终止循环 } } } }); }
标签:yisha,arr,obj,前端,yishaadmin,li,ul,var,addClass From: https://www.cnblogs.com/sailing92/p/16773883.html