From d8fcf4c20cd4638a3def6227a71ea2c81fbc0885 Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期五, 23 十月 2020 17:23:15 +0800 Subject: [PATCH] 标注静态交互 --- src/Pool/TreeData.ts | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Pool/TreeData.ts b/src/Pool/TreeData.ts index ee52310..02a52ec 100644 --- a/src/Pool/TreeData.ts +++ b/src/Pool/TreeData.ts @@ -31,6 +31,7 @@ public readonly: boolean; public gbReadonly: boolean; public multiple: boolean; + public searchFrom: string = ''; public showTreeBox: boolean; public selectedNodes: Array<string>; public selectedNode: any; @@ -111,7 +112,6 @@ this.selectedNodes = [this.selectedNode.id]; return; } - let _selected = this.selectedNodes; function nodeFilter(node: any) { if (node.type === "4" && node.selected) { @@ -130,6 +130,11 @@ } if (this.selectedNode.cameraType === 1) { this.gb28181Data.forEach((n: any) => { + nodeFilter(n); + }); + } + if (this.selectedNode.cameraType === -1) { + this.clusterData.forEach((n: any) => { nodeFilter(n); }); } @@ -291,10 +296,16 @@ } async fetchLocalTree() { - const rsp: any = await getLocalCameraTree({ + let params:any = { searchType: this.searchCamType, - cameraName: this.searchInput - }); + cameraName: this.searchInput, + //isPlatform: 1 + }; + debugger + if(this.searchFrom == 'cluster'){ + params.isPlatform = 1 + } + const rsp: any = await getLocalCameraTree(params); if (rsp && rsp.success) { this.treeData = rsp.data ? rsp.data : [] @@ -310,7 +321,6 @@ } async fetchClusterTree (){ - debugger const rsp: any = await getClusterTree({ searchType: this.searchCamType, cameraName: this.searchInput -- Gitblit v1.8.0