From ae2d855c89ca722ac7309fdf1aa6ceed370e3b95 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期一, 11 十月 2021 20:22:30 +0800
Subject: [PATCH] 监控ui

---
 src/pages/search/index/Searching.vue |   80 +++++++++++++++-------------------------
 1 files changed, 30 insertions(+), 50 deletions(-)

diff --git a/src/pages/search/index/Searching.vue b/src/pages/search/index/Searching.vue
index e42a814..7116695 100644
--- a/src/pages/search/index/Searching.vue
+++ b/src/pages/search/index/Searching.vue
@@ -4,7 +4,7 @@
       <div class="searching-right-nav">
         <el-breadcrumb separator-class="el-icon-arrow-right" style="display: inline-block;">
           <el-breadcrumb-item>
-            <span @click="uploadChange()">妫�绱�</span>
+            <span @click="uploadChange">妫�绱�</span>
           </el-breadcrumb-item>
           <el-breadcrumb-item v-if="!VideoPhotoData.uploadType">鍏ㄩ儴</el-breadcrumb-item>
           <el-breadcrumb-item v-if="VideoPhotoData.uploadType">浠ュ浘鎼滃浘</el-breadcrumb-item>
@@ -137,6 +137,7 @@
                 :outHeight="'162px'"
                 :outWidth="VideoPhotoData.uploadDiaplay?searchImgCardWidth:cardWidth"
                 :data="item"
+                :searchTime="searchTimeFormated"
                 :showType="showType"
                 @detailsClick="getDetails($event, index)"
                 @addToBase="toAdd"
@@ -155,17 +156,6 @@
             </div>
           </div>
         </div>
-        <!-- <div class="foot">
-          <el-pagination
-            :current-page="VideoPhotoData.page"
-            @current-change="changePages"
-            @size-change="sizeChange"
-            :page-sizes="VideoPhotoData.pageSizeOption"
-            :page-size="VideoPhotoData.size"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="VideoPhotoData.total"
-          ></el-pagination>
-        </div>-->
       </div>
     </div>
     <hsc-window-style-metal class="windown-model">
@@ -236,8 +226,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 +245,6 @@
       searchImgCardWidth: "",
       tagValues: [],
       alarmValues: [],
-      dialogVisible: false,
       taskValues: [],
       searchTime: [
         this.$moment().format("YYYY-MM-DD 00:00:00"),
@@ -263,10 +252,13 @@
       ],
       searchText: "",
       currentPage: 1,
-
     };
   },
-
+  computed: {
+    searchTimeFormated(){
+      return this.format(this.searchTime)
+    }
+  },
   created () {
     this.TreeDataPool.readonly = true;
     this.TreeDataPool.gbReadonly = true;
@@ -293,20 +285,25 @@
     //     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();
+    }
 
     // 鏆傛椂鍏抽棴璺宠浆 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(); // 鏌ユ壘姝や汉
@@ -314,7 +311,6 @@
       this.searchTime = this.getDateInit();
       this.VideoPhotoData.searchTime = this.getDateInit();
       // this.VideoPhotoData.querySearchList();
-      console.log('mounted 鏌ヨes')
       this.setLoadSearch(this.VideoPhotoData.querySearchList());
     }
 
@@ -343,20 +339,24 @@
     this.VideoPhotoData.selectWhites = [];
   },
   watch: {
+    'TreeDataPool.treeActiveName' (n, o) {
+      if (n && n == 'camera') {
+        this.VideoPhotoData.treeNodes = [];
+        this.setLoadSearch(this.VideoPhotoData.querySearchList());
+      }
+    },
     "TreeDataPool.showTreeBox" (value) {
       this.getHeight();
       if (this.VideoPhotoData.realSmallPath.length > 0) {
         this.VideoPhotoData.findPersonByPage();
       } else {
         // this.VideoPhotoData.querySearchList();
-        console.log('showTreeBox 鏌ヨes')
         this.setLoadSearch(this.VideoPhotoData.querySearchList());
       }
     },
     // "TreeDataPool.selectedNodes": function(newValue,oldValue) {
     //   if (newValue !== oldValue) {
     //     this.VideoPhotoData.treeNodes = newValue;
-    //     console.log("鐩戝惉鏍戣妭鐐逛腑鐨勫埛鏂版柟娉�", newValue,oldValue);
     //     this.VideoPhotoData.querySearchList();
     //   }
     // },
@@ -367,9 +367,8 @@
           if (this.VideoPhotoData.uploadType) {
             this.VideoPhotoData.findPersonByPage()
           } else {
-            // this.VideoPhotoData.querySearchList();
-            console.log('TreeDataPool.selectedNodes 鏌ヨes')
             this.setLoadSearch(this.VideoPhotoData.querySearchList());
+
           }
         }
       },
@@ -384,7 +383,6 @@
             this.VideoPhotoData.findPersonByPage()
           } else {
             // this.VideoPhotoData.querySearchList();
-            console.log('DataStackPool.selectedDir 鏌ヨes')
             this.setLoadSearch(this.VideoPhotoData.querySearchList());
           }
         }
@@ -407,7 +405,6 @@
       }
     },
     "VideoPhotoData.uploadType": function (value) {
-      console.log("椤甸潰妯″紡锛�", value)
       if (value) {
         this.typeDisable = true;
         this.disabled = true;
@@ -424,10 +421,8 @@
     },
     "VideoPhotoData.uploadDiaplay": function (value) {
       this.getHeight();
-      console.log("upload鐨勫�兼槸锛�", value)
       if (value) {
         if (!this.VideoPhotoData.uploadType) {
-          console.log("uploadDisplay涓殑鍒锋柊");
           let scrollContain = this.$refs.scrollContain
           this.VideoPhotoData.scrollContainDom = scrollContain
           this.VideoPhotoData.showType = "search";
@@ -446,12 +441,9 @@
   },
   methods: {
     isShowUpload () {
-      console.log('isShowUpload', this.VideoPhotoData.uploadDiaplay)
       this.getHeight();
-      console.log("upload鐨勫�兼槸锛�", this.VideoPhotoData.uploadDiaplay)
       if (this.VideoPhotoData.uploadDiaplay) {
         if (!this.VideoPhotoData.uploadType) {
-          console.log("uploadDisplay涓殑鍒锋柊");
           let scrollContain = this.$refs.scrollContain
           this.VideoPhotoData.scrollContainDom = scrollContain
           this.VideoPhotoData.showType = "search";
@@ -479,7 +471,6 @@
       let integerSearchImg = parseInt((w - 300) / 325);
 
       // 鍙栨秷size淇敼
-      // console.log(integer, integerSearchImg)
       // this.handleSizeChange(integer, integerSearchImg);
 
       this.cardWidth = `calc(${100 / integer}% - 20px)`;
@@ -487,6 +478,7 @@
     },
     uploadChange () {
       this.VideoPhotoData.uploadDiaplay = false;
+      this.VideoPhotoData.clearStatus()
     },
     blackAngWhite () {
       if (this.VideoPhotoData.selectBlacks.length > 0) {
@@ -525,7 +517,6 @@
       }
       let res = this.VideoPhotoData.addBase(item)
       res.then(data => {
-        console.log("then", data)
         if (data.success) {
           this.$notify({
             title: "鎴愬姛",
@@ -598,12 +589,10 @@
     },
     searchingBtn () {
       // let obj = document.getElementById('searchMid');
-      // console.log(obj,'target',document)
       // let load = this.$loading({
       //   target:obj,
       // })
       // load.close();
-      // console.log(load,'loading')
       // this.AuthData.loading = true
       this.VideoPhotoData.page = 1;
       this.VideoPhotoData.queryTabs = this.tagValues;
@@ -620,14 +609,11 @@
       //this.VideoPhotoData.inputValue = this.searchText;
       this.VideoPhotoData.showType = this.showType;
       if (!this.VideoPhotoData.uploadType) {
-        console.log("鏌ヨ鏂规硶");
         this.VideoPhotoData.uploadDiaplay = false;
         //this.VideoPhotoData.page = this.currentPage;
         // this.VideoPhotoData.querySearchList();
-        console.log('鎼滅储鎸夐挳瑙﹀彂 鏌ヨes')
         this.setLoadSearch(this.VideoPhotoData.querySearchList());
       } else {
-        console.log("浠ュ浘鎼滃浘");
         //this.VideoPhotoData.page = this.currentPage;
         // this.VideoPhotoData.findPersonByPage();
         this.setLoadSearch(this.VideoPhotoData.findPersonByPage());
@@ -655,13 +641,11 @@
           arr.push(5);
         }
       });
-      // console.log("杈撳嚭鐨勬暟缁勶細", arr);
       return arr;
     },
     changePages (page) {
       this.VideoPhotoData.page = page;
       if (!this.VideoPhotoData.uploadType) {
-        console.log("鍒嗛〉鏀瑰彉锛�")
         this.VideoPhotoData.uploadDiaplay = false;
         // this.VideoPhotoData.querySearchList();
         this.setLoadSearch(this.VideoPhotoData.querySearchList());
@@ -726,11 +710,7 @@
         this.AuthData.closeLoad();
       })
     },
-    getUrlKey (name) {
-      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
-    },
     tagChange (obj) {
-      console.log(obj)
       if (obj.length > 0) {
         this.showType = "compare";
       } else {

--
Gitblit v1.8.0