heyujie
2022-06-17 5449cced03ef77f5e95a08e871996abb7132c40b
src/pages/search/index/Searching.vue
@@ -322,10 +322,10 @@
    this.$nextTick(() => {
      let scrollContain = this.$refs.scrollContain;
      this.VideoPhotoData.scrollContainDom = scrollContain;
      let list = this.TreeDataPool.localVedioList.filter((i) => {
        return i.progress == 100;
      });
      this.TreeDataPool.localVedioList = list;
      // let list = this.TreeDataPool.localVedioList.filter((i) => {
      //   return i.progress == 100
      // })
      // this.TreeDataPool.localVedioList = list
    });
    window.addEventListener("resize", this.getHeight);
    this.getCenter();
@@ -393,11 +393,15 @@
  watch: {
    "TreeDataPool.treeActiveName"(n, o) {
      if (n && n == "camera") {
        this.VideoPhotoData.dataSource = "camera";
        this.VideoPhotoData.treeNodes = [];
        this.setLoadSearch(this.VideoPhotoData.querySearchList());
      } else {
        this.VideoPhotoData.dataSource = "stack";
      }
    },
    "TreeDataPool.showTreeBox"(value) {
      console.log(2);
      this.getHeight();
      if (this.VideoPhotoData.realSmallPath.length > 0) {
        this.VideoPhotoData.findPersonByPage();
@@ -414,6 +418,8 @@
    // },
    "TreeDataPool.selectedNodes": {
      handler: function (newVal, oldVal) {
        console.log(3);
        if (newVal !== oldVal) {
          this.VideoPhotoData.treeNodes = newVal;
          if (this.VideoPhotoData.uploadType) {
@@ -427,6 +433,7 @@
    },
    "DataStackPool.selectedDir": {
      handler(nodes, oldNodes) {
        console.log(4);
        if (nodes !== oldNodes && nodes.id != "") {
          // this.VideoPhotoData.treeNodes = nodes.map(i=>{return i.id});
          this.VideoPhotoData.treeNodes = [nodes.id];
@@ -443,19 +450,12 @@
    "VideoPhotoData.activeCard": function (value) {
      let card =
        this.$refs.scrollContain.getElementsByClassName("my-active-card");
      console.log(1);
      console.log(card);
      if (card.length > 0) {
        let cardHeight = card[0].clientHeight;
        let cardTop = card[0].offsetTop;
        let scrollTop = this.$refs.scrollContain.scrollTop;
        let divHeight = this.$refs.scrollContain.clientHeight;
        console.log(2);
        console.log(cardHeight);
        console.log(cardTop);
        console.log(scrollTop);
        console.log(divHeight);
        if (
          cardTop - cardHeight - scrollTop > divHeight ||
          cardTop - cardHeight - scrollTop < 0
@@ -604,7 +604,6 @@
      this.CardList.details = Array.from(
        new Set([...this.CardList.details, ...[obj]])
      );
      console.log(this.CardList.details);
      // this.CardList.details.push(obj);
      this.VideoPhotoData.activeCard = obj.activeObject.id;
    },
@@ -651,12 +650,6 @@
      ];
    },
    searchingBtn() {
      // let obj = document.getElementById('searchMid');
      // let load = this.$loading({
      //   target:obj,
      // })
      // load.close();
      // this.AuthData.loading = true
      this.VideoPhotoData.page = 1;
      this.VideoPhotoData.queryTabs = this.tagValues;
      //处理搜索类型