From 1e1e5f612f252d66b0d0386cf52873bb1f3f7d7b Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 01 九月 2023 16:10:37 +0800
Subject: [PATCH] 系统维护+系统监控器+调试工具的app 增加

---
 src/components/LeftNav.vue |  126 +++++++++++++++++++++++------------------
 1 files changed, 70 insertions(+), 56 deletions(-)

diff --git a/src/components/LeftNav.vue b/src/components/LeftNav.vue
index 6f97a2a..e63e984 100644
--- a/src/components/LeftNav.vue
+++ b/src/components/LeftNav.vue
@@ -118,18 +118,19 @@
             </el-submenu>
             <el-submenu index="1">
               <template slot="title">
-                <i class="iconfont iconGBx"></i>
+                <i class="iconfont iconGBx" style="margin-left:-4px;"></i>
                 <b class="tree-font">GB28181</b>
               </template>
 
               <!-- 鍥芥爣鍒锋柊鍥炬爣 -->
-              <div class="tree-edit gb-refresh" v-show="!TreeDataPool.gbReadonly">
+              <!-- <div class="tree-edit gb-refresh" v-show="!TreeDataPool.gbReadonly">
                 <el-tooltip content="鍒锋柊" placement="top" popper-class="atooltip">
                   <button @click="refreshGB">
-                    <i class="el-icon-refresh" style="font-size:16px"></i>
+                    <i v-if="loadingGBTree" class="el-icon-loading" style="font-size:16px"></i>
+                    <i v-else class="el-icon-refresh" style="font-size:16px"></i>
                   </button>
                 </el-tooltip>
-              </div>
+              </div>-->
               <div class="tree-edit gb-lock" v-show="showLock">
                 <button @click="gbLockSwitch">
                   <i v-if="TreeDataPool.gbReadonly" class="el-icon-lock" style="font-size:16px"></i>
@@ -189,6 +190,10 @@
                 </el-input>
               </div>
             </div>
+            <div class="top-menu" style="margin:0 0 10px;text-align:left;">
+              <span class="iconfont iconjiqun" style="font-size:20px;"></span>
+              <span style="font-size:14px; margin-left: 5px;font-weight: 600;">{{clusterName}}</span>
+            </div>
             <div class="cluster-list">
               <tree-menu
                 ref="tree"
@@ -202,12 +207,7 @@
             </div>
           </div>
         </el-tab-pane>
-        <el-tab-pane
-          label="鏁版嵁鏍�"
-          name="dataStack"
-          :style="`height:${height - 56}px;`"
-          v-if="showDataStack"
-        >
+        <el-tab-pane label="鏁版嵁鏍�" name="dataStack" v-if="showDataStack">
           <div class="local-vedio-area">
             <!-- 鎼滅储 -->
             <div class="search-input">
@@ -233,7 +233,7 @@
                 size="small"
                 clearable
                 @input="querySearchAsync('dir')"
-                :style="'width:103px;'"
+                :style="'width:148px;'"
               >
                 <i
                   class="el-icon-search el-input__icon"
@@ -307,10 +307,12 @@
 } from "@/api/camera";
 
 import bus from "@/plugin/bus"
-import TreeMenu from "@/components/treeMenu/index";
+// import TreeMenu from "@/components/treeMenu/index";
+import TreeMenu from "@/components/giantTree/index";
 import LocalVedioList from '@/components/subComponents/LocalVedioList';
 import FileUpload from '@/components/subComponents/FileUpload/index';
 import XLSX from 'xlsx'
+import { findCluster } from "@/api/clusterManage";
 
 export default {
   components: {
@@ -334,17 +336,17 @@
   },
 
   computed: {
-    showTab () {
+    showTab() {
       return true;
     },
-    showCam () {
+    showCam() {
       return this.appName === "Camera" || this.appName === 'Cluster' || (this.appName === "Search" && (this.buttonAuthority.indexOf("search:camera") >= 0 || this.isAdmin));
     },
-    showCluster () {
+    showCluster() {
       return this.appName === "Cluster";
     },
     // 鏁版嵁鏍堥厤缃繀椤绘樉绀恒�� 妫�绱㈤�氳繃鏉冮檺鎺у埗鏄剧ず, 鏈畨瑁呮暟鎹爤涔熶笉鏄剧ず
-    showDataStack () {
+    showDataStack() {
       if (this.appName === "DataStack") {
         return true;
       }
@@ -364,10 +366,10 @@
 
       return false;
     },
-    showLock () {
+    showLock() {
       return this.edit;
     },
-    openeds () {
+    openeds() {
       let arry = [];
       for (let i = 0; i < this.TreeDataPool.openeds.length; i++) {
         if (this.TreeDataPool.openeds[i]) {
@@ -378,7 +380,7 @@
       }
       return arry;
     },
-    isAdmin () {
+    isAdmin() {
       if (
         sessionStorage.getItem("userInfo") &&
         sessionStorage.getItem("userInfo") !== ""
@@ -389,7 +391,7 @@
       return false;
     }
   },
-  data () {
+  data() {
     return {
       cameraAuth: "videoMonitor:camera",
       dataStack: "videoMonitor:dataStack",
@@ -441,10 +443,11 @@
       fileUploadBox: false,
       loadingGBTree: false,
       importAreaId: "",
-      menuLoading: false
+      menuLoading: false,
+      clusterName: ''
     };
   },
-  created () {
+  created() {
     console.log(this.appName)
     console.log(this.showCam)
     if (this.showCam) {
@@ -459,47 +462,53 @@
     if (this.showCluster) {
       this.TreeDataPool.treeActiveName = "cluster"
       this.TreeDataPool.fetchClusterTree();
+      findCluster().then(res => {
+        if (res.success) {
+          this.clusterName = res.data.clusterName;
+        }
+
+      })
     }
   },
   methods: {
-    searchAreaData () {
+    searchAreaData() {
       this.TreeDataPool.fetchTreeData();
     },
-    searchDataStack () {
+    searchDataStack() {
       this.DataStackPool.fetchFiles();
     },
-    searchClusterData () {
+    searchClusterData() {
       this.TreeDataPool.fetchClusterTree();
     },
-    lockSwitch () {
+    lockSwitch() {
       this.TreeDataPool.readonly = !this.TreeDataPool.readonly;
     },
-    gbLockSwitch () {
+    gbLockSwitch() {
       this.TreeDataPool.gbReadonly = !this.TreeDataPool.gbReadonly;
     },
-    dataStackLockSwitch () {
+    dataStackLockSwitch() {
       this.DataStackPool.readonly = !this.DataStackPool.readonly;
     },
-    closeTree () {
+    closeTree() {
       this.TreeDataPool.showTreeBox = false;
       bus.$emit('refreshCompareImg')
     },
-    addNode (event) {
+    addNode(event) {
       this.$refs.tree.addNode(event, { id: 0 });
     },
-    addCamera (node) {
+    addCamera(node) {
       bus.$emit("addCameraOnTree", node);
     },
-    addDir (node) {
+    addDir(node) {
       bus.$emit("addDirOnTree", node);
     },
-    menuOpen (index) {
+    menuOpen(index) {
       this.TreeDataPool.openeds[index] = true;
     },
-    menuClose (index) {
+    menuClose(index) {
       this.TreeDataPool.openeds[index] = false;
     },
-    refreshGB () {
+    refreshGB() {
       // 闃叉閲嶅鍒锋柊
       if (this.loadingGBTree) {
         return;
@@ -513,18 +522,21 @@
         this.loadingGBTree = false;
       }, 1000 * 60);
     },
-    querySearchAsync (type) {
+    querySearchAsync(type) {
       clearTimeout(this.timeout);
       this.timeout = setTimeout(() => {
         if (type === "camera") {
           this.TreeDataPool.fetchTreeData();
+        }
+        if (type === "cluster") {
+          this.TreeDataPool.fetchClusterTree();
         }
         if (type === "dir") {
           this.DataStackPool.fetchFiles();
         }
       }, 500);
     },
-    handleClick (event) {
+    handleClick(event) {
       if (event.name == 'dataStack') {
         this.DataStackPool.fetchFiles();
         this.DataStackPool.clean();
@@ -533,7 +545,7 @@
       this.TreeDataPool.treeActiveName = event.name
       console.log("褰撳墠婵�娲籲ame锛�", this.TreeDataPool.treeActiveName)
     },
-    async changeEnable () {
+    async changeEnable() {
       if (this.PollData.localVideo === 0) {
         this.$notify({
           title: "澶辫触",
@@ -549,13 +561,13 @@
         console.log(res, '鍒囨崲鏈湴鏂囦欢鍒嗘瀽寮�鍏�')
       }
     },
-    getCheckedFiles () {
+    getCheckedFiles() {
       let list1 = this.TreeDataPool.localVedioList.filter(i => {
         return i.checkStatus
       })
       return list1
     },
-    async stopVedio (status) {
+    async stopVedio(status) {
       // let list1 = this.getCheckedFiles();
       if (this.TreeDataPool.checkedLocalVedio.length == 0) {
         this.$notify({
@@ -578,7 +590,7 @@
         console.log(res, '寮�鍚殏鍋滃弬鏁�')
       }
     },
-    async deleteLocalFiles () {
+    async deleteLocalFiles() {
       let list1 = this.getCheckedFiles();
       console.log(list1, '宸插嬀閫夌殑瑙嗛')
       if (list1.length == 0) {
@@ -600,16 +612,16 @@
       }
     },
 
-    refrash (current, pageSize) {
+    refrash(current, pageSize) {
       this.TreeDataPool.localCurrentPage = current;
     },
 
-    importCameras (area) {
+    importCameras(area) {
       this.importAreaId = area
       this.$refs["import-btn"].click()
     },
 
-    async uploadFile (params) {
+    async uploadFile(params) {
       const _file = params.file;
       const fileReader = new FileReader();
       fileReader.onload = (ev) => {
@@ -667,14 +679,14 @@
       };
       fileReader.readAsBinaryString(_file);
     },
-    exceed () {
+    exceed() {
       this.$message.error("鏈�澶氬彧鑳戒笂浼�1涓獂ls鏂囦欢");
     },
     //鍒犻櫎鏂囦欢
-    remove () {
+    remove() {
 
     },
-    newCamera () {
+    newCamera() {
       return {
         latitude: 0,
         rtsp: "",
@@ -855,15 +867,17 @@
     }
     .dev-vedio-list {
       padding: 0 15px;
-      max-height: 740px;
+      box-sizing: border-box;
+      height: calc(100vh - 80px);
+      //max-height: 740px;
       overflow-x: hidden;
       overflow-y: auto;
-      @media screen and (max-height: 720px) {
-        max-height: 580px;
-      }
-      @media screen and (min-height: 900px) {
-        max-height: 740px;
-      }
+      // @media screen and (max-height: 720px) {
+      //   max-height: 580px;
+      // }
+      // @media screen and (min-height: 900px) {
+      //   max-height: 740px;
+      // }
     }
     .dev-vedio-list::-webkit-scrollbar {
       /*婊氬姩鏉℃暣浣撴牱寮�*/
@@ -883,7 +897,7 @@
 }
 
 .tree-edit {
-  z-index: 1;
+  z-index: 2;
   font-size: 16px;
   position: absolute;
   top: 56px;
@@ -950,7 +964,7 @@
     color: #606266;
   }
 }
-.flex-box{
+.flex-box {
   display: flex;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0