소스 검색

250707-3代码。

baoyubo 1 개월 전
부모
커밋
5e018e82ba
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      routers/api/dutyManagement/contact.py

+ 4 - 5
routers/api/dutyManagement/contact.py

@@ -95,13 +95,12 @@ async def get_dict_data_by_type(
             dept_tree = []  # 初始化一个列表来存储菜单树结构
             for dept in depts:
                 dept_data = {
-                    "id": dept.id,
+                    "yzy_unitid": dept.unitid,
                     "isShowSelect": False,
-                    "label": dept.department_name,
-                    "regionPath": dept.regionPath,
-                    "yzy_unitid": dept.yzy_unitid,
+                    "label": dept.unitname,
+                    "regionPath": dept.unitpath
                 }
-                children_depts =  yzy_parent_id_get_contact_dept_list(db,dept.id)
+                children_depts =  yzy_parent_id_get_contact_dept_list(db,dept.unitid)
                 if len(children_depts) > 0:
                     dept_data['children'] = build_dept_tree(children_depts, dept)
                     dept_data['isShowSelect'] = True