From 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期二, 12 四月 2022 17:50:21 +0800 Subject: [PATCH] 摄像机管理 --- src/Pool/TreeData.ts | 55 ++++++++++++++++++++++--------------------------------- 1 files changed, 22 insertions(+), 33 deletions(-) diff --git a/src/Pool/TreeData.ts b/src/Pool/TreeData.ts index 49b9c0e..8c9ad4c 100644 --- a/src/Pool/TreeData.ts +++ b/src/Pool/TreeData.ts @@ -65,8 +65,9 @@ public cameraNameForBaseImage: string public gb28181CameraBaseImage: string public baseImageLoading: boolean - public clusterId: string - public devId: string + + public activeNode: string + constructor() { this.openeds = [true, true, false] @@ -106,24 +107,11 @@ this.cameraNameForBaseImage = "" this.gb28181CameraBaseImage = "" this.baseImageLoading = false + this.activeNode = '' - this.clusterId = "" - this.devId = "" - this.getId() } - async getId(){ - - //鍏堟嬁闆嗙兢id鎴栬澶噄d - const res:any = await getClusterDevList() - if(res.data.clusterList.length > 0) { - this.clusterId = res.data.clusterList[0].cluster_id - } - else { - this.devId = res.data.devList[0].devId - } - } setVideoArr(index: number, value: object, vue: any): void { vue.$set(this.videoArr, index, value) @@ -362,8 +350,7 @@ parentId:"", searchType: this.searchCamType, cameraName: this.searchInput, - clusterId:this.clusterId, - devId:this.devId + //isPlatform: 1 } if (this.searchFrom == 'cluster') { @@ -374,6 +361,7 @@ const rsp: any = await getLocalCameraTree(params) if (rsp && rsp.success) { + this.treeData = rsp.data.treeMenu ? rsp.data.treeMenu : [] if (this.treeData && this.treeData.length > 0) { this.sortTreeData(this.treeData) @@ -402,20 +390,21 @@ } async fetchGbTree() { - const rsp: any = await getGB28181CameraTree({ - searchType: this.searchCamType, - cameraName: this.searchInput - }) + // 鍚庨棬 + // const rsp: any = await getGB28181CameraTree({ + // searchType: this.searchCamType, + // cameraName: this.searchInput + // }) - if (rsp && rsp.success) { - this.gb28181Data = rsp.data ? rsp.data : [] - if (this.gb28181Data && this.gb28181Data.length > 0) { - this.sortTreeData(this.gb28181Data) - } + // if (rsp && rsp.success) { + // this.gb28181Data = rsp.data ? rsp.data : [] + // if (this.gb28181Data && this.gb28181Data.length > 0) { + // this.sortTreeData(this.gb28181Data) + // } - this.gb28181DataPure = JSON.parse(JSON.stringify(this.gb28181Data)) - this.isFold(this.gb28181Data) - } + // this.gb28181DataPure = JSON.parse(JSON.stringify(this.gb28181Data)) + // this.isFold(this.gb28181Data) + // } } async fetchTreeData() { @@ -430,7 +419,7 @@ async add(name: string, parent: string) { await addAreaTreeData({ name: name, - parentId: parent + parentId: parent, }) this.fetchTreeData() @@ -438,7 +427,7 @@ async del(id: string) { await delAreaTreeData({ - id: id + id: id, }) this.fetchTreeData() @@ -449,7 +438,7 @@ id: id, name: name, parentId: this.getParent(id, isGb), - alias: alias + alias: alias, }) this.fetchTreeData() -- Gitblit v1.8.0