修改菜单及部门排序规则

This commit is contained in:
RuoYi
2019-06-03 22:17:44 +08:00
parent 36738bca90
commit 9ce273c359
4 changed files with 13 additions and 7 deletions

View File

@ -233,13 +233,13 @@
}
// 缓存并格式化数据
var formatData = function(data) {
var _root = options.rootIdValue ? options.rootIdValue : null
var _root = options.rootIdValue ? options.rootIdValue : null;
var firstCode = data[0][options.parentCode];
$.each(data, function(index, item) {
// 添加一个默认属性,用来判断当前节点有没有被显示
item.isShow = false;
// 这里兼容几种常见Root节点写法
// 默认的几种判断
var firstCode = (0 == index ? item[options.parentCode] : '-');
var _defaultRootFlag = item[options.parentCode] == '0' ||
item[options.parentCode] == 0 ||
item[options.parentCode] == null ||