Browse Source

no message

libushang 3 weeks ago
parent
commit
5c3bfe2f8a
1 changed files with 35 additions and 30 deletions
  1. 35 30
      routers/api/videoResource/avcon.py

+ 35 - 30
routers/api/videoResource/avcon.py

@@ -292,7 +292,11 @@ async def get_drone_tree(
     try:
     try:
         result = []
         result = []
 
 
-        equipment_type = "无人机视频"
+        if equipment == '无人机':
+            equipment_type = "广东省应急管理厅4G单兵布控球"
+        elif equipment == '单兵设备':
+            equipment_type = "无人机视频"
+        
         print('equipment:', equipment)
         print('equipment:', equipment)
 
 
         data = AvconH5API.get_search_region(equipment_type)
         data = AvconH5API.get_search_region(equipment_type)
@@ -305,43 +309,44 @@ async def get_drone_tree(
                 "children": result1
                 "children": result1
             })
             })
 
 
-        result = [
-            {
-                "label": '无人机设备',
-                "children": [
+        if result == []:
+            result = [
                 {
                 {
-                    "label": '茂名市应急管理局',
+                    "label": '无人机设备',
                     "children": [
                     "children": [
                     {
                     {
-                        "id": "1",
-                        "label": '应急无人机(例子1)',
-                        "url": "http://19.152.196.223:5050/liveplay.html?liveurl=ws://10.100.100.103:9001/live/mmjk0002@mm.zw.yj_00.flv&channelid=mmjk0002@mm.zw.yj_00"
-                    }
-                    ]
-                },
-                {
-                    "label": '电白区应急管理局',
-                    "children": [
+                        "label": '茂名市应急管理局',
+                        "children": [
+                        {
+                            "id": "1",
+                            "label": '应急无人机(例子1)',
+                            "url": "http://19.152.196.223:5050/liveplay.html?liveurl=ws://10.100.100.103:9001/live/mmjk0002@mm.zw.yj_00.flv&channelid=mmjk0002@mm.zw.yj_00"
+                        }
+                        ]
+                    },
                     {
                     {
-                        "id": "2",
-                        "label": '应急无人机(例子2)',
-                        "url": "http://19.152.196.223:5050/liveplay.html?liveurl=ws://10.100.100.103:9001/live/mmjk0002@mm.zw.yj_00.flv&channelid=mmjk0002@mm.zw.yj_00"
-                    }
-                    ]
-                },
-                {
-                    "label": '茂南区应急管理局',
-                    "children": [
+                        "label": '电白区应急管理局',
+                        "children": [
+                        {
+                            "id": "2",
+                            "label": '应急无人机(例子2)',
+                            "url": "http://19.152.196.223:5050/liveplay.html?liveurl=ws://10.100.100.103:9001/live/mmjk0002@mm.zw.yj_00.flv&channelid=mmjk0002@mm.zw.yj_00"
+                        }
+                        ]
+                    },
                     {
                     {
-                        "id": "3",
-                        "label": '应急无人机(例子3)',
-                        "url": "http://19.152.196.223:5050/liveplay.html?liveurl=ws://10.100.100.103:9001/live/mmjk0002@mm.zw.yj_00.flv&channelid=mmjk0002@mm.zw.yj_00"
+                        "label": '茂南区应急管理局',
+                        "children": [
+                        {
+                            "id": "3",
+                            "label": '应急无人机(例子3)',
+                            "url": "http://19.152.196.223:5050/liveplay.html?liveurl=ws://10.100.100.103:9001/live/mmjk0002@mm.zw.yj_00.flv&channelid=mmjk0002@mm.zw.yj_00"
+                        }
+                        ]
                     }
                     }
                     ]
                     ]
                 }
                 }
-                ]
-            }
-        ]
+            ]
         
         
         return {
         return {
             "code": 0,
             "code": 0,