|
@@ -420,8 +420,6 @@ export default {
|
|
|
wxUserList: [],
|
|
|
// 部门名称
|
|
|
deptName: undefined,
|
|
|
- // 默认密码
|
|
|
- initPassword: undefined,
|
|
|
// 日期范围
|
|
|
dateRange: [],
|
|
|
// 状态数据字典
|
|
@@ -487,6 +485,11 @@ export default {
|
|
|
],
|
|
|
password: [
|
|
|
{ required: true, message: "员工密码不能为空", trigger: "blur" },
|
|
|
+ {
|
|
|
+ pattern: /^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z0-9]).{8,20}$/,
|
|
|
+ message: "密码长度为 8-20 位,必须包含字母、数字和特殊字符",
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ }
|
|
|
],
|
|
|
addressId: [
|
|
|
{ required: true, message: "销售所属区域不能为空", trigger: "blur" },
|
|
@@ -538,9 +541,6 @@ export default {
|
|
|
this.getDicts("company_user_sex").then((response) => {
|
|
|
this.sexOptions = response.data;
|
|
|
});
|
|
|
- this.getConfigKey("sys.user.initPassword").then((response) => {
|
|
|
- this.initPassword = response.msg;
|
|
|
- });
|
|
|
this.getDicts("sys_qw_user_status").then(response => {
|
|
|
this.qwStatusOptions = response.data;
|
|
|
});
|
|
@@ -695,7 +695,7 @@ export default {
|
|
|
this.roleOptions = response.roles;
|
|
|
this.open = true;
|
|
|
this.title = "添加员工";
|
|
|
- this.form.password = this.initPassword;
|
|
|
+ this.form.password = null;
|
|
|
});
|
|
|
},
|
|
|
qwBind(row){
|
|
@@ -753,6 +753,9 @@ export default {
|
|
|
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
+ inputPattern: /^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z0-9]).{8,20}$/,
|
|
|
+ inputErrorMessage: "密码格式错误:需包含字母、数字和特殊字符,长度为 8-20 位",
|
|
|
+ inputPlaceholder: "8-20 位,包含字母、数字和特殊字符"
|
|
|
})
|
|
|
.then(({ value }) => {
|
|
|
resetUserPwd(row.userId, value).then((response) => {
|