重置密码修改
This commit is contained in:
@@ -516,26 +516,10 @@ export default {
|
|||||||
return row.id !== this.user.id
|
return row.id !== this.user.id
|
||||||
},
|
},
|
||||||
resetPassword(row) {
|
resetPassword(row) {
|
||||||
row.password = null
|
row.password = '123456'
|
||||||
this.$prompt('', '重置密码', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
inputPlaceholder: '请输入新的密码',
|
|
||||||
inputPattern: /^[A-Z|a-z|0-9|(._~!@#$^&*)]{6,20}$/,
|
|
||||||
inputErrorMessage: '密码格式不正确,只能是6-20位密码',
|
|
||||||
closeOnClickModal: false
|
|
||||||
}).then(({ value }) => {
|
|
||||||
row.password = value
|
|
||||||
crudUser.edit(row).then(res => {
|
crudUser.edit(row).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.crud.notify('密码重置成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('密码重置成功,密码:123456', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '取消输入'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user