账户管理添加重置密码
This commit is contained in:
parent
c6c6a8d321
commit
60d6e00f2b
|
@ -202,7 +202,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
put:{
|
put:{
|
||||||
|
|
||||||
url: `${config.API_URL}/system/user/password/`,
|
url: `${config.API_URL}/system/user/password/`,
|
||||||
name: "修改密码",
|
name: "修改密码",
|
||||||
req: async function(data){
|
req: async function(data){
|
||||||
|
@ -214,6 +213,12 @@ export default {
|
||||||
req: async function(id){
|
req: async function(id){
|
||||||
return await http.delete(`${config.API_URL}/system/user/${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: {
|
post: {
|
||||||
|
|
|
@ -138,12 +138,21 @@
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
type="warning"
|
||||||
@click="formEdit(scope.row, '2')"
|
@click="formEdit(scope.row, '2')"
|
||||||
v-auth="'user.update'"
|
v-auth="'user.update'"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
type="danger"
|
||||||
|
@click="formReset(scope.row)"
|
||||||
|
v-auth="'user.update'"
|
||||||
|
>
|
||||||
|
重置密码
|
||||||
|
</el-button>
|
||||||
<!-- <el-popconfirm
|
<!-- <el-popconfirm
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
@confirm="table_del(scope.row, scope.$index)"
|
@confirm="table_del(scope.row, scope.$index)"
|
||||||
|
@ -337,6 +346,14 @@ export default {
|
||||||
this.limitedVisible = true;
|
this.limitedVisible = true;
|
||||||
this.addForm = {};
|
this.addForm = {};
|
||||||
},
|
},
|
||||||
|
//重置密码
|
||||||
|
formReset(row){
|
||||||
|
this.$API.system.user.rPassword.req(row.id).then(res=>{
|
||||||
|
this.$message.success("重置成功");
|
||||||
|
}).catch(err=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
//编辑
|
//编辑
|
||||||
formEdit(row, index) {
|
formEdit(row, index) {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
|
|
Loading…
Reference in New Issue