调整 iam

This commit is contained in:
2026-09-16 06:30:30 +08:00
parent 6a87066097
commit c1c4fa18c9
26 changed files with 1517 additions and 666 deletions
+29
View File
@@ -56,6 +56,14 @@
@click="handleAudit"
>
</el-button>
<el-button
type="primary"
plain
:loading="iamSyncLoading"
v-if="userInfo.authority.includes('admin') && !auditMode"
@click="handleIamSync"
>同步人员
</el-button>
<el-button
type="success"
plain
@@ -348,6 +356,7 @@ import {
remove,
update,
add,
syncIamAccounts,
grant,
resetPassword,
setPassword,
@@ -393,6 +402,7 @@ export default {
selectionList: [],
query: {},
loading: true,
iamSyncLoading: false,
page: {
pageSize: 10,
currentPage: 1,
@@ -553,6 +563,25 @@ export default {
this.handleExport();
}
},
handleIamSync() {
this.$confirm('确定从IAM同步人员信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.iamSyncLoading = true;
return syncIamAccounts();
})
.then(res => {
const count = res?.data?.data ?? 0;
this.$message.success(`IAM人员同步完成,共处理${count}`);
this.onLoad(this.page, this.query);
})
.finally(() => {
this.iamSyncLoading = false;
});
},
handleSetLeader(row) {
const tip = row.isLeader === 1 ? '确定取消用户的主管职务?' : '确定设置用户为主管职务?';
const message = row.isLeader === 1 ? '取消主管成功!' : '设置主管成功!';