diff --git a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAdd.js b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAdd.js index 627099ba9ceab2784ce3207b8fb58fcf58ff8c9b..3ae2044850fd4b5f43b2a6d634893ef4f267263a 100644 --- a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAdd.js +++ b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAdd.js @@ -18,11 +18,11 @@ layui.config({ form.on('submit(formAddBean)', function (data) { if (winui.verifyForm(data.elem)) { var params = { - roleName: $("#roleName").val(), - roleDesc: $("#roleDesc").val() + name: $("#name").val(), + remark: $("#remark").val() }; - AjaxPostUtil.request({url: reqBasePath + "sys015", params: params, type: 'json', method: "POST", callback: function (json) { + AjaxPostUtil.request({url: reqBasePath + "writeSysRole", params: params, type: 'json', method: "POST", callback: function (json) { parent.layer.close(index); parent.refreshCode = '0'; }}); diff --git a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAppMenu.js b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAppMenu.js index ffc4108ed093945c94468387c41c6c6ce8bc98b0..20ab3117484ceb0b852c64acbd6b90ae5e680912 100644 --- a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAppMenu.js +++ b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleAppMenu.js @@ -60,10 +60,10 @@ layui.config({ /********* tree 处理 start *************/ var tree; - AjaxPostUtil.request({url: reqBasePath + "sys038", params: {rowId: parent.rowId}, type: 'json', callback: function (json) { - $("#roleName").text(json.bean.roleName); - $("#roleDesc").text(json.bean.roleDesc); - checkeRows = json.rows; + AjaxPostUtil.request({url: reqBasePath + "querySysRoleById", params: {id: parent.rowId}, type: 'json', method: "GET", callback: function (json) { + $("#name").text(json.bean.name); + $("#remark").text(json.bean.remark); + checkeRows = json.bean.appMenuIds; tree = fsTree.render({ id: "treeDemo", @@ -80,7 +80,7 @@ layui.config({ var zTree = zTreeObj.getCheckedNodes(false); for (var i = 0; i < zTree.length; i++) { for(var j = 0; j < checkeRows.length; j++){ - if(zTree[i].id == checkeRows[j].menuId){ + if(zTree[i].id == checkeRows[j]){ zTreeObj.checkNode(zTree[i], true); } } diff --git a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleEdit.js b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleEdit.js index b684ff8c9894e0b666347fc38f89ea8f262941a2..641e6c43d583b527688ec1e97728394c965c4684 100644 --- a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleEdit.js +++ b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleEdit.js @@ -11,9 +11,9 @@ layui.config({ form = layui.form, textool = layui.textool; - AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) { - $("#roleName").val(json.bean.roleName); - $("#roleDesc").val(json.bean.roleDesc); + AjaxPostUtil.request({url: reqBasePath + "querySysRoleById", params: {id: parent.rowId}, type: 'json', method: "GET", callback: function (json) { + $("#name").val(json.bean.name); + $("#remark").val(json.bean.remark); textool.init({eleId: 'roleDesc', maxlength: 250}); }}); @@ -22,12 +22,12 @@ layui.config({ form.on('submit(formEditBean)', function (data) { if (winui.verifyForm(data.elem)) { var params = { - roleName: $("#roleName").val(), - roleDesc: $("#roleDesc").val(), - rowId: parent.rowId + name: $("#name").val(), + remark: $("#remark").val(), + id: parent.rowId }; - AjaxPostUtil.request({url: reqBasePath + "sys017", params: params, type: 'json', method: "PUT", callback: function (json) { + AjaxPostUtil.request({url: reqBasePath + "writeSysRole", params: params, type: 'json', method: "POST", callback: function (json) { parent.layer.close(index); parent.refreshCode = '0'; }}); diff --git a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleList.js b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleList.js index aa09ca82285e1481ed7a08511d2880d095f97df1..e253e73091ba00590201f1b8414443f2cb200e4b 100644 --- a/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleList.js +++ b/userauth/src/main/resources/template/js/sysEveRole/sysEveRoleList.js @@ -25,11 +25,12 @@ layui.config({ limit: getLimit(), cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'roleName', title: '角色名称', width: 120 }, - { field: 'roleDesc', title: '角色描述', width: 520 }, - { field: 'userNum', title: '使用用户数量', width: 150 }, - { field: 'parentName', title: '父角色', width: 150 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, + { field: 'name', title: '角色名称', width: 120 }, + { field: 'remark', title: '角色描述', width: 520 }, + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, + { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, + { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar' } ]], done: function(json) { @@ -58,7 +59,7 @@ layui.config({ function del(data, obj) { layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], { icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType] }, function (index) { layer.close(index); - AjaxPostUtil.request({url: reqBasePath + "sys018", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { + AjaxPostUtil.request({url: reqBasePath + "deleteRoleById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); loadTable(); }}); @@ -87,7 +88,9 @@ layui.config({ title: "手机端菜单授权", pageId: "sysEveRoleAppMenu", area: ['90vw', '90vh'], - callBack: function (refreshCode) {}}); + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + }}); } // PC端菜单授权 @@ -98,7 +101,9 @@ layui.config({ title: "PC端菜单授权", pageId: "sysEveRolePCMenu", area: ['90vw', '90vh'], - callBack: function (refreshCode) {}}); + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + }}); } // 新增角色 @@ -115,7 +120,6 @@ layui.config({ }); form.render(); - // 刷新数据 $("body").on("click", "#reloadTable", function() { loadTable(); }); diff --git a/userauth/src/main/resources/template/js/sysEveRole/sysEveRolePCMenu.js b/userauth/src/main/resources/template/js/sysEveRole/sysEveRolePCMenu.js index 527c6a67a50cfb8b8e607f8d54524ba0ad357b26..b22f303446247ff81735fe54e498612bb58e9b30 100644 --- a/userauth/src/main/resources/template/js/sysEveRole/sysEveRolePCMenu.js +++ b/userauth/src/main/resources/template/js/sysEveRole/sysEveRolePCMenu.js @@ -25,8 +25,8 @@ layui.config({ menuIds.push(nodes[i].id); } var params = { - roleName: $("#roleName").html(), - roleDesc: $("#roleDesc").html(), + name: $("#name").html(), + remark: $("#remark").html(), menuIds: JSON.stringify(menuIds), rowId: parent.rowId }; @@ -42,10 +42,10 @@ layui.config({ /********* tree 处理 start *************/ var tree; - AjaxPostUtil.request({url: reqBasePath + "sys016", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) { - $("#roleName").text(json.bean.roleName); - $("#roleDesc").text(json.bean.roleDesc); - checkeRows = json.rows; + AjaxPostUtil.request({url: reqBasePath + "querySysRoleById", params: {id: parent.rowId}, type: 'json', method: "GET", callback: function (json) { + $("#name").text(json.bean.name); + $("#remark").text(json.bean.remark); + checkeRows = json.bean.menuIds; tree = fsTree.render({ id: "treeDemo", @@ -61,8 +61,8 @@ layui.config({ var zTreeObj = $.fn.zTree.getZTreeObj(id); var zTree = zTreeObj.getCheckedNodes(false); for (var i = 0; i < zTree.length; i++) { - for(var j = 0; j < checkeRows.length; j++){ - if(zTree[i].id == checkeRows[j].menuId){ + for (var j = 0; j < checkeRows.length; j++) { + if (zTree[i].id == checkeRows[j]) { zTreeObj.checkNode(zTree[i], true); } } diff --git a/userauth/src/main/resources/template/tpl/sysEveRole/sysEveRoleAdd.html b/userauth/src/main/resources/template/tpl/sysEveRole/sysEveRoleAdd.html index d40a4a30d37e61da23d4c4846531ee83cc101882..eb70f23c4966a7cc7bc6fbd50176561022bbecfa 100644 --- a/userauth/src/main/resources/template/tpl/sysEveRole/sysEveRoleAdd.html +++ b/userauth/src/main/resources/template/tpl/sysEveRole/sysEveRoleAdd.html @@ -9,19 +9,19 @@