ZZJ
2022-06-02 db4ed65e1d7d43a10b1315cd8fa1f97984555016
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
    }
  }
}