该区域主要实现的功能就是管理模块使用的权限,给相应的模块设置对应的权限。经过设置的模块只能实现设定的功能,而进行这一步操作的人必须是管理员。下面是新增权限和修改权限的实现代码:
//打开新增页面模态框
function toInsert() {
//设置页面url
$("#iframeInsert").prop("src", "/JurisdictionManagement/Jurisdiction/JurisdictionInsert?t=" + new Date().getTime());
//背景时不关闭动态模态框,按下esc时不关闭动态模态框,并且打开modal
$("#modalInsert").modal({ backdrop: 'static', keyboard: false })
}
//打开修改页面模态框
function toUpdate(userTypeId) {
//设置页面url
$("#iframeUpdate").prop("src", "/JurisdictionManagement/Jurisdiction/JurisdictionUpdate?userTypeId=" + userTypeId + "&t=" + new Date().getTime());
//背景时不关闭动态模态框,按下esc时不关闭动态模态框,并且打开modal
$("#modalUpdate").modal({ backdrop: 'static', keyboard: false })
}
function doDelete(userTypeId) {
layer.confirm("确定要删除该用户类型吗?", {
icon: 3,
btn: ['确定', '取消']
}, function (index) {
layer.close(index);//关闭询问提示框
layerIndex = layer.load();//打开加载层
$.post("/JurisdictionManagement/Jurisdiction/DeleteUserType",
{
userTypeId: userTypeId,
}, function (jsonData) {
layer.close(layerIndex);//关闭加载层
if (jsonData.State == true) {
tabUserType.reload();//刷新table
} else {
layer.msg(message.Text, { icon: 0, skin: "layui-layer-molv" });
}
}, 'json');
});
}
效果: