| | |
| | | import { |
| | | getLocalCameraTree, |
| | | getGB28181CameraTree, |
| | | getClusterTree, |
| | | addAreaTreeData, |
| | | delAreaTreeData, |
| | | updateAreaTreeData, |
| | |
| | | export default class TreeDataPool { |
| | | public openeds: Array<boolean>; |
| | | public treeData: Array<object>; |
| | | public clusterData: Array<object>; |
| | | public gb28181Data: Array<object>; |
| | | public treeDataPure: Array<object>; |
| | | public gb28181DataPure: Array<object>; |
| | | public clusterDataPure: Array<object>; |
| | | public videoArr: Array<string | undefined | object>; |
| | | public searchCamType: number; |
| | | public searchInput: string; |
| | |
| | | this.openeds = [true, true, false]; |
| | | this.treeData = []; |
| | | this.gb28181Data = []; |
| | | this.clusterData = []; |
| | | this.treeDataPure = []; |
| | | this.gb28181DataPure = []; |
| | | this.clusterDataPure = []; |
| | | this.videoArr = [""]; |
| | | this.searchCamType = 0; |
| | | this.searchInput = ""; |
| | |
| | | } |
| | | } |
| | | |
| | | async fetchClusterTree (){ |
| | | debugger |
| | | const rsp: any = await getClusterTree({ |
| | | searchType: this.searchCamType, |
| | | cameraName: this.searchInput |
| | | }); |
| | | if(rsp && rsp.success){ |
| | | console.log(rsp.data); |
| | | this.clusterData = rsp.data ? rsp.data : [] |
| | | if(this.clusterData && this.clusterData.length > 0){ |
| | | this.sortTreeData(this.clusterData) |
| | | } |
| | | this.clusterDataPure = JSON.parse(JSON.stringify(this.clusterData)); |
| | | this.isFold(this.clusterData) |
| | | } |
| | | } |
| | | |
| | | async fetchGbTree() { |
| | | const rsp: any = await getGB28181CameraTree({ |
| | | searchType: this.searchCamType, |
| | |
| | | if (this.openeds[1]) { |
| | | this.fetchGbTree() |
| | | } |
| | | |
| | | this.findAllFile({}) |
| | | } |
| | | |