|
@@ -45,7 +45,6 @@ async def get_dict_data_by_type(
|
|
|
def build_dept_tree(depts, parent_dept):
|
|
|
dept_tree = [] # 初始化一个列表来存储菜单树结构
|
|
|
for dept in depts:
|
|
|
-
|
|
|
dept_data = {
|
|
|
"id": dept.id,
|
|
|
"isShowSelect": False,
|
|
@@ -53,7 +52,7 @@ async def get_dict_data_by_type(
|
|
|
"regionPath": dept.regionPath,
|
|
|
"yzy_unitid": dept.yzy_unitid,
|
|
|
}
|
|
|
- children_depts = parent_id_get_contact_dept_list(db,dept.parent_department_id)
|
|
|
+ children_depts = parent_id_get_contact_dept_list(db,dept.id)
|
|
|
if len(children_depts) > 0:
|
|
|
dept_data['children'] = build_dept_tree(children_depts, dept)
|
|
|
dept_data['dept_data'] = True
|