Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/api/personnel/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,20 @@ export function syncWeComDeptsApi(data) {
})
}

// 同步企业微信部门信息
// 同步飞书部门信息
export function syncFeiShuDeptsApi(data) {
return request({
url: '/api/group/syncFeiShuDepts',
method: 'post',
data
})
}

// 同步openldap部门信息
export function syncOpenLdapDeptsApi(data) {
return request({
url: '/api/group/syncOpenLdapDepts',
method: 'post',
data
})
}
9 changes: 9 additions & 0 deletions src/api/personnel/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,12 @@ export function syncFeiShuUsersApi(data) {
data
})
}

// 同步openldap用户信息
export function syncOpenLdapUsersApi(data) {
return request({
url: '/api/user/syncOpenLdapUsers',
method: 'post',
data
})
}
18 changes: 17 additions & 1 deletion src/views/personnel/group/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<el-button :disabled="multipleSelection.length === 0" :loading="loading" icon="el-icon-delete" type="danger" @click="batchDelete">批量删除</el-button>
</el-form-item>
<br>
<el-form-item>
<el-button :loading="loading" icon="el-icon-share" type="danger" @click="syncOpenLdapDepts">同步原ldap部门</el-button>
</el-form-item>
<el-form-item>
<el-button :loading="loading" icon="el-icon-share" type="danger" @click="syncDingTalkDepts">同步钉钉部门</el-button>
</el-form-item>
Expand Down Expand Up @@ -103,7 +106,7 @@
<script>
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { getGroupTree, groupAdd, groupUpdate, groupDel, syncDingTalkDeptsApi, syncWeComDeptsApi, syncFeiShuDeptsApi } from '@/api/personnel/group'
import { getGroupTree, groupAdd, groupUpdate, groupDel, syncDingTalkDeptsApi, syncWeComDeptsApi, syncFeiShuDeptsApi, syncOpenLdapDeptsApi } from '@/api/personnel/group'

export default {
name: 'Group',
Expand Down Expand Up @@ -440,6 +443,19 @@ export default {
})
this.loading = false
},
syncOpenLdapDepts() {
this.loading = true
syncOpenLdapDeptsApi().then(res => {
this.loading = false
this.getTableData()
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
})
this.loading = false
},
}
}
</script>
Expand Down
18 changes: 17 additions & 1 deletion src/views/personnel/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<el-button :disabled="multipleSelection.length === 0" :loading="loading" icon="el-icon-delete" type="danger" @click="batchDelete">批量删除</el-button>
</el-form-item>
<br>
<el-form-item>
<el-button :loading="loading" icon="el-icon-share" type="danger" @click="syncOpenLdapUsers">同步原ldap用户信息</el-button>
</el-form-item>
<el-form-item>
<el-button :loading="loading" icon="el-icon-share" type="danger" @click="syncDingTalkUsers">同步钉钉用户信息</el-button>
</el-form-item>
Expand Down Expand Up @@ -191,7 +194,7 @@
import JSEncrypt from 'jsencrypt'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { getUsers, createUser, updateUserById, batchDeleteUserByIds, syncDingTalkUsersApi, syncWeComUsersApi, syncFeiShuUsersApi } from '@/api/personnel/user'
import { getUsers, createUser, updateUserById, batchDeleteUserByIds, syncDingTalkUsersApi, syncWeComUsersApi, syncFeiShuUsersApi, syncOpenLdapUsersApi } from '@/api/personnel/user'
import { getRoles } from '@/api/system/role'
import { getGroupTree } from '@/api/personnel/group'

Expand Down Expand Up @@ -672,6 +675,19 @@ wLXapv+ZfsjG7NgdawIDAQAB
this.getTableData()
this.loading = false
},
syncOpenLdapUsers(obj) {
this.loading = true
syncOpenLdapUsersApi().then(res => {
this.loading = false
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
})
this.getTableData()
this.loading = false
},
}
}
</script>
Expand Down