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
35 changes: 13 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,17 @@

- [在线体验](#%E5%9C%A8%E7%BA%BF%E4%BD%93%E9%AA%8C)
- [项目地址](#%E9%A1%B9%E7%9B%AE%E5%9C%B0%E5%9D%80)
- [核心功能](#%E6%A0%B8%E5%BF%83%E5%8A%9F%E8%83%BD)
- [快速开始](#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)
- [本地开发](#%E6%9C%AC%E5%9C%B0%E5%BC%80%E5%8F%91)
- [生产部署](#%E7%94%9F%E4%BA%A7%E9%83%A8%E7%BD%B2)
- [文档快链](#%E6%96%87%E6%A1%A3%E5%BF%AB%E9%93%BE)
- [感谢](#%E6%84%9F%E8%B0%A2)
- [另外](#%E5%8F%A6%E5%A4%96)
- [贡献者](#%E8%B4%A1%E7%8C%AE%E8%80%85)
- [加群](#%E5%8A%A0%E7%BE%A4)
- [为什么有这个项目](#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%9C%89%E8%BF%99%E4%B8%AA%E9%A1%B9%E7%9B%AE)
- [捐赠](#%E6%8D%90%E8%B5%A0)
- [使用登记](#%E4%BD%BF%E7%94%A8%E7%99%BB%E8%AE%B0)
- [贡献者](#%E8%B4%A1%E7%8C%AE%E8%80%85)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## 在线体验
## 🏊 在线体验

提供在线体验地址如下:

Expand All @@ -55,14 +53,14 @@

在线环境可能不稳,如果遇到访问异常,或者数据错乱,请联系我进行修复。

## 项目地址
## 👨‍💻 项目地址

| 分类 | GitHub | Gitee |
| :--: | :--------------------------------------------------: | :-------------------------------------------------: |
| 后端 | https://github.com/eryajf/go-ldap-admin.git | https://gitee.com/eryajf-world/go-ldap-admin.git |
| 前端 | https://github.com/eryajf/go-ldap-admin-ui.git | https://gitee.com/eryajf-world/go-ldap-admin-ui.git |

## 文档快链
## 🔗 文档快链

项目相关介绍,使用,最佳实践等相关内容,都会在官方文档呈现,如有疑问,请先阅读官方文档,以下列举以下常用快链。

Expand All @@ -73,7 +71,7 @@
- [本地开发](http://ldapdoc.eryajf.net/pages/cb7497/)
- [生产部署](http://ldapdoc.eryajf.net/pages/5769c4/)

## 感谢
## 🥰 感谢

感谢如下优秀的项目,没有这些项目,不可能会有go-ldap-admin:

Expand All @@ -89,26 +87,26 @@
- 另外感谢
- [go-web-mini](https://github.com/gnimli/go-web-mini):项目基于该项目重构而成,感谢作者的付出。

## 另外
## 🤗 另外

- 如果觉得项目不错,麻烦动动小手点个⭐️star⭐️!
- 如果你还有其他想法或者需求,欢迎在issue中交流!
- 程序还有很多bug,欢迎各位朋友一起协同共建!


## 加群
## 加群

如果想要加群交流,可通过搜索 eryajf 添加我的微信,备注 ldap 拉你进群。

## 捐赠
## 🤑 捐赠

如果你觉得这个项目对你有帮助,你可以请作者喝杯咖啡 ☕️ [点我](http://ldapdoc.eryajf.net/pages/2b6725/)

## 使用登记
## 📝 使用登记

如果你所在公司使用了该项目,烦请在这里留下脚印,感谢支持🥳 [点我](https://github.com/eryajf/go-ldap-admin/issues/18)

## 贡献者
## 🤝 贡献者

<!-- readme: collaborators,contributors -start -->
<table>
Expand All @@ -120,13 +118,6 @@
<sub><b>二丫讲梵</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/OTR37">
<img src="https://avatars.githubusercontent.com/u/51768167?v=4" width="100;" alt="OTR37"/>
<br />
<sub><b>OTR37</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/xinyuandd">
<img src="https://avatars.githubusercontent.com/u/3397848?v=4" width="100;" alt="xinyuandd"/>
Expand Down
9 changes: 9 additions & 0 deletions src/api/personnel/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,12 @@ export function syncDingTalkDeptsApi(data) {
data
})
}

// 同步企业微信部门信息
export function syncWeComDeptsApi(data) {
return request({
url: '/api/group/syncWeComDepts',
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 @@ -59,3 +59,12 @@ export function syncDingTalkUsersApi(data) {
data
})
}

// 同步企业微信用户信息
export function syncWeComUsersApi(data) {
return request({
url: '/api/user/syncWeComUsers',
method: 'post',
data
})
}
25 changes: 21 additions & 4 deletions src/views/personnel/group/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@
<el-form-item>
<el-button :loading="loading" icon="el-icon-search" type="primary" @click="search">查询</el-button>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-button :loading="loading" icon="el-icon-plus" type="warning" @click="resetData">重置</el-button>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button :loading="loading" icon="el-icon-plus" type="warning" @click="create">新增</el-button>
</el-form-item>
<el-form-item>
<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="syncDingTalkDepts">同步钉钉部门</el-button>
</el-form-item>
<el-form-item>
<el-button :loading="loading" icon="el-icon-share" type="danger" @click="syncWeComDepts">同步企业微信部门</el-button>
</el-form-item>
</el-form>

<el-table v-loading="loading" :default-expand-all="true" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" row-key="ID" :data="infoTableData" border stripe style="width: 100%" @selection-change="handleSelectionChange">
Expand Down Expand Up @@ -96,7 +100,7 @@
<script>
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { getGroupTree, groupAdd, groupUpdate, groupDel, syncDingTalkDeptsApi } from '@/api/personnel/group'
import { getGroupTree, groupAdd, groupUpdate, groupDel, syncDingTalkDeptsApi, syncWeComDeptsApi } from '@/api/personnel/group'

export default {
name: 'Group',
Expand Down Expand Up @@ -406,7 +410,20 @@ export default {
})
})
this.loading = false
}
},
syncWeComDepts() {
this.loading = true
syncWeComDeptsApi().then(res => {
this.loading = false
this.getTableData()
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
})
this.loading = false
},
}
}
</script>
Expand Down
21 changes: 19 additions & 2 deletions src/views/personnel/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
<el-form-item>
<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="syncDingTalkUsers">同步钉钉用户信息</el-button>
</el-form-item>
<el-form-item>
<el-button :loading="loading" icon="el-icon-share" type="danger" @click="syncWeComUsers">同步企业微信用户信息</el-button>
</el-form-item>
</el-form>

<el-table v-loading="loading" :data="tableData" border stripe style="width: 100%" @selection-change="handleSelectionChange">
Expand Down Expand Up @@ -184,7 +188,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 } from '@/api/personnel/user'
import { getUsers, createUser, updateUserById, batchDeleteUserByIds, syncDingTalkUsersApi, syncWeComUsersApi } from '@/api/personnel/user'
import { getRoles } from '@/api/system/role'
import { getGroupTree } from '@/api/personnel/group'

Expand Down Expand Up @@ -638,7 +642,20 @@ wLXapv+ZfsjG7NgdawIDAQAB
})
this.getTableData()
this.loading = false
}
},
syncWeComUsers(obj) {
this.loading = true
syncWeComUsersApi().then(res => {
this.loading = false
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
})
this.getTableData()
this.loading = false
},
}
}
</script>
Expand Down