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

dev
smallchill 4 years ago
parent f975eaa72d
commit 6f4146288d
  1. 10
      src/api/system/user.js
  2. 29
      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" icon="el-icon-setting"
@click="handlePlatform">平台配置 @click="handlePlatform">平台配置
</el-button> </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" <el-button type="success"
size="small" size="small"
plain plain
@ -159,7 +166,7 @@
</template> </template>
<script> <script>
import { import {
getList, getList,
getUser, getUser,
getUserPlatform, getUserPlatform,
@ -168,8 +175,8 @@
updatePlatform, updatePlatform,
add, add,
grant, grant,
resetPassword resetPassword, unlock
} from "@/api/system/user"; } from "@/api/system/user";
import {getDeptTree, getDeptLazyTree} from "@/api/system/dept"; import {getDeptTree, getDeptLazyTree} from "@/api/system/dept";
import {getRoleTree} from "@/api/system/role"; import {getRoleTree} from "@/api/system/role";
import {getPostList} from "@/api/system/post"; import {getPostList} from "@/api/system/post";
@ -860,6 +867,22 @@
handlePlatform() { handlePlatform() {
this.platformBox = true; this.platformBox = true;
}, },
handleLock() {
this.$confirm("确定将选择账号解封?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return unlock(this.ids);
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleImport() { handleImport() {
this.excelBox = true; this.excelBox = true;
}, },

Loading…
Cancel
Save