From a6119509e09abadc65f020f594ae446883567bd5 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期四, 04 八月 2022 04:05:44 +0800
Subject: [PATCH] 修复场景无法编辑的bug

---
 src/Pool/BaseManageData.ts |  136 +++++++++++++++++++++------------------------
 1 files changed, 64 insertions(+), 72 deletions(-)

diff --git a/src/Pool/BaseManageData.ts b/src/Pool/BaseManageData.ts
index 0a99a6a..85cef6e 100644
--- a/src/Pool/BaseManageData.ts
+++ b/src/Pool/BaseManageData.ts
@@ -7,63 +7,58 @@
   getTagList,
   copy,
   move
-} from "@/api/baseLibrary";
+} from "@/api/baseLibrary"
 export default class BaseManageData {
-  public syncTables: Array<object> = [];
-  public localTables: Array<object> = [];
-  public personList: Array<object>;
-  public personId: string = "";
-  public blackList: Array<object> = [];
-  public selectBlacks: Array<object> = [];
-  public whiteList: Array<object> = [];
-  public selectWhites: Array<object> = [];
-  public page: number;
-  public size: number;
-  public contentValue: string = "";
-  public tableId: number;
-  public orderName: string = "createTime";
-  public orderType: string = "desc";
-  public faceUrl: string = "";
-  public threshold: number = 60;
-  public total: number;
-  public picUrl: string = "";
-
+  public syncTables: Array<object> = []
+  public localTables: Array<object> = []
+  public personList: Array<object>
+  public personId: string = ""
+  public blackList: Array<object> = []
+  public selectBlacks: Array<object> = []
+  public whiteList: Array<object> = []
+  public selectWhites: Array<object> = []
+  public page: number
+  public size: number
+  public contentValue: string = ""
+  public tableId: number
+  public orderName: string = "createTime"
+  public orderType: string = "desc"
+  public faceUrl: string = ""
+  public threshold: number = 60
+  public total: number
+  public picUrl: string = ""
 
   constructor() {
-    this.personList = [];
-    this.page = 1;
-    this.size = 10;
-    this.total = 0;
+    this.personList = []
+    this.page = 1
+    this.size = 10
+    this.total = 0
   }
 
   cleanData() {
-    this.personList = [];
-    this.page = 1;
-    this.size = 10;
-    this.total = 0;
+    this.personList = []
+    this.page = 1
+    this.size = 10
+    this.total = 0
   }
 
   async querySyncTables() {
-    const rsp: any = await getSyncTables({
-
-    });
+    const rsp: any = await getSyncTables({})
     if (rsp && rsp.success) {
       this.syncTables.splice(0, this.syncTables.length)
-      rsp.data.datalist.forEach(element => {
-        this.syncTables.push((element as any))
-      });
+      rsp.data.datalist.forEach((element) => {
+        this.syncTables.push(element as any)
+      })
     }
   }
 
   async queryLocalTables() {
-    const rsp: any = await getLocalTables({
-
-    });
+    const rsp: any = await getLocalTables({})
     if (rsp && rsp.success) {
       this.localTables.splice(0, this.localTables.length)
-      rsp.data.datalist.forEach(element => {
-        this.localTables.push((element as any))
-      });
+      rsp.data.datalist.forEach((element) => {
+        this.localTables.push(element as any)
+      })
     }
   }
 
@@ -75,37 +70,34 @@
       contentValue: this.contentValue,
       orderType: this.orderType,
       orderName: this.orderName
-    });
+    })
     if (rsp && rsp.success) {
       this.personList.splice(0, this.personList.length)
-      rsp.data.datalist.forEach(element => {
+      rsp.data.datalist.forEach((element) => {
         let carUrls = element.carPicUrls.split(";")
         element.carUrls = []
-        carUrls.forEach(picUrl => {
+        carUrls.forEach((picUrl) => {
           element.carUrls.push({ url: "/httpImage/" + picUrl })
-        });
+        })
         element.faceUrl = []
         element.faceUrl.push({ url: "/httpImage/" + element.personPicUrl })
-        this.personList.push((element as any))
-      });
+        this.personList.push(element as any)
+      })
       this.total = rsp.data.total
     }
   }
 
   async queryPersonListByPhoto() {
-    const rsp: any = await getPersonListByPhoto({
-
-    });
+    const rsp: any = await getPersonListByPhoto({})
     if (rsp && rsp.success) {
       this.personList.splice(0, this.personList.length)
-      rsp.data.datalist.forEach(element => {
-        this.personList.push((element as any))
-      });
+      rsp.data.datalist.forEach((element) => {
+        this.personList.push(element as any)
+      })
     }
   }
   async searchPhotoFromBase() {
     var bases = new Array()
-    console.log("tableId", this.tableId)
     bases.push(this.tableId)
     const rsp: any = await searchFromBase({
       databases: bases,
@@ -114,41 +106,43 @@
       threshold: this.threshold,
       picUrl: this.picUrl
     })
-    console.log("搴曞簱浠ュ浘鎼滃浘杩斿洖锛�", rsp)
-    this.personList = [];
+    this.personList = []
     if (rsp && rsp.success) {
-      rsp.data.totalList.forEach(element => {
-        this.personList.push((element as any))
-      });
-      console.log("鍒楄〃锛�", this.personList)
+      rsp.data.totalList.forEach((element) => {
+        this.personList.push(element as any)
+      })
       this.total = rsp.data.total
     }
   }
   async queryTagList() {
-    const rsp: any = await getTagList({});
+    const rsp: any = await getTagList({})
     // console.log("tag杩斿洖鍊�: ",rsp)
     if (rsp && rsp.success) {
       // 鏀剧疆榛戠櫧鍚嶅崟 0涓虹櫧鍚嶅崟
       this.blackList.length = 0
       this.whiteList.length = 0
-      rsp.data.forEach(i => {
-        if (i.status === 0 && i.bwType === "0") { //鐧藉悕鍗�
-          if (i.analyServerId === "") { //鍚屾搴�
-            i.title = i.title + '(鍚屾搴�)'
+      rsp.data.forEach((i) => {
+        if (i.status === 0 && i.bwType === "0") {
+          //鐧藉悕鍗�
+          if (i.analyServerId === "") {
+            //鍚屾搴�
+            i.title = i.title + "(鍚屾搴�)"
             this.whiteList.push(i)
           } else {
             this.whiteList.push(i)
           }
         }
-        if (i.status === 0 && i.bwType === "1") { //榛戝悕鍗�
-          if (i.analyServerId === "") { //鍚屾搴�
-            i.title = i.title + '(鍚屾搴�)'
+        if (i.status === 0 && i.bwType === "1") {
+          //榛戝悕鍗�
+          if (i.analyServerId === "") {
+            //鍚屾搴�
+            i.title = i.title + "(鍚屾搴�)"
             this.blackList.push(i)
           } else {
             this.blackList.push(i)
           }
         }
-      });
+      })
     }
   }
   async copyTo() {
@@ -167,7 +161,5 @@
     const rsp: any = await move(param)
     return rsp
   }
-  mounted() {
-
-  }
-}
\ No newline at end of file
+  mounted() {}
+}

--
Gitblit v1.8.0