zhangzengfei
2020-09-07 929cf4c7be11bfd1e134d0cb0d7cbbe94772ebdf
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;