调整 业务

This commit is contained in:
2026-09-16 23:43:12 +08:00
parent c1c4fa18c9
commit 84d9e098ba
9 changed files with 795 additions and 366 deletions
+38 -1
View File
@@ -22,6 +22,14 @@
@tree-load="treeLoad"
>
<template #menu-left>
<el-button
type="primary"
plain
:loading="iamSyncLoading"
v-if="userInfo.authority.includes('admin')"
@click="handleIamOrganizationSync"
>同步组织
</el-button>
<el-button
type="danger"
icon="el-icon-delete"
@@ -120,7 +128,15 @@
</template>
<script>
import { getLazyList, remove, update, add, getDept, getDeptTree } from '@/api/system/dept';
import {
getLazyList,
remove,
update,
add,
getDept,
getDeptTree,
syncIamOrganizations,
} from '@/api/system/dept';
import { getLeaderList } from '@/api/system/user';
import { getList as getCustomerArchiveList } from '@/api/vehicle/customer-archive';
import { mapGetters } from 'vuex';
@@ -152,6 +168,7 @@ export default {
selectionList: [],
query: {},
loading: true,
iamSyncLoading: false,
parentId: 0,
page: {
pageSize: 10,
@@ -691,6 +708,26 @@ export default {
done(row);
});
},
handleIamOrganizationSync() {
this.$confirm('确定从IAM同步组织信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.iamSyncLoading = true;
return syncIamOrganizations();
})
.then(res => {
const count = res?.data?.data ?? 0;
this.$message.success(`IAM组织同步完成,共处理${count}`);
this.parentId = 0;
this.onLoad(this.page, this.query);
})
.finally(() => {
this.iamSyncLoading = false;
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');