From 316d969b4d6cff5e478d60f7bc739c4d39a6a0e7 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 13 九月 2022 18:48:57 +0800
Subject: [PATCH] 隐藏GB28181,点位监控日期排序, 修改功能打开方式

---
 src/views/manageCenter/index.vue                           |   14 +++----
 src/components/CameraLeft.vue                              |    4 +-
 src/views/invalidCamera/components/DevBox.vue              |   16 +++++++
 src/router/index.js                                        |   39 ++++++++++++++++---
 src/views/hashrate/HashManage/components/EquipmentForm.vue |   21 +++++++++-
 5 files changed, 74 insertions(+), 20 deletions(-)

diff --git a/src/components/CameraLeft.vue b/src/components/CameraLeft.vue
index a8898a1..422c23e 100644
--- a/src/components/CameraLeft.vue
+++ b/src/components/CameraLeft.vue
@@ -103,7 +103,7 @@
                     />
                   </el-menu-item-group>
                 </el-submenu>
-                <el-submenu index="1">
+                <el-submenu index="1" v-show="false">
                   <template slot="title">
                     <!-- <i class="iconfont iconjiankongshexiangji"></i> -->
                     <span class="iconfont closeIcon" v-if="openeds[0] === '1'">&#xe64a;</span>
@@ -140,7 +140,7 @@
                     />
                   </el-menu-item-group>
                 </el-submenu>
-                <el-submenu index="2">
+                <el-submenu index="2" v-show="false">
                   <template slot="title">
                     <!-- <i class="iconfont iconjiankongshexiangji"></i> -->
                     <span class="iconfont closeIcon" v-if="openeds[0] === '2'">&#xe64a;</span>
diff --git a/src/router/index.js b/src/router/index.js
index 0544118..ab41d07 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -40,7 +40,10 @@
   {
     path: "/equipmentList",
     name: "equipmentList",
-    component: () => import(/* webpackChunkName: "about" */ "../views/equipmentManagement/equipmentList")
+    component: () => import(/* webpackChunkName: "about" */ "../views/equipmentManagement/equipmentList"),
+    meta: {
+      title: "璁惧绠$悊"
+    }
   },
   {
     path: "/personalCenter",
@@ -60,7 +63,10 @@
   {
     path: "/search",
     name: "search",
-    component: () => import(/* webpackChunkName: "about" */ "../views/search")
+    component: () => import(/* webpackChunkName: "about" */ "../views/search"),
+    meta: {
+      title: "缁熻鏌ヨ"
+    }
   },
   {
     path: "/searchOpen",
@@ -106,7 +112,10 @@
   {
     path: "/hashrateDetail",
     name: "hashrateDetail",
-    component: () => import(/* webpackChunkName: "about" */ "../views/hashrate/hashrateDetail")
+    component: () => import(/* webpackChunkName: "about" */ "../views/hashrate/hashrateDetail"),
+    meta: {
+      title: "绠楀姏绠$悊"
+    }
   },
   {
     path: "/manageCenter",
@@ -116,19 +125,28 @@
   {
     path: "/subAccount",
     name: "subAccount",
-    component: () => import(/* webpackChunkName: "about" */ "../views/subAccount")
+    component: () => import(/* webpackChunkName: "about" */ "../views/subAccount"),
+    meta: {
+      title: "鐢ㄦ埛绠$悊"
+    }
   },
   {
     // 瀹炴椂鐩戞帶
     path: "/video",
     name: "video",
-    component: () => import(/* webpackChunkName: "about" */ "../views/video")
+    component: () => import(/* webpackChunkName: "about" */ "../views/video"),
+    meta: {
+      title: "瀹炴椂鐩戞帶"
+    }
   },
   {
     // 鏁版嵁鍙鍖�
     path: "/dataView",
     name: "dataView",
-    component: () => import(/* webpackChunkName: "about" */ "../views/dataView")
+    component: () => import(/* webpackChunkName: "about" */ "../views/dataView"),
+    meta: {
+      title: "缁熻鍒嗘瀽"
+    }
   },
   {
     // 鍗曠偣鐧诲綍
@@ -139,7 +157,10 @@
   {
     path: "/invalidCamera",
     name: "invalidCamera",
-    component: () => import(/* webpackChunkName: "about" */ "../views/invalidCamera")
+    component: () => import(/* webpackChunkName: "about" */ "../views/invalidCamera"),
+    meta: {
+      title: "鐐逛綅鍙樻洿"
+    }
   }
 ]
 
@@ -148,4 +169,8 @@
   routes
 })
 
+// router.beforeEach((to, from, next) => {
+//   if (to.meta.title) document.title = to.meta.title
+// })
+
 export default router
diff --git a/src/views/hashrate/HashManage/components/EquipmentForm.vue b/src/views/hashrate/HashManage/components/EquipmentForm.vue
index a4b41d5..2dbadfc 100644
--- a/src/views/hashrate/HashManage/components/EquipmentForm.vue
+++ b/src/views/hashrate/HashManage/components/EquipmentForm.vue
@@ -83,7 +83,7 @@
           :current-page="page"
           :page-size="size"
           layout="total, sizes, prev, pager, next, jumper"
-          :page-sizes="[5, 10, 15, 20, 25]"
+          :page-sizes="[5, 10, 15, 20, 25, 100]"
           :total="total"
           background
           :small="true"
@@ -133,19 +133,36 @@
         this.dataList = res.data.lists
         this.total = res.data.total
       }
+
+      // let exportList = []
+
       // 鏍规嵁rtsp 鎻愬彇ip鍦板潃
       const ipReg = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
       this.dataList.forEach((cam) => {
+        // var cinfo = {
+        //   channel: cam.rtsp,
+        //   nama: cam.name,
+        //   task: cam.tasks
+        //     .map((task) => {
+        //       return task.taskname
+        //     })
+        //     .join(",")
+        // }
+
+        // exportList.push(cinfo)
+
         // 鍥芥爣鎽勫儚鏈轰笉鏄剧ずip
         if (cam.type === 1) {
           cam.ip = "-"
           return
         }
         let ip = ipReg.exec(cam.rtsp)
-        if (ip.length > 0) {
+        if (ip && ip.length > 0) {
           cam.ip = ip[0]
         }
       })
+
+      // console.table(exportList)
     },
     handleSizeChange(size) {
       this.size = size
diff --git a/src/views/invalidCamera/components/DevBox.vue b/src/views/invalidCamera/components/DevBox.vue
index d9b4e7b..6202a43 100644
--- a/src/views/invalidCamera/components/DevBox.vue
+++ b/src/views/invalidCamera/components/DevBox.vue
@@ -67,7 +67,8 @@
       })
         .then((res) => {
           if (res.success) {
-            this.dataList = res.data.list
+            this.dataList = res.data.list.sort(this.compare("createTime", "inverted"))
+            // this.dataList = this.reverseDate(res.data.list, "createTime")
             this.total = res.data.total
           } else {
             this.$notify.error("鍔犺浇鍒楄〃澶辫触")
@@ -77,6 +78,19 @@
           this.$notify.error(e.msg)
         })
     },
+    compare(prop, align) {
+      return function(a, b) {
+        var value1 = a[prop]
+        var value2 = b[prop]
+        if (align == "positive") {
+          //姝e簭
+          return new Date(value1) - new Date(value2)
+        } else if (align == "inverted") {
+          //鍊掑簭
+          return new Date(value2) - new Date(value1)
+        }
+      }
+    },
     //鍒嗛〉鍔熻兘
     handleSizeChange(size) {
       this.size = size
diff --git a/src/views/manageCenter/index.vue b/src/views/manageCenter/index.vue
index 1a113e1..fa34a73 100644
--- a/src/views/manageCenter/index.vue
+++ b/src/views/manageCenter/index.vue
@@ -763,15 +763,13 @@
       const val = userInfo.permissions.find((item) => {
         return item == route.permission
       })
+
+      // 淇敼涓哄叏閮ㄥ湪鏂版爣绛鹃〉鎵撳紑
       if (val) {
-        if (route.path === "/search" || route.path === "/dataView") {
-          const { href } = this.$router.resolve({
-            path: route.path
-          })
-          window.open(href, "_blank")
-          return
-        }
-        this.$router.push(route.path)
+        const { href } = this.$router.resolve({
+          path: route.path
+        })
+        window.open(href, "_blank")
       } else if (!userInfo.parentId) {
         this.$router.push(route.openPath)
       }

--
Gitblit v1.8.0