feat(admin): 部门管理改为左树右成员面板的 OA 组织口径

This commit is contained in:
HTEWJ\26070045 committed 2026-10-22 09:08:04 +08:00
1 parent 396f17a15a
commit 194a51bc2d
13 files changed
+540 -313

No files matched your search

+8 -2
View File
@@ -38,9 +38,15 @@ def create_department():
@admin_bp.route('/departments/<int:id>/members', methods=['GET'])
@require_admin
def list_department_members(id: int):
"""返回部门员工数量与名单;include_descendants=1 时含全部下级部门成员。"""
"""部门员工分页名单(OA 组织面板口径):include_descendants=1 含下级,keyword 搜姓名/工号/邮箱/手机。"""
include_descendants = request.args.get('include_descendants', '') in ('1', 'true')
return jsonify(department_service.list_department_members(id, include_descendants))
return jsonify(department_service.list_department_members(
id,
include_descendants,
keyword=request.args.get('keyword', ''),
page=request.args.get('page', 1, type=int),
page_size=request.args.get('page_size', 20, type=int),
))
@admin_bp.route('/departments/<int:id>', methods=['PUT'])