heyujie
2021-03-24 6e3d8234a4b1bae86b3c896468e20ea9f13c7fb7
src/components/subComponents/CardItem.vue
@@ -504,7 +504,12 @@
    showType: {
      type: String,
      default: "search"
    }
    },
    fromCluster:{
      type:Boolean,
      default:false
    },
    searchT:{}
  },
  computed: {
    isId() {
@@ -592,15 +597,19 @@
      this.$emit("addToBase", item);
    },
    tosearch(item) {
      this.searchT
      let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id
      let imgUrl = item.targetInfo ? item.targetInfo[0].picSmUrl : item.baseInfo[0].targetPicUrl
      let compType = 1 //  数据来自于es
      if (!item.id || item.id == "") {
        compType = 0 // 数据来自于底库
      }
      let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType + '&timestamp=' + new Date().getTime();
      //let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType;
      let message
      if (this.fromCluster) {
       message = 'toCluster?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType + '&timestamp=' + new Date().getTime() + '&start=' + this.searchT[0] + '&end=' + this.searchT[1];
      } else {
         message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType + '&timestamp=' + new Date().getTime() + '&start=' + this.searchT[0] + '&end=' + this.searchT[1];
      }
      window.parent.postMessage({
        msg: message
      }, "*")