Parcourir la source

角色管理 : 角色授权树折叠

master
ndbs il y a 2 ans
Parent
révision
cac31afde2
3 fichiers modifiés avec 106 ajouts et 12 suppressions
  1. +51
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/Authorize/Form.js
  2. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ModuleController.cs
  3. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Module/ModuleBLL.cs

+ 51
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/Authorize/Form.js Voir le fichier

@@ -66,32 +66,74 @@ var bootstrap = function ($, learun) {
/*绑定事件和初始化控件*/
bind: function () {
learun.loading(true, '正在获取数据');
learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetCheckTree', function (res) {
learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetCheckTreeForModuleList', function (res) {
if (res.code == 200) {
treeData = res.data;
$('#step-1').lrtree({
data: treeData.moduleList
data: treeData.moduleList,
isAllExpand:false
});
if (!!objectId) {
setTreeData1();
}
}
setTimeout(function () {
learun.loading(false);
});
});
learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetCheckTreeForButtonList', function (res) {
if (res.code == 200) {
treeData = res.data;
$('#step-2').lrtree({
data: treeData.buttonList
});
if (!!objectId) {
setTreeData2();
}
}
setTimeout(function () {
learun.loading(false);
});
});
learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetCheckTreeForColumnList', function (res) {
if (res.code == 200) {
treeData = res.data;
$('#step-3').lrtree({
data: treeData.columnList
});
//$('#step-4').lrtree({
// data: treeData.formList
//});
if (!!objectId) {
setTreeData1();
setTreeData2();
setTreeData3();
//setTreeData4();
}
}
setTimeout(function () {
learun.loading(false);
});
});
//learun.httpAsyncGet(top.$.rootUrl + '/LR_SystemModule/Module/GetCheckTree', function (res) {
// if (res.code == 200) {
// treeData = res.data;
// $('#step-1').lrtree({
// data: treeData.moduleList
// });
// $('#step-2').lrtree({
// data: treeData.buttonList
// });
// $('#step-3').lrtree({
// data: treeData.columnList
// });
// //$('#step-4').lrtree({
// // data: treeData.formList
// //});
// if (!!objectId) {
// setTreeData1();
// setTreeData2();
// setTreeData3();
// }
// }
// setTimeout(function () {
// learun.loading(false);
// });
//});
// 加载导向
$('#wizard').wizard().on('change', function (e, data) {
var $finish = $("#btn_finish");
@@ -107,7 +149,7 @@ var bootstrap = function ($, learun) {
$('#step-3_' + item.replace(/-/g, '_') + '_learun_moduleId').parent().show();
//$('#step-4_' + item.replace(/-/g, '_') + '_learun_moduleId').parent().show();
});
//} else if (data.step == 3) {
//} else if (data.step == 3) {
} else if (data.step == 2) {

$finish.removeAttr('disabled');


+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ModuleController.cs Voir le fichier

@@ -121,6 +121,58 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers

return this.JsonResult(jsonData);
}
/// <summary>
/// 获取树形数据(带勾选框)--系统模块
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetCheckTreeForModuleList()
{
var moduleList = moduleIBLL.GetModuleCheckTree();
var jsonData = new
{
moduleList,
};

return this.JsonResult(jsonData);
}
/// <summary>
/// 获取树形数据(带勾选框)--系统按钮
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetCheckTreeForButtonList()
{
var buttonList = moduleIBLL.GetButtonCheckTree();
var jsonData = new
{
buttonList,
};

return this.JsonResult(jsonData);
}
/// <summary>
/// 获取树形数据(带勾选框)--系统视图
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetCheckTreeForColumnList()
{
var columnList = moduleIBLL.GetColumnCheckTree();
var jsonData = new
{
columnList
//formList
};

return this.JsonResult(jsonData);
}
#endregion

#region 模块按钮


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Module/ModuleBLL.cs Voir le fichier

@@ -147,7 +147,7 @@ namespace Learun.Application.Base.SystemModule
node.value = item.F_EnCode;
node.showcheck = true;
node.checkstate = 0;
node.isexpand = true;
node.isexpand = false;
node.icon = item.F_Icon;
node.parentId = item.F_ParentId;
treeList.Add(node);
@@ -346,7 +346,7 @@ namespace Learun.Application.Base.SystemModule
node.value = module.F_EnCode;
node.showcheck = true;
node.checkstate = 0;
node.isexpand = true;
node.isexpand = false;
node.icon = module.F_Icon;
node.parentId = module.F_ParentId + "_learun_moduleId";
if (module.F_Target != "expand")
@@ -462,7 +462,7 @@ namespace Learun.Application.Base.SystemModule
node.value = module.F_EnCode;
node.showcheck = true;
node.checkstate = 0;
node.isexpand = true;
node.isexpand = false;
node.icon = module.F_Icon;
node.parentId = module.F_ParentId + "_learun_moduleId";



Chargement…
Annuler
Enregistrer