From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 20 七月 2022 15:05:58 +0800
Subject: [PATCH] 修复国标配置的bug

---
 src/Pool/VideoPhotoData.ts |   83 ++++++++++++++++++++++++++++++-----------
 1 files changed, 60 insertions(+), 23 deletions(-)

diff --git a/src/Pool/VideoPhotoData.ts b/src/Pool/VideoPhotoData.ts
index 54f10a5..14abc0d 100644
--- a/src/Pool/VideoPhotoData.ts
+++ b/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> = [];
@@ -46,11 +47,13 @@
   public scrollContainDom: any = '';
   public uploadDiaplay: boolean = false;
   public uploadType: boolean = false;
+  public dataSource: string = 'camera';
+  public collection: string = ''
 
   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 = [];
@@ -58,13 +61,15 @@
     this.tabs = [];
     this.tasks = [];
     this.treeNodes = [];
+    this.dataSource = 'camera'
+    this.collection = ''
   }
 
   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 +78,7 @@
   async querySearchList() {
     this.cards = []
     this.preCards = []
-    var param = {
+    var param: any = {
       page: this.page,
       size: this.size,
       searchTime: this.searchTime,
@@ -81,9 +86,13 @@
       inputValue: this.inputValue,
       tabs: this.queryTabs,
       tasks: this.queryTasks,
-      treeNodes: this.treeNodes
+      treeNodes: this.treeNodes,
+      dataSource:this.dataSource,
+      collection:this.collection
     }
-
+    if (this.searchFrom == 'cluster') {
+      param.isAll = true
+    }
     const rsp: any = await getSearchList(param);
     if (rsp && rsp.success) {
       this.cards.length = 0 // 娓呬袱娆★紝绗竴娆℃槸涓轰簡鐐瑰畬涔嬪悗涓嶄細鍑虹幇涔嬪墠鏁版嵁鐨勬畫褰憋紝杩欐鏄负浜嗛槻姝㈠洜涓哄紓姝ラ棶棰樹袱娆¤姹備細鍑虹幇鍙屽�嶆暟鎹殑闂
@@ -115,7 +124,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 +144,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 +208,9 @@
       picUrl: this.picUrl,
       databases: this.compareTabs,
       compareNum: this.compareNum,
-      threshold: this.threshold
+      threshold: this.threshold,
+      isAll: this.searchFrom == "cluster" ? true : false,
+      collection:this.collection
     }
     const rsp: any = await findPerson(param);
     if (rsp && rsp.success) {
@@ -249,7 +281,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 => {

--
Gitblit v1.8.0