| | |
| | | getCameraBaseImage |
| | | } from '@/api/area' |
| | | |
| | | import {getClusterDevList} from '@/api/clusterManage' |
| | | |
| | | export default class TreeDataPool { |
| | | public openeds: Array<boolean> |
| | | public activeTreeData: Array<object> |
| | |
| | | public cameraNameForBaseImage: string |
| | | public gb28181CameraBaseImage: string |
| | | public baseImageLoading: boolean |
| | | public clusterId: string |
| | | public devId: string |
| | | |
| | | constructor() { |
| | | this.openeds = [true, true, false] |
| | |
| | | this.cameraNameForBaseImage = "" |
| | | this.gb28181CameraBaseImage = "" |
| | | this.baseImageLoading = false |
| | | |
| | | this.clusterId = "" |
| | | this.devId = "" |
| | | |
| | | this.getId() |
| | | } |
| | | |
| | | async getId(){ |
| | | |
| | | //先拿集群id或设备id |
| | | 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 { |
| | |
| | | |
| | | async fetchLocalTree() { |
| | | let params: any = { |
| | | parentId:"", |
| | | searchType: this.searchCamType, |
| | | cameraName: this.searchInput |
| | | cameraName: this.searchInput, |
| | | clusterId:this.clusterId, |
| | | devId:this.devId |
| | | //isPlatform: 1 |
| | | } |
| | | if (this.searchFrom == 'cluster') { |
| | | params.isPlatform = 1 |
| | | } |
| | | |
| | | |
| | | const rsp: any = await getLocalCameraTree(params) |
| | | |
| | | if (rsp && rsp.success) { |
| | | this.treeData = rsp.data ? rsp.data : [] |
| | | this.treeData = rsp.data.treeMenu ? rsp.data.treeMenu : [] |
| | | if (this.treeData && this.treeData.length > 0) { |
| | | this.sortTreeData(this.treeData) |
| | | } |