From db4ed65e1d7d43a10b1315cd8fa1f97984555016 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 02 六月 2022 18:30:11 +0800
Subject: [PATCH] 算力管理过滤设备

---
 src/Pool/VideoRuleData.ts |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/Pool/VideoRuleData.ts b/src/Pool/VideoRuleData.ts
index 5824a73..eb15d61 100644
--- a/src/Pool/VideoRuleData.ts
+++ b/src/Pool/VideoRuleData.ts
@@ -11,6 +11,8 @@
   public canvasData: object;
   public baseImg: string;
   public cameraName: string;
+  public type:number;
+  public rtsp:string;
   public camearInfo: object;
 
   public loading: boolean;
@@ -28,6 +30,8 @@
     this.baseImg = "";
     this.cameraId = id ? id : "";
     this.cameraName = "";
+    this.rtsp = "";
+    this.type = 0;
     this.selectTask = [];
     this.polygonData = [];
     this.canvasData = {
@@ -63,11 +67,13 @@
     ]
     this.selectResolution = '1002'
     this.hasCtrlC = false
+
   }
 
   public async update() {
     await this.getInfo();
     await this.getSceneRule();
+    
     await this.getPolygon();
   }
 
@@ -78,9 +84,14 @@
         const rsp: any = await getCameraInfo(this.cameraId);
         if (rsp.success) {
           this.cameraName = rsp.data.name ? rsp.data.name : "";
+          this.rtsp = rsp.data.rtsp ? rsp.data.rtsp : "";
+          this.type = rsp.data.type ? rsp.data.type : 0;
+          this.baseImg =   rsp.data.snapshot_url
         }
       } catch {
         this.cameraName = "";
+        this.type = 0
+        this.rtsp = ''
       }
     } else {
       const rsp: any = await findAllFileByStackId({ stackId: this.cameraId });
@@ -110,7 +121,7 @@
 
       // 鍙鎽勫儚鏈烘暟鎹簳鍥捐繘琛屽鐞�
       if (this.cameraId.indexOf("stack") < 0) {
-        this.baseImg = rsp.data.snapshot_url ? rsp.data.snapshot_url : "";
+        this.baseImg =  rsp.data.snapshot_url ? rsp.data.snapshot_url : "";
         if (!this.baseImg) {
           this.loading = true;
         } else {
@@ -146,5 +157,7 @@
       this.dealWay = rsp.data.cameraInfo.run_type === 1 ? true : false
       this.runServerName = rsp.data.cameraInfo.runServerName
     }
+  
+    
   }
 }

--
Gitblit v1.8.0