zhangzengfei
2023-06-30 db5872786c1e1697a59af41386136ee002bb68ad
src/views/hashrate/CameraManage/index.vue
@@ -9,7 +9,7 @@
    <div class="content">
      <div class="column-left" ref="left">
        <div class="resize-line" @mousedown="TextWidthChange"></div>
        <CameraLeft :appName="'Camera'" ref="left"></CameraLeft>
        <CameraLeft :appName="'Camera'" ref="left" style="padding-right:10px"></CameraLeft>
      </div>
      <div class="right">
        <div class="tabs">
@@ -51,8 +51,8 @@
      cluster: "",
      clusterData: [],
      intervalTimer: null,
      leftWith: 0,
      screenHeight: 0
      screenHeight: 0,
      nodeDevId: ""
    }
  },
@@ -63,12 +63,13 @@
  watch: {
    "TreeDataPool.activeNode": function(node) {
      sessionStorage.setItem("cameraDevId", node.devId)
      this.nodeDevId = node.devId
      if (this.activeTab == "信息维护") {
        if (this.TreeDataPool.treeActiveName == "camera") {
          this.$refs.cameraInfo.selectCamera(node)
        }
      } else if (this.activeTab === "场景配置") {
        this.$refs.sepRule.initCameraData(node.id)
        this.$refs.sepRule.initCameraData(node.id, node.devId)
        if (!this.TreeDataPool.multiple) {
          this.$refs.sepRule.showRules(node.id)
        }
@@ -109,7 +110,7 @@
          if (this.activeTab == "信息维护") {
            //   this.$refs.dataStackInfo.selectDir(node);
          } else if (this.activeTab == "场景配置" && node.length !== 0) {
            this.$refs.sepRule.initCameraData(node.id)
            this.$refs.sepRule.initCameraData(node.id, this.nodeDevId)
          }
        })
      },
@@ -145,7 +146,6 @@
  },
  methods: {
    TextWidthChange(e) {
      console.log(1212)
      let odivParent = e.currentTarget.parentNode //获取目标父元素
      let dx = e.clientX //当你第一次单击的时候,存储x轴的坐标。
      let dw = odivParent.offsetWidth //存储默认的div的宽度。
@@ -161,6 +161,7 @@
          odivParent.style.width = this.pdfWidth - odivParent.offsetLeft + "px"
        }
      }
      document.onmouseup = (e) => {
        document.onmousemove = null
        document.onmouseup = null
@@ -195,10 +196,10 @@
        }
      } else if (tab === "场景配置") {
        if (this.TreeDataPool.treeActiveName == "camera") {
          this.$refs.sepRule.initCameraData(this.TreeDataPool.selectedNode.id)
          this.$refs.sepRule.initCameraData(this.TreeDataPool.selectedNode.id, this.nodeDevId)
          this.$refs.sepRule.showRules(this.TreeDataPool.selectedNode.id)
        } else if (this.TreeDataPool.treeActiveName == "dataStack") {
          this.$refs.sepRule.initCameraData(this.DataStackPool.selectedDir.id)
          this.$refs.sepRule.initCameraData(this.DataStackPool.selectedDir.id, this.nodeDevId)
        }
      }
    },
@@ -315,7 +316,7 @@
    .column-left {
      position: relative;
      margin-right: 24px;
      height: 233vh;
      height: 160vh;
      overflow: auto;
      background-color: #fff;
    }