| | |
| | | 'alwaysShow': True, |
| | | 'perms': self.perms, |
| | | 'resourceType': self.get_type_json(), |
| | | 'seq': self.seq, |
| | | 'meta': { |
| | | 'title': self.name, |
| | | 'icon': self.icon, |
| | |
| | | res = permissions[parent_id].to_router_dict() |
| | | res["children"] = [get_child(i["id"]) for i in tmp_dit.get(parent_id, [])] |
| | | return res |
| | | |
| | | return {"routers": [get_child(i["id"]) for i in tmp_dit.get(parent_id, [])]} |
| | | select_list = [get_child(i["id"]) for i in tmp_dit.get(parent_id, [])] |
| | | sorted_permission_list = sorted(select_list, key=lambda x: x['seq'], reverse=True) |
| | | return {"routers": sorted_permission_list} |
| | | |
| | | |
| | | async def get_user_menus(db, user_id): |