From c3acb0bf589ba6de244e4eae737152688e5d3e61 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期三, 23 十一月 2022 16:41:29 +0800 Subject: [PATCH] 优化待审核页面 --- web/web/SysUser.aspx | 104 +++++++++++++++++++++++++++++++++------------------- 1 files changed, 66 insertions(+), 38 deletions(-) diff --git a/web/web/SysUser.aspx b/web/web/SysUser.aspx index 5697391..11ee926 100644 --- a/web/web/SysUser.aspx +++ b/web/web/SysUser.aspx @@ -18,32 +18,34 @@ var html = []; $.each(result.Message.Table, function(i) { html.push("<tr>"); - html.push("<td>" + this.Account + "</td>"); + html.push("<td>" + this.Account + "</td>"); html.push("<td>" + this.UserName + "</td>"); - if (this.UserType == 1) { - html.push("<td>" + "绠$悊鍛�" + "</td>"); - } - else if (this.UserType == 2) { - html.push("<td>" + "涓氬姟鍛�" + "</td>"); - } - else if (this.UserType == 3) { - html.push("<td>" + "涓氬姟涓荤" + "</td>"); - } - else if (this.UserType == 4) { - html.push("<td>" + "涓氬姟鎬荤洃" + "</td>"); - } - else if (this.UserType == 5) { - html.push("<td>" + "瀹㈡湇浜哄憳" + "</td>"); - } - else if (this.UserType == 6) { - html.push("<td>" + "璐㈠姟浜哄憳" + "</td>"); - } - else if (this.UserType == 99) { - html.push("<td>" + "鍏朵粬" + "</td>"); - } - else { - html.push("<td>" + "" + "</td>"); - } + html.push("<td>" + this.RoleNames + "</td>"); + + //if (this.UserType == 1) { + // html.push("<td>" + "绠$悊鍛�" + "</td>"); + //} + //else if (this.UserType == 2) { + // html.push("<td>" + "涓氬姟鍛�" + "</td>"); + //} + //else if (this.UserType == 3) { + // html.push("<td>" + "涓氬姟涓荤" + "</td>"); + //} + //else if (this.UserType == 4) { + // html.push("<td>" + "涓氬姟鎬荤洃" + "</td>"); + //} + //else if (this.UserType == 5) { + // html.push("<td>" + "瀹㈡湇浜哄憳" + "</td>"); + //} + //else if (this.UserType == 6) { + // html.push("<td>" + "璐㈠姟浜哄憳" + "</td>"); + //} + //else if (this.UserType == 99) { + // html.push("<td>" + "鍏朵粬" + "</td>"); + //} + //else { + // html.push("<td>" + "" + "</td>"); + //} html.push("<td>" + this.Mobile + "</td>"); html.push("<td>" + formatFlagIcon(this.MobileFlag) + "</td>"); @@ -131,6 +133,13 @@ var isVerification = $("#userDialog #isVerification").prop("checked"); var clientIp = $("#userDialog #clientIp").val(); + var userRoleArray = []; + $("#userDialog #_UserRole").each(function () { + if ($(this).is(":checked")) { + userRoleArray.push($(this).val()); + } + }); + userType = $.toJSON(userRoleArray); $.post("sysuser.ashx", { action: "saveUser", userid: userid, account: account, password: password, userName: userName, userType: userType, mobile: mobile, email: email, mobileFlag: mobileFlag, emailFlag: emailFlag, isVerification: isVerification, clientIp: clientIp }, function(result) { @@ -149,7 +158,9 @@ $("#userDialog #account").val(""); //$("#userDialog #password").val(""); $("#userDialog #userName").val(""); - $("#userDialog #userType").val(""); + //$("#userDialog #userType").val(""); + $("#userDialog #_UserRole").iCheck("uncheck"); + $("#userDialog #mobile").val(""); $("#userDialog #email").val(""); $("#userDialog input[name=isVerification]").iCheck("uncheck"); @@ -170,9 +181,9 @@ } else { $("#permissionDialog").data("id", id); - $("#permissionDialog #MenuID").prop("checked", false); + $("#permissionDialog #MenuID").prop("checked", false).attr("disabled", "disabled"); $.each(result.Message, function(i) { - $("#permissionDialog #MenuID[value='" + this + "']").prop("checked", true); + $("#permissionDialog #MenuID[value='" + this + "']").prop("checked", true).attr("disabled", "disabled"); }); } $("#permissionDialog").modal("show"); @@ -232,13 +243,26 @@ //缂栬緫鏃跺瘑鐮佹闅愯棌 $(".pwdCss").hide(); $("#userDialog #userName").val(user.UserName); - $("#userDialog #userType").val(user.UserType); + //$("#userDialog #userType").val(user.UserType); + $.get("sysuser.ashx", { action: "arrayStrToDict", "userId": id, "userType": user.UserType }, function (r) { + if (!r.OK) { + mytek.alert(r.Message, r.OK); + } + else { + $("#userDialog #_UserRole").prop("checked", false); + $.each(r.Message, function (i) { + $("#userDialog #_UserRole[value='" + this + "']").prop("checked", true); + }); + } + }, "json"); + $("#userDialog #mobile").val(user.Mobile); $("#userDialog #email").val(user.Email); $("#userDialog #emailFlag").val(user.EmailFlag); $("#userDialog #mobileFlag").val(user.MobileFlag); $("#userDialog #isVerification").iCheck(user.IsVerification == 1 ? "check" : "uncheck"); $("#userDialog #clientIp").val(user.ClientIp); + $("#userDialog").modal("show"); }, "json"); }); @@ -415,17 +439,18 @@ <label class="col-sm-2 control-label"> 璐︽埛绫诲瀷 <span style="color:red">*</span> </label> - <div class="col-sm-4"> + <div class="col-sm-10"> + <%=UserRoleList() %> + <!-- <select name="userType" id="userType" class="form-control"> <option value=""></option> <option value="1">绠$悊鍛�</option> <option value="2">涓氬姟鍛�</option> - <option value="3">涓氬姟涓荤</option> - <option value="4">涓氬姟鎬荤洃</option> - <option value="5">瀹㈡湇浜哄憳</option> - <option value="6">璐㈠姟浜哄憳</option> - <option value="99">鍏朵粬</option> + <option value="3">瀹㈡埛缁忕悊</option> + <option value="4">瀹㈡湇浜哄憳</option> + <option value="5">璐㈠姟浜哄憳</option> </select> + --> </div> </div> <div class="form-group"> @@ -497,7 +522,7 @@ <div class="modal-dialog"> <div class="modal-content animated bounceInRight"> <div class="modal-header"> - <span class="title">璁剧疆璐︽埛鏉冮檺</span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a></div> + <span class="title">鏌ョ湅璐︽埛鏉冮檺</span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a></div> <div class="modal-body"> <%=RenderFunctionTree() %> @@ -505,8 +530,10 @@ <div class="modal-footer"> <button class="btn-default btn" data-dismiss="modal" aria-hidden="true"> 鍙栨秷</button> + <!-- <button class="btn btn-primary action-update-permission"> 淇濆瓨</button> + --> </div> </div> </div> @@ -621,6 +648,7 @@ <div id="mask" class="mask"> <span></span> - <img src="img/spinning-circles.svg" alt="杞藉叆涓�..." /></div> - </div> + <img src="img/spinning-circles.svg" alt="杞藉叆涓�..." /> + + </div> </asp:Content> \ No newline at end of file -- Gitblit v1.9.1