yyk
2024-08-22 1310b47a24f0cc70f0128c820bd490dca6a1a921
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(