|
|
|
@ -244,39 +244,77 @@ |
|
|
|
$.modal.openTab("部门管理", url); |
|
|
|
} |
|
|
|
|
|
|
|
/* 用户管理-重置密码 */ |
|
|
|
function resetPwd(userId) { |
|
|
|
var url = prefix + '/resetPwd/' + userId; |
|
|
|
$.modal.open("重置密码", url, '800', '300'); |
|
|
|
//角色id |
|
|
|
var roleId = ""; |
|
|
|
//业务字典选择 |
|
|
|
function dictionary(roleId) { |
|
|
|
roleId = roleId; |
|
|
|
var options = { |
|
|
|
title: '业务字典', |
|
|
|
width: "1120", |
|
|
|
url: prefix + "/dictionary/" + roleId, |
|
|
|
callBack: doSubmit |
|
|
|
}; |
|
|
|
$.modal.openOptions(options); |
|
|
|
|
|
|
|
function doSubmit(index, layero) { |
|
|
|
var body = layer.getChildFrame('body', index); |
|
|
|
var dictList = body.find('#dictList').val(); |
|
|
|
var di = dictList.split(","); |
|
|
|
dictList = ""; |
|
|
|
for(var i=0; i<di.length; i++){ |
|
|
|
if(di[i] != ""){ |
|
|
|
dictList += di[i] + ","; |
|
|
|
} |
|
|
|
} |
|
|
|
dictList == ""? "":dictList.substring(0,dictList.length-1); |
|
|
|
$.operate.post(prefix + "/updateDictionary", { "roleId": roleId, "dictList": dictList }); |
|
|
|
layer.close(index); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* 用户状态显示 */ |
|
|
|
function statusTools(row) { |
|
|
|
if (row.status == 1) { |
|
|
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.userId + '\')"></i> '; |
|
|
|
} else { |
|
|
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.userId + '\')"></i> '; |
|
|
|
} |
|
|
|
/* 用户管理-部门 */ |
|
|
|
function dept() { |
|
|
|
var url = ctx + "system/dept"; |
|
|
|
$.modal.openTab("部门管理", url); |
|
|
|
} |
|
|
|
|
|
|
|
/* 用户管理-停用 */ |
|
|
|
function disable(userId) { |
|
|
|
$.modal.confirm("确认要停用用户吗?", function() { |
|
|
|
$.operate.post(prefix + "/changeStatus", { "userId": userId, "status": 1 }); |
|
|
|
}) |
|
|
|
|
|
|
|
/* 角色管理-分配数据权限 */ |
|
|
|
function authDataScope(roleId) { |
|
|
|
var url = prefix + '/authDataScope/' + roleId; |
|
|
|
$.modal.open("分配数据权限", url); |
|
|
|
} |
|
|
|
|
|
|
|
/* 角色管理-分配用户 */ |
|
|
|
function authUser(roleId) { |
|
|
|
var url = prefix + '/authUser/' + roleId; |
|
|
|
$.modal.openTab("分配用户", url); |
|
|
|
} |
|
|
|
|
|
|
|
/* 角色状态显示 */ |
|
|
|
function statusTools(row) { |
|
|
|
if (row.status == 1) { |
|
|
|
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.roleId + '\')"></i> '; |
|
|
|
} else { |
|
|
|
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.roleId + '\')"></i> '; |
|
|
|
} |
|
|
|
} |
|
|
|
function updateLawCertificateNum(userId) { |
|
|
|
$.modal.confirm("确认要更新用户吗?", function () { |
|
|
|
$.operate.post(prefix + "/updateZfcode", { "userId": userId }); |
|
|
|
|
|
|
|
/* 角色管理-停用 */ |
|
|
|
function disable(roleId) { |
|
|
|
$.modal.confirm("确认要停用角色吗?", function() { |
|
|
|
$.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 1 }); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/* 用户管理启用 */ |
|
|
|
function enable(userId) { |
|
|
|
$.modal.confirm("确认要启用用户吗?", function() { |
|
|
|
$.operate.post(prefix + "/changeStatus", { "userId": userId, "status": 0 }); |
|
|
|
}) |
|
|
|
/* 角色管理启用 */ |
|
|
|
function enable(roleId) { |
|
|
|
$.modal.confirm("确认要启用角色吗?", function() { |
|
|
|
$.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 0 }); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 异步加载完成后的 事件 |
|
|
|
function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) { |
|
|
|
var treeObjtt = $.fn.zTree.getZTreeObj("tree"); |
|
|
|
|