|
@@ -183,7 +183,7 @@
|
|
|
content="更多"
|
|
|
placement="top"
|
|
|
>
|
|
|
- <el-dropdown trigger="click">
|
|
|
+ <el-dropdown trigger="click" @command="(command) => handleMore(command, scope.row)">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
@@ -192,13 +192,7 @@
|
|
|
title="更多"
|
|
|
/>
|
|
|
<el-dropdown-menu class="dropdown-menu" slot="dropdown">
|
|
|
- <el-dropdown-item>重置密码</el-dropdown-item>
|
|
|
- <el-popconfirm
|
|
|
- icon="el-icon-info"
|
|
|
- icon-color="red"
|
|
|
- title="确定要重置吗?"
|
|
|
- >
|
|
|
- </el-popconfirm>
|
|
|
+ <el-dropdown-item command="reset">重置密码</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-tooltip>
|
|
@@ -231,7 +225,7 @@
|
|
|
import waves from "@/directive/waves";
|
|
|
import swPage from "@/views/common/swPage";
|
|
|
import { dynamicTree } from "@/api/auth/position";
|
|
|
-import { fetchList, deleteUser } from "@/api/auth/user";
|
|
|
+import { fetchList, deleteUser,resetPwd } from "@/api/auth/user";
|
|
|
import { positionCategory, userStatus } from "@/constants/index";
|
|
|
import { getValueByKey } from "@/utils/index";
|
|
|
import addUserEditDialog from "./components/addUserEditDialog";
|
|
@@ -351,7 +345,6 @@ export default {
|
|
|
this.addUserEditDialogDatas.visible = true;
|
|
|
this.addUserEditDialogDatas.orgData = row;
|
|
|
},
|
|
|
-
|
|
|
handleDelete(row) {
|
|
|
//删除
|
|
|
this.$confirm("确定删除用户?", "提示", {
|
|
@@ -370,6 +363,29 @@ export default {
|
|
|
this.list.splice(index, 1); //数值删除
|
|
|
});
|
|
|
});
|
|
|
+ },
|
|
|
+ handleMore(command,row) {
|
|
|
+ //更多
|
|
|
+ if(command === 'reset') {
|
|
|
+ this.handleResetPwd(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleResetPwd(row) {
|
|
|
+ //重置密码
|
|
|
+ this.$confirm("确定重置密码?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ resetPwd([{ userId: row.id }]).then(() => {
|
|
|
+ this.$notify({
|
|
|
+ title: "成功",
|
|
|
+ message: "重置成功",
|
|
|
+ type: "success",
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|