|
@ -4,6 +4,7 @@
|
|
|
|
|
|
/* *************************** 模块初始化 ***************************** */
|
|
/* *************************** 模块初始化 ***************************** */
|
|
var authority = {
|
|
var authority = {
|
|
|
|
grid: null,
|
|
$layout: $("#div_wrapper"),//布局对象
|
|
$layout: $("#div_wrapper"),//布局对象
|
|
$input: $("#div_wrapper_left_inp_search"),//搜索框对象
|
|
$input: $("#div_wrapper_left_inp_search"),//搜索框对象
|
|
$leftgrid: $("#div_left_grid"),//左边的datagrid
|
|
$leftgrid: $("#div_left_grid"),//左边的datagrid
|
|
@ -12,11 +13,14 @@
|
|
$btnForbid: $("#div_forbid"),//全部禁止
|
|
$btnForbid: $("#div_forbid"),//全部禁止
|
|
$rightgrid: null,//右边的datagrid
|
|
$rightgrid: null,//右边的datagrid
|
|
currentRoleId: null,//选中的当前角色ID
|
|
currentRoleId: null,//选中的当前角色ID
|
|
|
|
|
|
initOption: function () {
|
|
initOption: function () {
|
|
$("#buttons").css("margin-left", window.screen.width / 3 - 150);
|
|
$("#buttons").css("margin-left", window.screen.width / 3 - 150);
|
|
|
|
|
|
this.initMenuGrid();
|
|
this.initMenuGrid();
|
|
},
|
|
},
|
|
initMenuGrid: function () {
|
|
initMenuGrid: function () {
|
|
|
|
|
|
authority.$rightgrid = $("#div_right_grid").ligerGrid({
|
|
authority.$rightgrid = $("#div_right_grid").ligerGrid({
|
|
url: '${contextRoot}/authority/getMenuList',
|
|
url: '${contextRoot}/authority/getMenuList',
|
|
columns: [
|
|
columns: [
|
|
@ -55,6 +59,7 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
change: function (id, type, flag) {
|
|
change: function (id, type, flag) {
|
|
|
|
|
|
var url = "";
|
|
var url = "";
|
|
@ -95,7 +100,21 @@
|
|
});
|
|
});
|
|
},
|
|
},
|
|
initleftGrid: function () {
|
|
initleftGrid: function () {
|
|
authority.$leftgrid = this.$leftgrid.ligerGrid({
|
|
|
|
|
|
|
|
|
|
var me= this;
|
|
|
|
$("#div_wrapper_left_inp_search").ligerSearch({
|
|
|
|
width:180,
|
|
|
|
onClick:function(value){
|
|
|
|
debugger
|
|
|
|
me.grid.set({
|
|
|
|
parms: {name:$('#div_wrapper_left_inp_search').val()}
|
|
|
|
});
|
|
|
|
|
|
|
|
me.grid.reload();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
me.grid= authority.$leftgrid = this.$leftgrid.ligerGrid({
|
|
url: '${contextRoot}/role/getRoleList',
|
|
url: '${contextRoot}/role/getRoleList',
|
|
columns: [
|
|
columns: [
|
|
{display: '角色名称', id: 'name', name: 'name', width: '90%', align: "center"}
|
|
{display: '角色名称', id: 'name', name: 'name', width: '90%', align: "center"}
|
|
@ -112,9 +131,12 @@
|
|
authority.currentRoleId = rowdata.id;
|
|
authority.currentRoleId = rowdata.id;
|
|
authority.$rightgrid.loadServerData({id: rowdata.id});
|
|
authority.$rightgrid.loadServerData({id: rowdata.id});
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
},
|
|
},
|
|
initlayout: function () {
|
|
initlayout: function () {
|
|
|
|
|
|
this.$layout.ligerLayout({
|
|
this.$layout.ligerLayout({
|
|
height: "98%",
|
|
height: "98%",
|
|
leftWidth: 200,
|
|
leftWidth: 200,
|
|
@ -127,11 +149,7 @@
|
|
$("#div_wrapper .l-layout-top").css({"border": "0px"});
|
|
$("#div_wrapper .l-layout-top").css({"border": "0px"});
|
|
$("#div_wrapper .l-layout-left .l-layout-header").hide();
|
|
$("#div_wrapper .l-layout-left .l-layout-header").hide();
|
|
|
|
|
|
this.$input.ligerTextBox({
|
|
|
|
width: 200, isSearch: true, onChangeValue: function (value) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
this.$btnAllow.click(function () {
|
|
this.$btnAllow.click(function () {
|
|
if (!authority.currentRoleId) {
|
|
if (!authority.currentRoleId) {
|
|
$.ligerDialog.error("请选择角色");
|
|
$.ligerDialog.error("请选择角色");
|
|
@ -190,6 +208,7 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
},
|
|
},
|
|
init: function () {
|
|
init: function () {
|
|
this.initlayout();
|
|
this.initlayout();
|