| | |
| | | } |
| | | } else if (this.activeTab === "场景配置") { |
| | | this.$refs.sepRule.initCameraData(node.id); |
| | | if (!this.TreeDataPool.multiple) { |
| | | this.$refs.sepRule.showRules(node.id); |
| | | } |
| | | } |
| | | }, |
| | | "TreeDataPool.selectedNodes": { |
| | | handler(nodes) { |
| | | handler(nodes, oldVal) { |
| | | if (this.activeTab == "场景配置") { |
| | | console.log(this.TreeDataPool.multiple); |
| | | // this.$refs.sepRule.initCameraData(nodes[nodes.length - 1]); |
| | | let CameraArr = []; |
| | | let CameraIds = []; |
| | | |
| | | nodes.forEach((id) => { |
| | | let newCamera = new VideoRuleData(id); |
| | | CameraArr.push(newCamera); |
| | | CameraIds.push(id); |
| | | }); |
| | | |
| | | this.$refs.sepRule.Carmeras = CameraArr; |
| | | if ( |
| | | nodes.length == 1 && |
| | | oldVal.length == 1 && |
| | | nodes[0] == oldVal[0] |
| | | ) { |
| | | return; |
| | | } |
| | | if (this.TreeDataPool.multiple && oldVal[0]) { |
| | | this.$refs.sepRule.showRules(CameraIds); |
| | | } |
| | | |
| | | console.log(CameraArr); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | console.log("------------"); |
| | | this.getCluster(); |
| | | this.TreeDataPool.readonly = false; |
| | | |
| | |
| | | } else if (tab === "场景配置") { |
| | | if (this.TreeDataPool.treeActiveName == "camera") { |
| | | this.$refs.sepRule.initCameraData(this.TreeDataPool.selectedNode.id); |
| | | this.$refs.sepRule.showRules(this.TreeDataPool.selectedNode.id); |
| | | } else if (this.TreeDataPool.treeActiveName == "dataStack") { |
| | | this.$refs.sepRule.initCameraData(this.DataStackPool.selectedDir.id); |
| | | } |