|
@@ -203,7 +203,7 @@ class UserManagement extends BaseWidget {
|
|
|
Obj.domObj.find(".name").attr("readonly", "readonly");
|
|
|
this.initPopeVue("update");
|
|
|
this.getUnit("edit");
|
|
|
- this.vueObject.popVue.data.password = "Q_QQaQQyQQ";
|
|
|
+
|
|
|
|
|
|
(<any>$('#widget-UserManagementAddInfo')).bootstrapValidator();
|
|
|
Obj.submitObj.off("click").on("click", function (e) {
|
|
@@ -771,7 +771,7 @@ class UserManagement extends BaseWidget {
|
|
|
if (!that.checkInput("联系电话", this.data.phone, /[0-9]{11}/)) {
|
|
|
return;
|
|
|
}
|
|
|
- if (!that.checkInput("密码", this.data.password, /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9!@#$%&+-]{12,}$/)) {
|
|
|
+ if (!that.checkInput("密码", this.data.password, /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9!@#$%&+-]{12,}$/, '密码位数至少12位,必须包含大小写字母和数字,不可包含非法字符!')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -833,7 +833,7 @@ class UserManagement extends BaseWidget {
|
|
|
if (!that.checkInput("联系电话", this.data.phone, /[0-9]{11}/)) {
|
|
|
return;
|
|
|
}
|
|
|
- if (!that.checkInput("密码", this.data.password, /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9!@#$%&+-]{12,}$/)) {
|
|
|
+ if (!that.checkInput("密码", this.data.password, /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9!@#$%&+-]{12,}$/, '密码位数至少12位,必须包含大小写字母和数字,不可包含非法字符!')) {
|
|
|
return;
|
|
|
}
|
|
|
if (!that.checkInput("单位", this.data.deptid)) {
|
|
@@ -1027,9 +1027,10 @@ class UserManagement extends BaseWidget {
|
|
|
* @param title 数据名称
|
|
|
* @param results 数据
|
|
|
* @param type 数据类型(选填) 正则表达式
|
|
|
+ * @param errMsg 错误提示
|
|
|
* @returns 返回true或者false(true正常,false返回数据异常)
|
|
|
*/
|
|
|
- checkInput(title, results, type?: RegExp) {
|
|
|
+ checkInput(title, results, type?: RegExp, errMsg?: string) {
|
|
|
if (type == undefined) {
|
|
|
if (results == undefined || results == null || results == "") {
|
|
|
this.toast.show(title + "不能为空")
|
|
@@ -1041,7 +1042,7 @@ class UserManagement extends BaseWidget {
|
|
|
if (type.test(results)) {
|
|
|
return results;
|
|
|
} else {
|
|
|
- this.toast.show(title + "格式错误")
|
|
|
+ this.toast.show(errMsg || title + "格式错误")
|
|
|
return false;
|
|
|
}
|
|
|
}
|