baoyubo 1 Minggu lalu
induk
melakukan
b2732a9ba0
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      routers/prod_api/system/menu/__init__.py

+ 8 - 0
routers/prod_api/system/menu/__init__.py

@@ -172,6 +172,14 @@ async def getRouters(request: Request, db: Session = Depends(get_db),
                     children_menus = parent_id_get_menu_info(db,menu.menu_id)
                     if len(children_menus)>0:
                         menu_data['children'] = build_menu_tree(children_menus, menu)
+                elif menu.menu_type == 'C' and parent_menu is None:
+                    menu_data['path'] = '/index'
+                    menu_data['component'] = "Layout"
+                    menu_data['redirect'] = '/index'
+                    menu_data['children'] = [{"path":'/'+menu.path,
+                                              "component":component,
+                                              "name":menu.path,
+                                              "meta": { 'title': menu.menu_name, 'icon': menu.icon,'noCache' : menu.is_cache == '1'}}]
                 if menu.parent_id==0:
                     pass
                 else: