账户管理添加重置密码

This commit is contained in:
shijing 2023-03-16 09:43:04 +08:00
parent c6c6a8d321
commit 60d6e00f2b
2 changed files with 24 additions and 2 deletions

View File

@ -202,7 +202,6 @@ export default {
}
},
put:{
url: `${config.API_URL}/system/user/password/`,
name: "修改密码",
req: async function(data){
@ -214,6 +213,12 @@ export default {
req: async function(id){
return await http.delete(`${config.API_URL}/system/user/${id}/`);
}
},
rPassword: {
name: "重置密码",
req: async function( id){
return await http.post(`${config.API_URL}/system/user/${id}/reset_password/`);
}
}
},
post: {

View File

@ -138,12 +138,21 @@
<el-button
link
size="small"
type="warning"
@click="formEdit(scope.row, '2')"
v-auth="'user.update'"
>
编辑
</el-button>
<el-button
link
size="small"
type="danger"
@click="formReset(scope.row)"
v-auth="'user.update'"
>
重置密码
</el-button>
<!-- <el-popconfirm
title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)"
@ -337,6 +346,14 @@ export default {
this.limitedVisible = true;
this.addForm = {};
},
//
formReset(row){
this.$API.system.user.rPassword.req(row.id).then(res=>{
this.$message.success("重置成功");
}).catch(err=>{
})
},
//
formEdit(row, index) {
console.log(row);