From ac6d81e4f154ebc92ceb199e5ddaad9e43ef9818 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期六, 01 八月 2020 17:47:02 +0800
Subject: [PATCH] 合并摄像机接入和数据栈

---
 public/images/test/video.png                     |    0 
 src/pages/desktop/index/main.ts                  |    2 
 src/pages/cameraVideo/index/App.vue              |    2 
 src/pages/desktop/index/components/DFrame.vue    |    7 +--
 src/pages/index/main.ts                          |    5 ++
 src/components/LeftNav.vue                       |   56 ++++++++-------------------
 src/pages/desktop/index/mock/userData.json       |    3 -
 src/pages/cameraAccess/index/main.ts             |    4 +-
 src/pages/datastack/components/DataStackInfo.vue |    2 
 src/pages/cameraAccess/index/App.vue             |   15 ++++++-
 package.json                                     |    2 
 src/pages/index/app.vue                          |    1 
 src/pages/search/index/App.vue                   |   10 ++---
 13 files changed, 50 insertions(+), 59 deletions(-)

diff --git a/package.json b/package.json
index dcf0022..c134b03 100644
--- a/package.json
+++ b/package.json
@@ -80,4 +80,4 @@
   "keywords": [],
   "author": "",
   "license": "ISC"
-}
+}
\ No newline at end of file
diff --git a/public/images/test/video.png b/public/images/test/video.png
new file mode 100644
index 0000000..f66c295
--- /dev/null
+++ b/public/images/test/video.png
Binary files differ
diff --git a/src/components/LeftNav.vue b/src/components/LeftNav.vue
index 90ad872..e3ef85e 100644
--- a/src/components/LeftNav.vue
+++ b/src/components/LeftNav.vue
@@ -6,12 +6,7 @@
       v-show="TreeDataPool.showTreeBox"
     >
       <el-tabs v-model="TreeDataPool.treeActiveName" type="border-card" @tab-click="handleClick">
-        <el-tab-pane
-          label="鎽勫儚鏈�"
-          name="camera"
-          :style="`height:${height - 56}px;`"
-          v-if="isShow(cameraAuth)"
-        >
+        <el-tab-pane label="鎽勫儚鏈�" name="camera" :style="`height:${height - 56}px;`" v-if="showCam">
           <el-menu
             :default-openeds="openeds"
             background-color="#fff"
@@ -27,7 +22,6 @@
               <el-select
                 v-model="TreeDataPool.searchCamType"
                 placeholder="璇烽�夋嫨"
-                
                 @change="searchAreaData"
               >
                 <el-option
@@ -43,7 +37,6 @@
                 placeholder="鎼滅储"
                 clearable
                 @input="querySearchAsync('camera')"
-                
               >
                 <i
                   class="el-icon-search el-input__icon"
@@ -150,7 +143,7 @@
           label="鏁版嵁鏍�"
           name="dataStack"
           :style="`height:${height - 56}px;`"
-          v-if="isShow(dataStack)"
+          v-if="showDataStack"
         >
           <div class="local-vedio-area">
             <!-- 鎼滅储 -->
@@ -216,21 +209,9 @@
               </div>
               <LocalVedioList :dataList="TreeDataPool.localVedioList"></LocalVedioList>
             </div>
-            <!-- 鍒嗛〉 -->
-            <!-- <div class="paginationClass flex-box">
-                <el-pagination
-                  @current-change="refrash"
-                  :current-page="TreeDataPool.localCurrentPage"
-                  :page-size="TreeDataPool.localPageSize"
-                  style="margin: 10px 0;"
-                  :total="TreeDataPool.localTotal"
-                ></el-pagination>
-            </div>-->
           </div>
           <file-upload v-show="fileUploadBox" @close="fileUploadBox= false" />
         </el-tab-pane>
-        <!-- <el-tab-pane label="鏈湴鍥剧墖" name="localPic" v-if="isShow('VIDEOCAMERA:image')">鏈湴鍥剧墖</el-tab-pane>
-        <el-tab-pane label="鏈湴闊抽" name="localAudio" v-if="isShow('VIDEOCAMERA:audio')">鏈湴闊抽</el-tab-pane>-->
       </el-tabs>
     </div>
   </transition>
@@ -270,6 +251,15 @@
   },
 
   computed: {
+    showTab() {
+      return true;
+    },
+    showCam() {
+      return this.appName === "Camera" || this.appName === "Search";
+    },
+    showDataStack() {
+      return this.appName === "DataStack" || this.appName === "Search";
+    },
     showLock() {
       return this.edit;
     },
@@ -366,33 +356,21 @@
     }
   },
   created() {
-    if (this.isShow('VIDEOCAMERA:camera')) {
+    if (this.showCam) {
       this.TreeDataPool.treeActiveName = "camera"
+      this.TreeDataPool.fetchTreeData();
+
     } else {
       this.TreeDataPool.treeActiveName = "dataStack"
+      this.DataStackPool.fetchFiles();
+
     }
-    this.TreeDataPool.fetchTreeData().then(_ => {
-      // todo
-      // if (this.$route.path == '/Layout/Searching') {
-      //   this.TreeDataPool.filterLocalVideoWell()
-      // }
-    });
   },
   methods: {
-    isShow(authority) {
-      if (this.isAdmin) {
-        return true;
-      } else if (this.buttonAuthority.indexOf("," + authority + ",") > -1) {
-        return true;
-      } else {
-        return false;
-      }
-    },
     searchAreaData() {
       this.TreeDataPool.fetchTreeData();
     },
     searchDataStack() {
-      debugger
       this.DataStackPool.fetchFiles();
     },
     lockSwitch() {
@@ -577,7 +555,7 @@
   .navTopSelect {
     display: flex;
     text-align: left;
-    
+
     .el-input__icon {
       line-height: 34px;
     }
diff --git a/src/pages/cameraAccess/index/App.vue b/src/pages/cameraAccess/index/App.vue
index c88ca57..07c77bb 100644
--- a/src/pages/cameraAccess/index/App.vue
+++ b/src/pages/cameraAccess/index/App.vue
@@ -4,7 +4,7 @@
       <div class="resize-bar"></div>
       <div class="resize-line"></div>
       <div class="resize-save">
-        <left-nav :appName="'Video'" :height="screenHeight - 40"></left-nav>
+        <left-nav :appName="app" :height="screenHeight - 40"></left-nav>
       </div>
     </div>
     <div class="column-right" :style="`height:${screenHeight}px;`">
@@ -19,10 +19,15 @@
 import RightSide from "./VideoManage"
 
 export default {
-  name: "SearchPage",
+  name: "VideoManage",
   components: {
     LeftNav,
     RightSide
+  },
+  computed: {
+    app() {
+      return this.getUrlKey() !== null ? "DataStack" : "Camera"
+    }
   },
   data() {
     return {
@@ -37,6 +42,12 @@
       })();
     };
   },
+  methods: {
+    getUrlKey() {
+      let name = "dataStack"
+      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
+    }
+  }
 };
 </script>
 
diff --git a/src/pages/cameraAccess/index/main.ts b/src/pages/cameraAccess/index/main.ts
index 782d019..5e8305d 100644
--- a/src/pages/cameraAccess/index/main.ts
+++ b/src/pages/cameraAccess/index/main.ts
@@ -1,4 +1,4 @@
-import Vue from 'vue';
+import Vue from "vue";
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 import "@/assets/css/element-variables.scss";
@@ -16,7 +16,7 @@
 
 import App from './App.vue'
 
-Vue.use(ElementUI)
+Vue.use(ElementUI);
 Vue.use(VueAwesomeSwiper as any);
 Vue.use(VueWindow);
 
diff --git a/src/pages/cameraVideo/index/App.vue b/src/pages/cameraVideo/index/App.vue
index 609db2c..8b784d2 100644
--- a/src/pages/cameraVideo/index/App.vue
+++ b/src/pages/cameraVideo/index/App.vue
@@ -4,7 +4,7 @@
       <div class="resize-bar"></div>
       <div class="resize-line"></div>
       <div class="resize-save">
-        <left-nav :appName="'Video'" :height="screenHeight - 40"></left-nav>
+        <left-nav :appName="'Camera'" :height="screenHeight - 40"></left-nav>
       </div>
     </div>
     <div class="column-right" :style="`height:${screenHeight}px;`">
diff --git a/src/pages/datastack/components/DataStackInfo.vue b/src/pages/datastack/components/DataStackInfo.vue
index b0709c1..0111608 100644
--- a/src/pages/datastack/components/DataStackInfo.vue
+++ b/src/pages/datastack/components/DataStackInfo.vue
@@ -799,7 +799,7 @@
     vertical-align: middle;
   }
   .snapshot-video {
-    background: url("../../../assets/img/video.png");
+    background: url("/public/images/test/video.png");
     background-repeat: round;
   }
   .snapshot-image {
diff --git a/src/pages/desktop/index/components/DFrame.vue b/src/pages/desktop/index/components/DFrame.vue
index d172a75..90f8e5a 100644
--- a/src/pages/desktop/index/components/DFrame.vue
+++ b/src/pages/desktop/index/components/DFrame.vue
@@ -44,7 +44,6 @@
   },
   mounted() {
     window.addEventListener('message', e => {
-      console.log(e)
       if (e.data && e.data.msg == "logout") {
         location.assign("/");
       }
@@ -100,8 +99,8 @@
   },
   directives: {
     drag(el) {
-      
-      if(el.dragLock){
+
+      if (el.dragLock) {
         return
       }
       el.onmousedown = function (e) {
@@ -122,7 +121,7 @@
       }
     },
     resize(el, binding, vnode) {
-      if(el.resizeLock){
+      if (el.resizeLock) {
         return;
       }
       el.onmousedown = function (e) {
diff --git a/src/pages/desktop/index/main.ts b/src/pages/desktop/index/main.ts
index c916d2d..0021368 100644
--- a/src/pages/desktop/index/main.ts
+++ b/src/pages/desktop/index/main.ts
@@ -2,7 +2,7 @@
 import Vue from 'vue'
 import App from './App.vue';
 import store from './store'
-import "@/assets/icons/awesome/font-awesome.css";
+import "../../../assets/icons/awesome/font-awesome.css";
 
 new Vue({
   el: '#app',
diff --git a/src/pages/desktop/index/mock/userData.json b/src/pages/desktop/index/mock/userData.json
index 5a7fac3..20a2a50 100644
--- a/src/pages/desktop/index/mock/userData.json
+++ b/src/pages/desktop/index/mock/userData.json
@@ -46,7 +46,7 @@
         "src": "../../images/app-mid/datastack-config.png",
         "alt": "datastack-config",
         "type": "2",
-        "url": "/view/datastack",
+        "url": "/view/cameraAccess?dataStack=1",
         "name": "鏁版嵁鏍堥厤缃�",
         "width": 1876,
         "height": 750
@@ -67,7 +67,6 @@
         "url": "/view/datapush",
         "name": "鏁版嵁鎺ㄩ��"
       },
-    
       {
         "id": "7",
         "src": "../../images/app-mid/library.png",
diff --git a/src/pages/index/app.vue b/src/pages/index/app.vue
index 320b1ab..b5a62d2 100644
--- a/src/pages/index/app.vue
+++ b/src/pages/index/app.vue
@@ -220,6 +220,7 @@
   height: 402px;
   background: rgba(146, 208, 255, 0.23);
   border-radius: 4px;
+  text-align: center;
   .login-logo {
     margin-top: -53px;
   }
diff --git a/src/pages/index/main.ts b/src/pages/index/main.ts
index 80f18a4..692b57e 100644
--- a/src/pages/index/main.ts
+++ b/src/pages/index/main.ts
@@ -1,6 +1,11 @@
 import Vue from 'vue'
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
+import 'element-ui/lib/theme-chalk/index.css';
+import "@/assets/css/element-variables.scss";
+import "../../assets/css/common.scss"
+import "../../assets/css/overried.scss"
+
 import App from './App.vue'
 
 Vue.use(ElementUI)
diff --git a/src/pages/search/index/App.vue b/src/pages/search/index/App.vue
index b31dde4..cda2cd0 100644
--- a/src/pages/search/index/App.vue
+++ b/src/pages/search/index/App.vue
@@ -4,15 +4,13 @@
       <div class="resize-bar"></div>
       <div class="resize-line"></div>
       <div class="resize-save">
-        <left-nav :appName="'Video'" :height="screenHeight - 40"></left-nav>
+        <left-nav :appName="'Search'" :height="screenHeight - 40"></left-nav>
       </div>
     </div>
     <div class="column-right" :style="`height:${screenHeight}px;`">
       <right-side />
     </div>
-
-      <card-window></card-window>
-
+    <card-window></card-window>
   </div>
 </template>
 
@@ -62,8 +60,8 @@
   box-sizing: border-box;
   overflow: hidden;
 }
-.heigher-index{
-  position:absolute;
+.heigher-index {
+  position: absolute;
   top: 0;
   z-index: 10;
   width: 100%;

--
Gitblit v1.8.0