From 1310b47a24f0cc70f0128c820bd490dca6a1a921 Mon Sep 17 00:00:00 2001 From: yyk <2336760928@qq.com> Date: 星期四, 22 八月 2024 14:08:03 +0800 Subject: [PATCH] Merge branch 'master' into yyk --- HTML/views/SystemSettings/Role.html | 66 +++++++++++++++++++++++++++++--- 1 files changed, 59 insertions(+), 7 deletions(-) diff --git a/HTML/views/SystemSettings/Role.html b/HTML/views/SystemSettings/Role.html index 021b914..b3826ec 100644 --- a/HTML/views/SystemSettings/Role.html +++ b/HTML/views/SystemSettings/Role.html @@ -97,7 +97,7 @@ RoleName: RoleName, }; sendData(IP + "/Basis/GetRolesList?RoleNo=" + RoleNo + "&RoleName=" + RoleName, {}, "get", function (res) { - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 var list = res.data; @@ -122,6 +122,58 @@ ); } }); + sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) { + $(function () { + $("#approvalBtn").hide(); + }); + $(function () { + $(".editClass").hide(); + }); + $(function () { + $(".roleClass").hide(); + }); + $(function () { + $(".approvalBtndel").hide(); + }); + if (res.code == 0) { + //鎴愬姛 + for (var k = 0; k < res.data.length; k++) { + if (res.data[k].MenuName == "缂栬緫瑙掕壊") { + $(function () { + $(".editClass").show(); + }); + } + if (res.data[k].MenuName == "鍒嗛厤鏉冮檺") { + $(function () { + $(".roleClass").show(); + }); + } + if (res.data[k].MenuName == "娣诲姞瑙掕壊") { + $(function () { + $("#approvalBtn").show(); + }); + } + if (res.data[k].MenuName == "鍒犻櫎瑙掕壊") { + $(function () { + $(".approvalBtndel").show(); + }); + } + } + } + else { + //涓嶆垚鍔� + layer.msg( + "鑾峰彇淇℃伅澶辫触", + { + icon: 2, + time: 2000, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, + function () { + //鍥炶皟 + } + ); + } + }); } sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) { $(function() { @@ -136,7 +188,7 @@ $(function() { $(".approvalBtndel").hide(); }); - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 for (var k = 0; k < res.data.length; k++) @@ -232,7 +284,7 @@ sendData(IP + "/basis/GetRolesList", {}, "get", function (res) { var html = ""; - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 var list = res.data; @@ -298,7 +350,7 @@ Demo: field.Demo, //澶囨敞 }; sendData( IP + "/basis/UpdateRolesInfo", param, "post", function (res) { - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 layer.msg( @@ -365,7 +417,7 @@ Demo: field.Demo, //澶囨敞 }; sendData( IP + "/basis/UpdateRolesInfo", param, "post", function (res) { - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 layer.msg( @@ -416,7 +468,7 @@ doing = false; sendData( IP + "/Basis/DeleteRoleInfo?Roleids=" + data.Id + "", {}, "get", function (res) { console.log(res); - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 layer.msg( @@ -487,7 +539,7 @@ { doing = false; sendData( IP + "/basis/InsertRoleInfo", param, "post", function (res) { - if (res.code == 200) + if (res.code == 0) { //鎴愬姛 layer.msg( -- Gitblit v1.8.0