新增登录错误次数参数读取,新增管理端手动解锁用户功能

dev
smallchill 4 years ago
parent f975eaa72d
commit 6f4146288d
  1. 10
      src/api/system/user.js
  2. 45
      src/views/system/user.vue

@ -118,3 +118,13 @@ export const grant = (userIds, roleIds) => {
}
})
}
export const unlock = (userIds) => {
return request({
url: '/api/blade-user/unlock',
method: 'post',
params: {
userIds,
}
})
}

@ -59,6 +59,13 @@
icon="el-icon-setting"
@click="handlePlatform">平台配置
</el-button>
<el-button type="info"
size="small"
plain
v-if="userInfo.role_name.includes('admin')"
icon="el-icon-coordinate"
@click="handleLock">账号解封
</el-button>
<el-button type="success"
size="small"
plain
@ -159,17 +166,17 @@
</template>
<script>
import {
getList,
getUser,
getUserPlatform,
remove,
update,
updatePlatform,
add,
grant,
resetPassword
} from "@/api/system/user";
import {
getList,
getUser,
getUserPlatform,
remove,
update,
updatePlatform,
add,
grant,
resetPassword, unlock
} from "@/api/system/user";
import {getDeptTree, getDeptLazyTree} from "@/api/system/dept";
import {getRoleTree} from "@/api/system/role";
import {getPostList} from "@/api/system/post";
@ -860,6 +867,22 @@
handlePlatform() {
this.platformBox = true;
},
handleLock() {
this.$confirm("确定将选择账号解封?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return unlock(this.ids);
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleImport() {
this.excelBox = true;
},

Loading…
Cancel
Save