-
+
+
@@ -31,15 +32,18 @@
+
+
+
-
+
@@ -66,6 +70,7 @@
+
@@ -81,10 +86,6 @@
-
-
-
-
-
+
+
+
+
+
+
+
- -->
+
@@ -123,14 +127,15 @@
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsTableOperator, MsDialogFooter},
data() {
return {
- /*input:'',*/
queryPath: '/user/special/list',
deletePath: '/user/special/delete/',
createPath: '/user/special/add',
updatePath: '/user/special/update',
+ editPasswordPath:'/user/special/password',
result: {},
createVisible: false,
updateVisible: false,
+ editPasswordVisible:false,
multipleSelection: [],
currentPage: 1,
pageSize: 5,
@@ -139,6 +144,7 @@
condition: {},
tableData: [],
form: {},
+ ruleForm: {},
rule: {
id: [
{required: true, message: this.$t('user.input_id'), trigger: 'blur'},
@@ -179,6 +185,15 @@
message: this.$t('member.password_format_is_incorrect'),
trigger: 'blur'
}
+ ],
+ newpassword: [
+ {required: true, message: this.$t('user.input_password'), trigger: 'blur'},
+ {
+ required:true,
+ pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/,
+ message: this.$t('member.password_format_is_incorrect'),
+ trigger: 'blur'
+ }
]
}
}
@@ -194,6 +209,10 @@
this.updateVisible = true;
this.form = Object.assign({}, row);
},
+ editPassword(row){
+ this.editPasswordVisible=true;
+ this.ruleForm = Object.assign({}, row);
+ },
del(row) {
this.$confirm(this.$t('user.delete_confirm'), '', {
confirmButtonText: this.$t('commons.confirm'),
@@ -234,6 +253,20 @@
}
})
},
+ editUserPassword(editPasswordForm){
+ this.$refs[editPasswordForm].validate(valide=>{
+ if(valide){
+ this.result = this.$post(this.editPasswordPath, this.ruleForm, response => {
+ this.$success(this.$t('commons.modify_success'));
+ this.editPasswordVisible = false;
+ this.search() ;
+ window.location.reload();
+ });
+ }else {
+ return false;
+ }
+ })
+ },
search() {
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
let data = response.data;
@@ -260,5 +293,7 @@
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 2e8fceefb6..9ea2a7f6e9 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -97,7 +97,6 @@ export default {
'mobile_number_format_is_incorrect': 'Mobile number format is incorrect',
'email_format_is_incorrect': 'Email format is incorrect',
'password_format_is_incorrect': 'Password format is incorrect (At least 8-16 characters, at least 1 uppercase letter, 1 lowercase letter and 1 number)',
- 'password_format_is_incorrect':'Password format is incorrect (At least 8-16 characters, at least 1 uppercase letter, 1 lowercase letter and 1 number)',
'old_password':'Old Password',
'new_password':'New Password',
},