zhangzengfei
2020-08-13 1a72b3138c3ffc9adf8408d0132b9d38dc308eac
修复查找此人有yolo数据的bug
2个文件已修改
87 ■■■■ 已修改文件
src/pages/search/index/App.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/Searching.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/search/index/App.vue
@@ -1,13 +1,13 @@
<template>
  <div class="column">
    <div class="column-left" >
    <div class="column-left">
      <div class="resize-bar"></div>
      <div class="resize-line"></div>
      <div class="resize-save">
        <left-nav :appName="'Search'" :height="screenHeight - 40"></left-nav>
      </div>
    </div>
    <div class="column-right" >
    <div class="column-right">
      <right-side />
    </div>
    <card-window></card-window>
@@ -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
@@ -122,16 +122,14 @@
        </div>
        <div ref="mid" style="height:calc(100% - 50px);">
          <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"
            >
            <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">
              <Card
                v-for="(item, index) in VideoPhotoData.cards"
                :class="item.activeObject.id === VideoPhotoData.activeCard ? 'my-active-card' : ''"
@@ -144,20 +142,18 @@
                @addToBase="toAdd"
              ></Card>
              <div class="foot">
              <el-pagination
                :current-page="VideoPhotoData.page"
                @current-change="changePages"
                @size-change="sizeChange"
                :page-sizes="VideoPhotoData.pageSizeOption"
                :page-size="VideoPhotoData.size"
                layout="total, sizes, prev, pager, next, jumper"
                :total="VideoPhotoData.total"
              ></el-pagination>
                <el-pagination
                  :current-page="VideoPhotoData.page"
                  @current-change="changePages"
                  @size-change="sizeChange"
                  :page-sizes="VideoPhotoData.pageSizeOption"
                  :page-size="VideoPhotoData.size"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="VideoPhotoData.total"
                ></el-pagination>
              </div>
            </div>
            </div>
          </div>
        </div>
        <!-- <div class="foot">
          <el-pagination
@@ -169,7 +165,7 @@
            layout="total, sizes, prev, pager, next, jumper"
            :total="VideoPhotoData.total"
          ></el-pagination>
        </div> -->
        </div>-->
      </div>
    </div>
    <hsc-window-style-metal class="windown-model">
@@ -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
    }
  }
};
@@ -898,7 +904,7 @@
      }
    }
  }
  .right-section {
    //width: calc(100% - 315px);
    height: 100%;