From ed35d0b4c2051e067bd9904c4b0158257d5db0d9 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期二, 02 八月 2022 18:58:30 +0800
Subject: [PATCH] 摄像机树样式,导出数据样式

---
 src/views/search/Searching.vue |  139 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 118 insertions(+), 21 deletions(-)

diff --git a/src/views/search/Searching.vue b/src/views/search/Searching.vue
index a1fc267..52a08f4 100644
--- a/src/views/search/Searching.vue
+++ b/src/views/search/Searching.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="searching-box">
+  <div class="searching-box" @click="showDownBox = false">
     <div class="searching-right">
       <div class="searching-right-nav">
         <el-breadcrumb
@@ -37,7 +37,7 @@
               "
             ></el-button>
           </el-tooltip>
-          <p class="p-label" style="width: 16%">
+          <!--     <p class="p-label" style="width: 16%">
             <b>鏍囩锛�</b>
             <el-select
               v-model="tagValues"
@@ -58,7 +58,7 @@
                 :title="item.title"
               ></el-option>
             </el-select>
-          </p>
+          </p> -->
           <p class="p-task" style="width: 16%">
             <b>鍦烘櫙锛�</b>
             <el-select
@@ -89,9 +89,9 @@
               ></el-option>
             </el-select>
           </p>
-          <p class="p-level" style="width: 18%">
+          <p class="p-level" style="width: 18%; margin-right: 20px">
             <b>浜嬩欢绛夌骇锛�</b>
-            <!-- <el-select
+            <el-select
               v-model="alarmValues"
               multiple
               @change="searchingBtn"
@@ -107,9 +107,9 @@
                 :label="item.name"
                 :value="item.value"
               ></el-option>
-            </el-select> -->
+            </el-select>
           </p>
-          <p class="p-date" style="width: 19%; vertical-align: top">
+          <p class="p-date" style="width: 22%; vertical-align: top">
             <el-date-picker
               size="mini"
               v-model="searchTime"
@@ -138,9 +138,32 @@
               >鎼滅储</el-button
             >
           </p>
+
+          <div class="btnArea">
+            <div class="button light" @click.stop="showDownBox = !showDownBox">
+              <span class="iconfont">&#xe643;</span>
+              瀵煎嚭鏁版嵁
+            </div>
+
+            <div class="downBox" v-if="showDownBox">
+              <div class="downItem">瀵煎嚭鍏ㄩ儴鏁版嵁</div>
+              <div class="downItem">瀵煎嚭绛涢�夋暟鎹�</div>
+            </div>
+          </div>
+
           <p class="p-clear">
             <b class="clear-searching" @click="clearSearch">閲嶇疆</b>
           </p>
+          <el-tooltip
+            class="item"
+            effect="dark"
+            content="閰嶇疆瀛樺偍璺緞"
+            placement="bottom"
+          >
+            <span @click="showSetBox = true" class="iconfont setIcon"
+              >&#xe652;</span
+            >
+          </el-tooltip>
         </div>
         <div ref="mid" style="height: calc(100% - 50px)">
           <div class="left-selection" v-if="VideoPhotoData.uploadDiaplay">
@@ -262,16 +285,13 @@
             </div>
           </div>
           <div class="buttons">
-            <el-button type="primary" @click="saveAddBase(item, index)"
-              >淇濆瓨</el-button
-            >
-            <el-button type="default" @click="closeWindow(index)"
-              >鍙栨秷</el-button
-            >
+            <el-button type="primary">淇濆瓨</el-button>
+            <el-button type="default">鍙栨秷</el-button>
           </div>
         </div>
       </hsc-window>
     </hsc-window-style-metal>
+    <SetBox v-if="showSetBox" @close="showSetBox = false"></SetBox>
   </div>
 </template>
 
@@ -280,11 +300,13 @@
 import UploadImg from "./components/UploadImg";
 import bus from "@/main";
 import { getUrlKey } from "@/api/utils.ts";
+import SetBox from "@/views/search/components/SetBox";
 export default {
   name: "RightSide",
   components: {
     Card,
     UploadImg,
+    SetBox,
   },
   data() {
     return {
@@ -299,12 +321,14 @@
       tagValues: [],
       alarmValues: [],
       taskValues: [],
+      showDownBox: false,
       searchTime: [
         this.$moment().format("YYYY-MM-DD 00:00:00"),
         this.$moment().format("YYYY-MM-DD HH:mm:ss"),
       ],
       searchText: "",
       currentPage: 1,
+      showSetBox: false,
     };
   },
   computed: {
@@ -318,15 +342,16 @@
     this.TreeDataPool.gbReadonly = true;
     this.TreeDataPool.multiple = true;
     this.TreeDataPool.clean();
-    this.TreeDataPool.fetchTreeData();
   },
   mounted() {
     this.$nextTick(() => {
       let scrollContain = this.$refs.scrollContain;
       this.VideoPhotoData.scrollContainDom = scrollContain;
-      let list = this.TreeDataPool.localVedioList.filter((i) => {
-        return i.progress == 100;
-      });
+      let list =
+        this.TreeDataPool.localVedioList &&
+        this.TreeDataPool.localVedioList.filter((i) => {
+          return i.progress == 100;
+        });
       this.TreeDataPool.localVedioList = list;
     });
     window.addEventListener("resize", this.getHeight);
@@ -665,12 +690,18 @@
       ];
     },
     format(array) {
+      if (!array || array.length === 0) {
+        return [];
+      }
       return [
         this.$moment(array[0]).format("YYYY-MM-DD HH:mm:ss"),
         this.$moment(array[1]).format("YYYY-MM-DD HH:mm:ss"),
       ];
     },
     searchingBtn() {
+      if (!this.searchTime) {
+        this.searchTime = [];
+      }
       // let obj = document.getElementById('searchMid');
       // let load = this.$loading({
       //   target:obj,
@@ -682,23 +713,35 @@
       //澶勭悊鎼滅储绫诲瀷
       var tempArr = this.taskValues.map((task) => task.split(","));
       var tasks = [];
+      console.log("1");
+
       tempArr.forEach((arr) => {
         tasks = tasks.concat(arr);
       });
       this.VideoPhotoData.queryTasks = tasks;
+      console.log("2");
 
       this.VideoPhotoData.queryAlarmlevel = this.stringToNum();
+      console.log("3");
+      console.log(this.searchTime);
+
       this.VideoPhotoData.searchTime = this.format(this.searchTime);
+      console.log(this.VideoPhotoData.searchTime);
+
       //this.VideoPhotoData.inputValue = this.searchText;
       this.VideoPhotoData.showType = this.showType;
       if (!this.VideoPhotoData.uploadType) {
         this.VideoPhotoData.uploadDiaplay = false;
         //this.VideoPhotoData.page = this.currentPage;
         // this.VideoPhotoData.querySearchList();
+        console.log("4");
+
         this.setLoadSearch(this.VideoPhotoData.querySearchList());
       } else {
         //this.VideoPhotoData.page = this.currentPage;
         // this.VideoPhotoData.findPersonByPage();
+        console.log("5");
+
         this.setLoadSearch(this.VideoPhotoData.findPersonByPage());
       }
     },
@@ -769,6 +812,9 @@
       this.VideoPhotoData.queryAlarmlevel = [];
       this.VideoPhotoData.searchTime = this.getDateInit();
       this.VideoPhotoData.inputValue = "";
+
+      console.log(this.searchTime);
+
       this.searchTime = this.getDateInit();
       if (!this.VideoPhotoData.uploadType) {
         // this.VideoPhotoData.querySearchList();
@@ -808,7 +854,7 @@
 };
 </script>
 
-<style lang="scss">
+<style lang="scss" >
 .searching-box {
   width: 100%;
   height: 100% !important;
@@ -864,6 +910,16 @@
           b:hover {
             color: #2249b4;
           }
+        }
+        .p-input .el-button {
+          transform: translateY(-1px);
+        }
+
+        .setIcon {
+          margin-left: 10px;
+          font-size: 18px;
+          color: #1677ff;
+          cursor: pointer;
         }
         .clear-searching {
           cursor: pointer;
@@ -985,9 +1041,6 @@
     bottom: 15px;
   }
 }
-.search {
-  background-color: #eee;
-}
 </style>
 <style lang="scss" scoped>
 .left-selection {
@@ -1019,4 +1072,48 @@
     position: relative;
   }
 }
+.btnArea {
+  padding: 0 10px;
+  margin-right: 10px;
+  color: #0064ff;
+  background-color: #fff;
+  text-align: center;
+  line-height: 28px;
+  display: inline-block;
+  height: 28px;
+  border-radius: 5px;
+  cursor: pointer;
+  font-size: 12px;
+  border: 1px solid #0065ff;
+
+  .light {
+  }
+
+  .downBox {
+    top: 104px;
+    right: 255px;
+    position: absolute;
+    text-align: center;
+    background-color: #fff;
+    border-radius: 3px;
+    color: #3d3d3d;
+    width: 100px;
+    z-index: 10;
+    padding: 10px;
+    box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.05),
+      0px 4px 5px 0px rgba(0, 0, 0, 0.08), 0px 2px 4px -1px rgba(0, 0, 0, 0.12);
+
+    .downItem {
+      text-align: center;
+      height: 40px;
+      line-height: 40px;
+      font-size: 12px;
+      cursor: pointer;
+
+      &:hover {
+        background-color: #f0f5fa;
+      }
+    }
+  }
+}
 </style>

--
Gitblit v1.8.0