zhangzengfei
2020-08-13 1a72b3138c3ffc9adf8408d0132b9d38dc308eac
修复查找此人有yolo数据的bug
2个文件已修改
51 ■■■■ 已修改文件
src/pages/search/index/App.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/Searching.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/App.vue
@@ -32,6 +32,10 @@
      screenHeight: 0,
    }
  },
  created() {
    // this.parseUrl();
  },
  mounted() {
    this.screenHeight = document.documentElement.clientHeight - 20;
    window.onresize = () => {
@@ -40,25 +44,10 @@
      })();
    };
    this.parseUrl();
  },
  methods: {
    parseUrl() {
      if (this.getUrlKey("showType")) {
        this.VideoPhotoData.uploadDiaplay = true;
        console.log("别处跳过来的以图搜图");
        this.VideoPhotoData.picUrl = this.getUrlKey("picSmUrl");
        this.VideoPhotoData.uploadImg = this.getUrlKey("picSmUrl");
        this.VideoPhotoData.uploadType = true
        this.VideoPhotoData.compTargetId = this.getUrlKey("targetId")
        this.VideoPhotoData.compTargetType = this.getUrlKey("compType")
        this.VideoPhotoData.size = 30
        this.VideoPhotoData.compareTabs = ["esData"];
        this.VideoPhotoData.findPerson2(); // 查找此人
      }
    },
    getUrlKey(name) {
      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
    }
  }
};
src/pages/search/index/Searching.vue
@@ -124,14 +124,12 @@
          <div class="left-selection" v-if="VideoPhotoData.uploadDiaplay">
              <upload-img ref="uploadImg" @labelDisabled="disabled"></upload-img>
            </div>
          <div id="searchMid" class="mid" :style="{width: VideoPhotoData.uploadDiaplay ? 'calc(100% - 315px)' : '100%'}">
            <div
              class="right-section"
              ref="scrollContain"
            id="searchMid"
            class="mid"
            :style="{width: VideoPhotoData.uploadDiaplay ? 'calc(100% - 315px)' : '100%'}"
            >
            <div class="right-section" ref="scrollContain">
              <Card
                v-for="(item, index) in VideoPhotoData.cards"
                :class="item.activeObject.id === VideoPhotoData.activeCard ? 'my-active-card' : ''"
@@ -155,9 +153,7 @@
              ></el-pagination>
            </div>
            </div>
          </div>
        </div>
        <!-- <div class="foot">
          <el-pagination
@@ -303,10 +299,17 @@
    // 暂时关闭跳转 20200730
    // if (this.$route.query.showType === "findByPic") {
    if (this.VideoPhotoData.uploadDiaplay) {
      // this.$nextTick(() => {
      //   this.$refs.uploadImg.rightSectionDisplay = true;
      // });
    if (this.getUrlKey("showType")) {
      this.VideoPhotoData.uploadDiaplay = true;
      // console.log("别处跳过来的以图搜图");
      this.VideoPhotoData.picUrl = this.getUrlKey("picSmUrl");
      this.VideoPhotoData.uploadImg = this.getUrlKey("picSmUrl");
      this.VideoPhotoData.uploadType = true
      this.VideoPhotoData.compTargetId = this.getUrlKey("targetId")
      this.VideoPhotoData.compTargetType = this.getUrlKey("compType")
      this.VideoPhotoData.size = 30
      this.VideoPhotoData.compareTabs = ["esData"];
      this.VideoPhotoData.findPerson2(); // 查找此人
    } else {
      this.searchTime = this.getDateInit();
      this.VideoPhotoData.searchTime = this.getDateInit();
@@ -704,6 +707,9 @@
      fn.then(_ => {
        this.AuthData.closeLoad();
      })
    },
    getUrlKey(name) {
      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
    }
  }
};