| | |
| | | //记录复制的摄像机name |
| | | public ctrlCameraName: string |
| | | |
| | | public zTree: boolean |
| | | |
| | | constructor() { |
| | | this.openeds = [true, true, false] |
| | | this.treeData = [] |
| | |
| | | this.localTotal = 0 |
| | | this.ctrlCameraId = '' |
| | | this.ctrlCameraName = '' |
| | | this.zTree = false |
| | | } |
| | | |
| | | setVideoArr(index: number, value: object, vue: any): void { |
| | |
| | | // nodeFilter(n); |
| | | // }); |
| | | // } |
| | | } |
| | | |
| | | updateZTreeCheckNodes(checkedNodes) { |
| | | let _this = this |
| | | _this.selectedNodes = [] |
| | | if (!_this.multiple) { |
| | | _this.selectedNodes = [checkedNodes.id] |
| | | return |
| | | } |
| | | |
| | | function nodeFilter(node: any) { |
| | | if (node.type === '4' && (node.selected || node.checked)) { |
| | | _this.selectedNodes.push(node.id) |
| | | } |
| | | if (node.children) { |
| | | node.children.forEach((n: any) => { |
| | | nodeFilter(n) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | checkedNodes.forEach((n: any) => { |
| | | nodeFilter(n) |
| | | }) |
| | | } |
| | | |
| | | getCameraInfoByIp(ipaddr) { |
| | |
| | | return |
| | | } |
| | | node.forEach(n => { |
| | | // vue-js-tree 默认展开,控制部分折叠. z-tree 默认折叠, 控制部分展开 |
| | | if (this.foldNodeList[n.id]) { |
| | | n.opened = false |
| | | if (this.zTree) { |
| | | n.open = true |
| | | } else { |
| | | n.opened = false |
| | | } |
| | | } |
| | | if (n.children && n.children.length > 0) { |
| | | this.isFold(n.children) |
| | |
| | | if (!node) { |
| | | return |
| | | } |
| | | node.sort(function(obj1: any, obj2: any) { |
| | | node.sort(function (obj1: any, obj2: any) { |
| | | var val1 = obj1.name |
| | | var val2 = obj2.name |
| | | if (val1 < val2) { |
| | |
| | | this.isFold(this.treeData) |
| | | } |
| | | } |
| | | |
| | | |
| | | async fetchClusterTree() { |
| | | const rsp: any = await getClusterTree({ |
| | | searchType: this.searchCamType, |
| | |
| | | } |
| | | |
| | | async findAllFile(params: any) { |
| | | ;(params.fileName = this.searchInput), (params.type = this.searchLocalType) |
| | | ; (params.fileName = this.searchInput), (params.type = this.searchLocalType) |
| | | params.page = this.localCurrentPage |
| | | params.size = this.localPageSize |
| | | let res: any = await findAllFile(params) |