From 929cf4c7be11bfd1e134d0cb0d7cbbe94772ebdf Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期一, 07 九月 2020 15:35:14 +0800 Subject: [PATCH] 摄像机树增加导入功能 --- src/components/treeMenu/index.vue | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/components/treeMenu/index.vue b/src/components/treeMenu/index.vue index bd8a7a7..7665569 100644 --- a/src/components/treeMenu/index.vue +++ b/src/components/treeMenu/index.vue @@ -97,6 +97,15 @@ ></span> </button> </el-tooltip> + + <el-tooltip content="瀵煎叆璁惧" placement="bottom" popper-class="atooltip"> + <button @click="importCameras(_.model.id)"> + <span + class="iconfont icondaoru" + style="font-size:17px; margin-left:9px; position:relative; top:2px;" + ></span> + </button> + </el-tooltip> </div> </div> </template> @@ -156,16 +165,10 @@ hoverNodeId: "", itemClickEvents: { dblclick: (VNode, item, e) => { - console.log('dblclick',item); - console.log('dblclick',this.TreeDataPool.videoArr); - console.log(this.app) - // if (item.type !== "4" || this.app !== "Video") { - // return; - // } if (item.type !== "4" || this.app !== "Camera") { return; } - console.log('activeForceChoose',this.TreeDataPool.activeForceChoose) + // console.log('activeForceChoose', this.TreeDataPool.activeForceChoose) this.TreeDataPool.activeVideoId = item.id; let videoArr = this.TreeDataPool.videoArr; let nullVideoIndex = ""; @@ -175,7 +178,6 @@ this.TreeDataPool.activeVideoIndex !== "" && this.TreeDataPool.activeVideoIndex <= videoArr.length - 1 ) { - console.log('setVideoArr') this.TreeDataPool.setVideoArr(this.TreeDataPool.activeVideoIndex, undefined, this); this.$nextTick(() => { this.TreeDataPool.setVideoArr( @@ -257,6 +259,9 @@ addCamera(node) { this.$emit("addDevice", node); }, + importCameras(node) { + this.$emit("import", node); + }, addNode(event, node) { this.dialogForm = { text: "", @@ -316,7 +321,7 @@ this.showDialog = true; }, itemClick(node, item, e) { - console.log('jsTree index.vue',item) + // console.log('jsTree index.vue', item) this.TreeDataPool.selectedNode = item; this.TreeDataPool.updateSelectedNodes(); this.TreeDataPool.treeType = this.treeName; -- Gitblit v1.8.0