|
|
@@ -68,7 +68,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog :title="editTitle" :visible.sync="dialogFormVisible" width="40%">
|
|
|
+ <el-dialog :title="editTitle" :visible.sync="dialogFormVisible" width="40%" @close='btnX'>
|
|
|
<div class="add-con">
|
|
|
<div class="add-left">
|
|
|
<el-form ref="userform" :rules="rules" :model="form">
|
|
|
@@ -138,7 +138,7 @@
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="save">保 存</el-button>
|
|
|
- <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="btnX">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -223,6 +223,12 @@ export default {
|
|
|
rules: {
|
|
|
userName: [
|
|
|
{ required: true, message: "请输入用户账号", trigger: "blur" },
|
|
|
+ {
|
|
|
+ pattern: /^[0-9a-zA-Z_]*$/,
|
|
|
+ message: '仅能输入数字、字母',
|
|
|
+ trigger: 'blur'
|
|
|
+ },
|
|
|
+ { max: 10, message: '不能超过10个字符', trigger: 'blur' }
|
|
|
],
|
|
|
nickName: [
|
|
|
{ required: true, message: "请输入用户昵称", trigger: "blur" },
|
|
|
@@ -274,7 +280,7 @@ export default {
|
|
|
url:`/manage/user/resetPass/${item.id}`
|
|
|
}).then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
- this.$alert("重置成功", "提示", {
|
|
|
+ this.$alert("重置成功,默认密码123456", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
callback: () => {},
|
|
|
});
|
|
|
@@ -336,7 +342,12 @@ export default {
|
|
|
}
|
|
|
this.loading = this.$loading(this.loadOption)
|
|
|
},
|
|
|
-
|
|
|
+ //点击取消
|
|
|
+ btnX(){
|
|
|
+ //清除表单验证
|
|
|
+ this.$refs.userform.resetFields()
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ },
|
|
|
async save() {
|
|
|
this.$refs["userform"].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
@@ -369,7 +380,7 @@ export default {
|
|
|
});
|
|
|
|
|
|
if (result.code === 0) {
|
|
|
- this.$alert("操作成功", "提示", {
|
|
|
+ this.$alert("操作成功,默认密码123456", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
callback: () => {
|
|
|
this.getInformation();
|