全面修正分级授权,去掉Anonymous,采用Authenticate进行授权

This commit is contained in:
yubaolee
2016-05-26 20:10:22 +08:00
parent b3c6df2931
commit 855f97df7d
24 changed files with 227 additions and 244 deletions

View File

@@ -1,4 +1,46 @@

//左边分类导航树
var maintree = function () {
var url = '/OrgManager/LoadOrg';
var setting = {
view: { selectedMulti: false },
data: {
key: {
name: 'Name',
title: 'Name'
},
simpleData: {
enable: true,
idKey: 'Id',
pIdKey: 'ParentId',
rootPId: 'null'
}
},
callback: {
onClick: function (event, treeId, treeNode) {
list.reload(treeNode.Id);
}
}
};
var load = function () {
$.getJSON(url, function (json) {
var zTreeObj = $.fn.zTree.init($("#orgtree"), setting, json);
var firstId; //tree的第一个ID
if (json.length > 0) {
firstId = json[0].Id;
} else {
firstId = -1;
}
list.reload(firstId);
zTreeObj.expandAll(true);
});
};
load();
return {
reload: load
}
}();
//grid列表模块
function MainGrid() {
var url = '/UserManager/Load?orgId=';
@@ -47,7 +89,7 @@ function MainGrid() {
}
],
dataUrl: url + selectedId,
data:[],
fullGrid: true,
showLinenumber: true,
showCheckboxcol: true,
@@ -56,6 +98,7 @@ function MainGrid() {
showTfoot: false,
});
this.reload = function (id) {
if (id != undefined) selectedId = id;
this.maingrid.datagrid('reload', { dataUrl: url + selectedId });
@@ -64,42 +107,6 @@ function MainGrid() {
MainGrid.prototype = new Grid();
var list = new MainGrid();
//左边分类导航树
var maintree = function () {
var url = '/OrgManager/LoadOrg';
var setting = {
view: { selectedMulti: false },
data: {
key: {
name: 'Name',
title: 'Name'
},
simpleData: {
enable: true,
idKey: 'Id',
pIdKey: 'ParentId',
rootPId: 'null'
}
},
callback: {
onClick: function(event, treeId, treeNode) {
list.reload(treeNode.Id);
}
}
};
$.getJSON(url, function (json) {
$.fn.zTree.init($("#orgtree"), setting, json).expandAll(true);
});
return {
reload: function () {
$.getJSON(url, function (json) {
$.fn.zTree.init($("#orgtree"), setting, json).expandAll(true);
});
}
}
}();
//编辑时,选择上级弹出的树
var parentTree = function () {
var nameDom = "#Organizations";