Browse Source

组织管理增加用户解锁登录的按钮

unknown 5 years ago
parent
commit
ef4fdd116a

+ 12 - 0
o2web/source/x_component_Org/$Explorer/default/css.wcss

@@ -350,6 +350,18 @@
                 "text-align": "center",
                 "cursor": "pointer"
             },
+          "titleInforUnlockPersonNode": {
+            "width": "80px",
+            "margin-right" : "10px",
+            "float": "right",
+            "border": "1px solid #999999",
+            "background-color": "#f1f1f1",
+            "height": "24px",
+            "line-height": "24px",
+            "border-radius": "5px",
+            "text-align": "center",
+            "cursor": "pointer"
+          },
             "titleInforSignatureNode": {
                 "height": "55px",
                 "font-size": "14px",

+ 21 - 0
o2web/source/x_component_Org/PersonExplorer.js

@@ -520,6 +520,9 @@ MWF.xApplication.Org.PersonExplorer.PersonContent.TitleInfor = new Class({
         if (MWF.AC.isOrganizationManager() || MWF.AC.isPersonManager()){
             this.resetPasswordAction = new Element("div", {"styles": this.style.titleInforResetPasswordNode, "text": this.item.explorer.app.lp.resetPassword}).inject(this.nameNode, "before");
             this.resetPasswordAction.addEvent("click", function(e){this.resetPassword(e);}.bind(this));
+
+            this.unlockPersonAction = new Element("div", {"styles": this.style.titleInforUnlockPersonNode, "text": this.item.explorer.app.lp.unlockPerson}).inject(this.nameNode, "before");
+            this.unlockPersonAction.addEvent("click", function(e){this.unlockPerson(e);}.bind(this));
         }
         if (this.data.control.allowEdit){
             this.iconNode.setStyle("cursor", "pointer");
@@ -545,6 +548,24 @@ MWF.xApplication.Org.PersonExplorer.PersonContent.TitleInfor = new Class({
             this.item.explorer.app.notice(text, "success");
         }.bind(this));
     },
+    unlockPerson : function(e){
+        var _self = this;
+        var text = this.item.explorer.app.lp.unlockPersonText;
+        text = text.replace("{name}", this.data.name);
+        this.item.explorer.app.confirm("info", e, this.item.explorer.app.lp.unlockPersonTitle, text, "360", "120", function(){
+            _self.doUnlockPerson();
+            this.close();
+        }, function(){
+            this.close();
+        });
+    },
+    doUnlockPerson: function(){
+        MWF.Actions.load("x_organization_assemble_control").PersonAction.unlockPerson(this.data.id, function(){
+            var text = this.item.explorer.app.lp.unlockPersonSuccess;
+            text = text.replace("{name}", this.data.name);
+            this.item.explorer.app.notice(text, "success");
+        }.bind(this));
+    },
     changePersonIcon: function(){
         var options = {};
         var width = "668";

+ 5 - 0
o2web/source/x_component_Org/lp/en.js

@@ -213,6 +213,11 @@ MWF.xApplication.Org.LP = {
     "personReadCreate": "用户创建于{date},最后修改于:{date2}",
     "personReadPassword": "密码到期时间{date},密码最后修改于:{date2}",
 
+    "unlockPerson" : "解锁登录",
+    "unlockPersonTitle": "解锁登录确认",
+    "unlockPersonText": "“{name}”输错密码已经超过规定次数,允许再次登录?",
+    "unlockPersonSuccess" : "用户 {name} 已经可以登录了!",
+
     "attributeName": "属性",
 	"attributeValue": "值",
 

+ 5 - 0
o2web/source/x_component_Org/lp/zh-cn.js

@@ -218,6 +218,11 @@ MWF.xApplication.Org.LP = {
     "roleName": "角色名",
     "roleFullName": "角色全称",
 
+    "unlockPerson" : "解锁登录",
+    "unlockPersonTitle": "解锁登录确认",
+    "unlockPersonText": "“{name}”输错密码已经超过规定次数,允许再次登录?",
+    "unlockPersonSuccess" : "用户 {name} 已经可以登录了!",
+
     "attributeName": "属性",
     "attributeValue": "值",