ZZJ
2021-11-09 ccee429d379e0108b7445f72ade8d97c110a6fb3
src/Pool/VideoPhotoData.ts
@@ -8,6 +8,7 @@
  addToBase
} from "@/api/search";
export default class VideoPhotoData {
  public searchFrom: string = 'search';
  public preCards: Array<object> = [];
  public cards: Array<object> = [];
  public persons: Array<object> = [];
@@ -49,8 +50,8 @@
  constructor() {
    this.cards = [];
    this.size = 40;
    this.pageSizeOption = [30, 40, 50]
    this.size = 60;
    this.pageSizeOption = [30, 60, 120]
    this.alarmlevel = [];
    this.inputValue = "";
    this.searchTime = [];
@@ -63,8 +64,8 @@
  clearStatus() {
    //this.cards = [];
    this.page = 1;
    this.size = 40;
    this.pageSizeOption = [30, 40, 50]
    this.size = 60;
    this.pageSizeOption = [30, 60, 120]
    this.alarmlevel = [];
    this.inputValue = "";
    this.showType = "search";
@@ -73,7 +74,7 @@
  async querySearchList() {
    this.cards = []
    this.preCards = []
    var param = {
    var param: any = {
      page: this.page,
      size: this.size,
      searchTime: this.searchTime,
@@ -83,7 +84,9 @@
      tasks: this.queryTasks,
      treeNodes: this.treeNodes
    }
    if (this.searchFrom == 'cluster') {
      param.isAll = true
    }
    const rsp: any = await getSearchList(param);
    if (rsp && rsp.success) {
      this.cards.length = 0 // 清两次,第一次是为了点完之后不会出现之前数据的残影,这次是为了防止因为异步问题两次请求会出现双倍数据的问题
@@ -115,7 +118,8 @@
      treeNodes: this.treeNodes,
      picUrl: this.picUrl,
      databases: this.compareTabs,
      threshold: this.threshold
      threshold: this.threshold,
      isAll: this.searchFrom == "cluster" ? true : false
    }
    const rsp: any = await findPersonByPic(param);
    if (rsp && rsp.success) {
@@ -134,21 +138,41 @@
    }
  }
  async findPerson2() {
    // 111
    this.cards = []
    var compType = this.compTargetType == "1" ? 1 : 0
    var param = {
      page: this.page,
      size: this.size,
      searchTime: this.searchTime,
      picUrl: this.picUrl,
      alarmlevel: this.queryAlarmlevel,
      inputValue: this.inputValue,
      tasks: this.queryTasks,
      treeNodes: this.treeNodes,
      compTargetId: this.compTargetId,
      compTargetType: compType,
      databases: this.compareTabs,
      threshold: this.threshold
    let param
    if (this.searchFrom == "cluster") {
      param = {
        page: this.page,
        size: this.size,
        searchTime: this.searchTime,
        picUrl: this.picUrl,
        alarmlevel: this.queryAlarmlevel,
        inputValue: this.inputValue,
        tasks: this.queryTasks,
        treeNodes: this.treeNodes,
        compTargetId: this.compTargetId,
        compTargetType: compType,
        databases: this.compareTabs,
        threshold: this.threshold,
        isAll: true
      }
    } else {
      param = {
        page: this.page,
        size: this.size,
        searchTime: this.searchTime,
        picUrl: this.picUrl,
        alarmlevel: this.queryAlarmlevel,
        inputValue: this.inputValue,
        tasks: this.queryTasks,
        treeNodes: this.treeNodes,
        compTargetId: this.compTargetId,
        compTargetType: compType,
        databases: this.compareTabs,
        threshold: this.threshold,
      }
    }
    const rsp: any = await findPersonByPic(param);
    if (rsp && rsp.success) {
@@ -178,7 +202,8 @@
      picUrl: this.picUrl,
      databases: this.compareTabs,
      compareNum: this.compareNum,
      threshold: this.threshold
      threshold: this.threshold,
      isAll: this.searchFrom == "cluster" ? true : false
    }
    const rsp: any = await findPerson(param);
    if (rsp && rsp.success) {
@@ -249,7 +274,12 @@
  }
  async queryTaskList() {
    const rsp: any = await getTaskList({});
    let params: any = {};
    if (this.searchFrom == 'cluster') {
      params.isPlatform = 1
    }
    console.log(params)
    const rsp: any = await getTaskList(params);
    if (rsp && rsp.success) {
      // this.tasks.splice(0, this.tasks.length)
      // rsp.data.forEach(element => {