切换导航条
此项目
正在载入...
登录
朱兆平
/
vue_cli
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
朱兆平
5 years ago
提交
a38106fef49b3d345327db6c25114feb40c432ca
1 个父辈
ccb8ed1f
增加用户重置密码
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
27 行增加
和
2 行删除
src/views/nav1/user.vue
src/views/nav1/user.vue
查看文件 @
a38106f
...
...
@@ -40,8 +40,9 @@
</el-table-column>
<el-table-column label="操作" width="250">
<template slot-scope="scope">
<el-button size="small" @click="roleEdit(scope.$index, scope.row)">角色配置</el-button>
<el-button size="small" @click="roleEdit(scope.$index, scope.row)"
type="primary"
>角色配置</el-button>
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="small" @click="resetUserPass(scope.$index, scope.row)" type="warning">重置密码</el-button>
<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
...
...
@@ -165,7 +166,7 @@
<script>
import util from '../../common/js/util'
import NProgress from 'nprogress'
import {
getUserList, removeUser, batchRemoveUser, editUser, addUser, setUserRole
} from '../../api/user';
import {
getUserList, removeUser, batchRemoveUser, editUser, addUser, setUserRole, editPass
} from '../../api/user';
import { getList} from '../../api/role_api';
import { getList as getRoleList} from '../../api/role_api';
import moment from 'moment'
...
...
@@ -328,6 +329,30 @@
this.editFormVisible = true;
this.editForm = Object.assign({}, row);
},
/**
* 重置用户密码
* @param index
* @param row
*/
resetUserPass: function(index,row){
this.editForm = Object.assign({}, row);
this.editForm.password= 'zzairport@kako2020';
editPass(this.editForm).then(res=>{
let response=res.data;
if(response.code=='200'){
this.$notify({
title: '密码修改成功',
message: '密码修改成功,退出请重新登录',
type: 'success'
});
}else{
this.$notify.error({
title: '密码修改失败',
message: '密码修改失败!!!'
});
}
});
},
roleEdit: function (index, row) {
this.roleFormVisible = true;
this.getRoles();
...
...
请
注册
或
登录
后发表评论