From f20a554bdb24e9dfde9dc6a69d78595944f61d15 Mon Sep 17 00:00:00 2001 From: mark <mark18340872469@163.com> Date: 星期二, 25 十月 2022 14:53:57 +0800 Subject: [PATCH] 设备管理 样式调整 --- src/Pool/VideoRuleData.ts | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Pool/VideoRuleData.ts b/src/Pool/VideoRuleData.ts index 78bf26f..ee17558 100644 --- a/src/Pool/VideoRuleData.ts +++ b/src/Pool/VideoRuleData.ts @@ -1,7 +1,8 @@ import { getCameraInfo } from "@/api/camera"; import { getAllPolygon } from "@/api/polygon"; import { getDirDetails, findAllFileByStackId } from "@/api/localVedio"; -import { getCameraSceneRule } from '@/api/scene' +import { getCameraSceneRule,getLinkSceneRule } from '@/api/scene' + export default class VideoRuleData { public selectTask: Array<object>; @@ -24,6 +25,7 @@ public resolutionOption: Array<any>; public selectResolution: string; public hasCtrlC: boolean; + public allSceneRule:Array<any>; constructor(id: string) { this.loading = false; @@ -34,6 +36,7 @@ this.type = 0; this.selectTask = []; this.polygonData = []; + this.allSceneRule = [] this.canvasData = { line: [], arrow: [], @@ -73,8 +76,8 @@ public async update() { await this.getInfo(); await this.getSceneRule(); - await this.getPolygon(); + await this.getLinkRule() } public async getInfo() { @@ -86,6 +89,7 @@ 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 = ""; @@ -120,7 +124,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 { @@ -156,7 +160,15 @@ this.dealWay = rsp.data.cameraInfo.run_type === 1 ? true : false this.runServerName = rsp.data.cameraInfo.runServerName } - - + } + + public async getLinkRule() { + const rsp: any = await getLinkSceneRule({ cameraIds: [this.cameraId] }); + if (rsp && rsp.success) { + let rules = rsp.data.rules; + + rules = rsp.data.rules; + this.allSceneRule = this.rules.concat(rules) + } } } -- Gitblit v1.8.0