heyujie
2021-11-16 6a5962fe9544005dba620b00fb36c25fe2da4e76
src/pages/searchForCluster/index/Searching.vue
@@ -137,7 +137,9 @@
                :outHeight="'162px'"
                :outWidth="VideoPhotoData.uploadDiaplay?searchImgCardWidth:cardWidth"
                :data="item"
                :isFromCluster="true"
                :showType="showType"
                :searchTime="searchTimeFormated"
                @detailsClick="getDetails($event, index)"
                @addToBase="toAdd"
              ></Card>
@@ -236,8 +238,8 @@
<script>
import Card from "@/components/subComponents/Card";
import UploadImg from "@/components/searching/UploadImg";
//import CardWindow from "../components/cardWindow";
import bus from "./main";
import { getUrlKey } from "@/api/utils";
export default {
  components: {
    Card,
@@ -255,7 +257,6 @@
      searchImgCardWidth: "",
      tagValues: [],
      alarmValues: [],
      dialogVisible: false,
      taskValues: [],
      searchTime: [
        this.$moment().format("YYYY-MM-DD 00:00:00"),
@@ -263,7 +264,6 @@
      ],
      searchText: "",
      currentPage: 1,
    };
  },
@@ -273,7 +273,7 @@
    this.TreeDataPool.multiple = true;
    this.TreeDataPool.searchFrom = 'cluster';
    this.TreeDataPool.clean();
    this.TreeDataPool.fetchTreeData();
  },
  mounted() {
@@ -295,22 +295,28 @@
    //     this.VideoTaskData.tasks[this.VideoTaskData.activeIndex].taskId
    //   ];
    // }
    this.searchTime = this.getDateInit();
    this.VideoPhotoData.searchTime = this.getDateInit();
    let start = getUrlKey("start")
    let end = getUrlKey("end")
    if (start && end) {
      this.searchTime = [start, end]
      this.VideoPhotoData.searchTime = [start, end]
    } else {
      this.searchTime = this.getDateInit();
      this.VideoPhotoData.searchTime = this.getDateInit();
    }
    //设置搜索来源(应用名称)
    this.VideoPhotoData.searchFrom = 'cluster';
    //this.TreeDataPool.searchFrom = 'cluster';
    // 暂时关闭跳转 20200730
    // if (this.$route.query.showType === "findByPic") {
    if (this.getUrlKey("showType")) {
    if (getUrlKey("showType")) {
      this.VideoPhotoData.uploadDiaplay = true;
      // console.log("别处跳过来的以图搜图");
      this.VideoPhotoData.picUrl = this.getUrlKey("picSmUrl");
      this.VideoPhotoData.uploadImg = this.getUrlKey("picSmUrl");
      this.VideoPhotoData.picUrl = getUrlKey("picSmUrl");
      this.VideoPhotoData.uploadImg = getUrlKey("picSmUrl");
      this.VideoPhotoData.uploadType = true
      this.VideoPhotoData.compTargetId = this.getUrlKey("targetId")
      this.VideoPhotoData.compTargetType = this.getUrlKey("compType")
      this.VideoPhotoData.compTargetId = getUrlKey("targetId")
      this.VideoPhotoData.compTargetType = getUrlKey("compType")
      this.VideoPhotoData.size = 30
      this.VideoPhotoData.compareTabs = ["esData"];
      this.VideoPhotoData.findPerson2(); // 查找此人
@@ -442,6 +448,11 @@
        this.VideoPhotoData.uploadType = false;
        this.VideoPhotoData.showType = "search";
      }
    }
  },
  computed: {
    searchTimeFormated() {
      return this.format(this.searchTime)
    }
  },
  methods: {
@@ -614,7 +625,6 @@
        tasks = tasks.concat(arr)
      });
      this.VideoPhotoData.queryTasks = tasks;
      this.VideoPhotoData.queryAlarmlevel = this.stringToNum();
      this.VideoPhotoData.searchTime = this.format(this.searchTime);
      //this.VideoPhotoData.inputValue = this.searchText;
@@ -660,8 +670,10 @@
    },
    changePages(page) {
      this.VideoPhotoData.page = page;
      this.VideoPhotoData.isAll = true;
      console.log("分页改变!", this.VideoPhotoData.page)
      if (!this.VideoPhotoData.uploadType) {
        console.log("分页改变!")
        this.VideoPhotoData.uploadDiaplay = false;
        // this.VideoPhotoData.querySearchList();
        this.setLoadSearch(this.VideoPhotoData.querySearchList());
@@ -725,9 +737,6 @@
      fn.then(_ => {
        this.AuthData.closeLoad();
      })
    },
    getUrlKey(name) {
      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
    },
    tagChange(obj) {
      console.log(obj)