From ea4cf388b11923ae181f17661aae71c0b95fecd5 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期五, 14 八月 2020 12:00:50 +0800
Subject: [PATCH] 添加底库样式调整,跳转及关闭窗口同步高亮处理

---
 src/pages/desktop/index/store/modules/desktop.js  |   13 +++
 public/index.html                                 |    3 
 src/pages/desktop/index/components/ToolsEntry.vue |   10 ++
 src/pages/cameraVideo/index/main.ts               |    1 
 src/pages/search/index/Searching.vue              |   13 +++
 src/pages/desktop/index/components/DFrame.vue     |    7 +
 src/pages/cameraVideo/index/Video.vue             |   76 +++++++++++++++++++
 src/pages/desktop/index/mock/userData.json        |    2 
 src/pages/syslog/index/App.vue                    |   37 +++++++--
 src/pages/search/index/main.ts                    |   21 ++--
 10 files changed, 160 insertions(+), 23 deletions(-)

diff --git a/public/index.html b/public/index.html
index 485bf69..577320a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -316,6 +316,9 @@
     .pl20 {
       padding-left: 20px;
     }
+    .cursor-pointer{
+      cursor: pointer;
+    }
     /* .flex-box{
       display: flex;
     } */
diff --git a/src/pages/cameraVideo/index/Video.vue b/src/pages/cameraVideo/index/Video.vue
index 8bc9049..bffa55d 100644
--- a/src/pages/cameraVideo/index/Video.vue
+++ b/src/pages/cameraVideo/index/Video.vue
@@ -636,5 +636,81 @@
     // box-shadow: #e4e7ed 0px 0px 9px inset;
     border-radius: 5px;
   }
+
 }
+.titlebar{
+  height: 10px!important;
+  background: #fff!important;
+  .button{
+    position: absolute;
+    font-size: 25px!important;
+    right: 10px;
+    top: 10px;
+    z-index: 3;
+  }
+}
+.addToBase {
+    width: 98%;
+    height: 430px;
+    position: relative;
+    .topLabel {
+      margin-top: 20px;
+      height: 40px;
+      border-bottom: 1px solid #eee;
+      font-family: PingFangSC-Medium;
+      font-size: 20px;
+      font-weight: 600;
+      line-height: 1rem;
+      color: #222222;
+      text-align: left;
+      margin-left: 15px;
+    }
+    .items {
+      width: 100%;
+      height: auto;
+      max-height: 35%;
+      overflow-y: auto;
+      margin: 20px 0px;
+      .lable {
+        width: 15%;
+        margin-top: 10px;
+        float: left;
+        //font-family: PingFangSC-Medium;
+        font-size: 14px;
+        font-weight: 600;
+      }
+      .baseList {
+        width: 85%;
+        height: 100%;
+        float: left;
+
+        // display: flex;
+        // justify-content: flex-start;
+        .base {
+          //flex-wrap: wrap;
+          width: calc(33% - 10px);
+          padding: 0px 5px;
+          line-height: 30px;
+          float: left;
+          text-align: left;
+          font-size: 12px !important;
+          .el-checkbox {
+            width: 100%;
+            display: block;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            .el-checkbox__label {
+              display: inline !important;
+            }
+          }
+        }
+      }
+    }
+    .buttons {
+      position: absolute;
+      right: 0px;
+      bottom: 15px;
+    }
+  }
 </style>
diff --git a/src/pages/cameraVideo/index/main.ts b/src/pages/cameraVideo/index/main.ts
index 475fb71..38a5559 100644
--- a/src/pages/cameraVideo/index/main.ts
+++ b/src/pages/cameraVideo/index/main.ts
@@ -1,6 +1,5 @@
 import Vue from 'vue';
 import App from './App.vue'
-import "../../../assets/css/common.scss"
 
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
diff --git a/src/pages/desktop/index/components/DFrame.vue b/src/pages/desktop/index/components/DFrame.vue
index 8152d1e..2b3f22d 100644
--- a/src/pages/desktop/index/components/DFrame.vue
+++ b/src/pages/desktop/index/components/DFrame.vue
@@ -64,7 +64,7 @@
       }
     }
   },
- 
+  
   methods: {
     //resize
     mousedown(e) {
@@ -94,8 +94,11 @@
     },
     //resize end
     closeFrame: function () {
+      debugger
       this.$store.dispatch('desktop/closeFrame', this.data);
-      this.refreshDock();
+      //this.refreshDock();
+      this.$store.commit('desktop/highlight')
+      
     },
     changeFullScreen: function () {
       this.fullScreen = !this.fullScreen;
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index df9d6e0..5bc5d61 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -86,6 +86,7 @@
       dockMask.style.width = dockItems.length * 60 + 40 + 'px';
     },
     addFrameByName(name, params) {
+      debugger
       let dock = null;
       this.$store.state.desktop.docks.forEach(app => {
         if (app.name === name) {
@@ -102,6 +103,15 @@
         title: dock.title,
         url: dock.url + "?" + params
       });
+      this.$store.commit('desktop/addMinDock', {
+        id: dock.id,
+        src: dock.src,
+        alt: dock.title,
+        type: "3",
+        highlight: true,
+        url: dock.url,
+        screenshot: ''
+      });
     }
   }
 };
diff --git a/src/pages/desktop/index/mock/userData.json b/src/pages/desktop/index/mock/userData.json
index e2de688..3b284b4 100644
--- a/src/pages/desktop/index/mock/userData.json
+++ b/src/pages/desktop/index/mock/userData.json
@@ -111,7 +111,7 @@
         "url": "/view/syslog",
         "title": "鏃ュ織绠$悊",
         "width": 1200,
-        "height": 590
+        "height": 600
       },
       {
         "id": "17",
diff --git a/src/pages/desktop/index/store/modules/desktop.js b/src/pages/desktop/index/store/modules/desktop.js
index cfb3747..dd4abc1 100644
--- a/src/pages/desktop/index/store/modules/desktop.js
+++ b/src/pages/desktop/index/store/modules/desktop.js
@@ -177,6 +177,7 @@
     state.notificationCenterVisible = visible;
   },
   closeFrame: (state, item) => {
+    
     state.frames.find(function (it, idx) {
       if (it.id === item.id) {
         state.frames.splice(idx, 1);
@@ -191,6 +192,7 @@
       }
       return false;
     });
+    
     state.docks.find(function (it) {
       if (it.id === item.id) {
         it.isOpen = false;
@@ -202,6 +204,17 @@
       state.safari.active = false;
     }
   },
+  highlight(state){
+    //鎵惧埌minDocks鏈�杩戞墦寮�鐨勭姸鎬乮sShow涓簍rue鐨刣ock缃负楂樹寒
+    let minLen = state.minDocks.length;
+    for(var i = minLen-1; i >= 0; i--){
+      let temp =  state.frames.find(frame=>frame.id == state.minDocks[i].id);
+      if(temp.isShow){
+        state.minDocks[i].highlight = true;
+        return;
+      }
+    }
+  },
   openSafari: (state) => {
     state.safari.active = true;
     state.safari.isShow = true;
diff --git a/src/pages/search/index/Searching.vue b/src/pages/search/index/Searching.vue
index b9a16a0..9a9d55e 100644
--- a/src/pages/search/index/Searching.vue
+++ b/src/pages/search/index/Searching.vue
@@ -817,9 +817,20 @@
   white-space: nowrap;
   text-overflow: ellipsis;
 }
+.titlebar{
+  height: 10px!important;
+  background: #fff!important;
+  .button{
+    position: absolute;
+    font-size: 25px!important;
+    right: 10px;
+    top: 10px;
+    z-index: 3;
+  }
+}
 .addToBase {
   width: 98%;
-  height: 450px;
+  height: 430px;
   position: relative;
   .topLabel {
     margin-top: 20px;
diff --git a/src/pages/search/index/main.ts b/src/pages/search/index/main.ts
index 40f7ec6..775805f 100644
--- a/src/pages/search/index/main.ts
+++ b/src/pages/search/index/main.ts
@@ -1,23 +1,24 @@
 import Vue from 'vue';
-import App from './App.vue'
-import "../../../assets/css/common.scss"
-
+import ElementUI from 'element-ui';
+import preview from 'vue-photo-preview'
 import moment from "moment";
+import * as VueWindow from "@hscmap/vue-window";
+import App from './App.vue';
+import Mixin from "./mixins";
+
+import 'element-ui/lib/theme-chalk/index.css';
+import "@/assets/css/element-variables.scss";
+import 'vue-photo-preview/dist/skin.css'
+//import "../../../assets/css/common.scss"
+
 Vue.prototype.$moment = moment;
 
-import Mixin from "./mixins";
 Vue.mixin(Mixin);
 
-import ElementUI from 'element-ui';
-import "@/assets/css/element-variables.scss";
-import 'element-ui/lib/theme-chalk/index.css';
 Vue.use(ElementUI)
 
-import preview from 'vue-photo-preview'
-import 'vue-photo-preview/dist/skin.css'
 Vue.use(preview)
 
-import * as VueWindow from "@hscmap/vue-window";
 Vue.use(VueWindow);
 
 Vue.filter('moment', function (value, formatString) {
diff --git a/src/pages/syslog/index/App.vue b/src/pages/syslog/index/App.vue
index ac5ed2f..e9e8c79 100644
--- a/src/pages/syslog/index/App.vue
+++ b/src/pages/syslog/index/App.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="s-log-management">
     <div class="top">
-      <b>鏃ュ織绫诲瀷:</b>
+      <!-- <b>鏃ュ織绫诲瀷:</b>
       <el-select v-model="logValue" placeholder="璇烽�夋嫨" size="small">
         <el-option
           v-for="item in logOptions"
@@ -9,26 +9,45 @@
           :label="item.label"
           :value="item.value"
         ></el-option>
-      </el-select>
+      </el-select> -->
       <b>鎿嶄綔鏃堕棿:</b>
       <el-date-picker
         v-model="timeValue"
         type="datetimerange"
-        size="small"
+        size="mini"
         range-separator="鑷�"
         start-placeholder="寮�濮嬫棩鏈�"
         end-placeholder="缁撴潫鏃ユ湡"
+        style="width: 244px;"
       ></el-date-picker>
+      <b>妯″潡:</b>
+      <el-select v-model="logValue" placeholder="璇烽�夋嫨" size="mini">
+        <el-option
+          v-for="item in logOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        ></el-option>
+      </el-select>
+      <b>鍔熻兘:</b>
+      <el-select v-model="logValue" placeholder="璇烽�夋嫨" size="mini">
+        <el-option
+          v-for="item in logOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        ></el-option>
+      </el-select>
       <el-input
         v-model="searchValue"
         placeholder="璇疯緭鍏ュ唴瀹�"
         clearable
         style="width: 150px;margin: 0px 10px;"
-        size="small"
+        size="mini"
       ></el-input>
-      <el-button type="primary" size="small">鎼滅储</el-button>
-      <el-button type="danger" size="small" @click="delSelected">鎵归噺鍒犻櫎</el-button>
-      <el-button type="text" size="small" style="font-size: 13px;font-weight: 600;">瀵煎嚭</el-button>
+      <el-button type="primary" size="mini">鎼滅储</el-button>
+      <el-button type="danger" size="mini" @click="delSelected">鎵归噺鍒犻櫎</el-button>
+      <el-button type="text" size="mini" style="font-size: 13px;font-weight: 600;">瀵煎嚭</el-button>
     </div>
     <div class="foot-table s-table">
       <el-table
@@ -158,9 +177,11 @@
 .s-log-management {
   height: 100%;
   width: 100%;
+  padding: 20px;
+  box-sizing: border-box;
   .top {
     width: 100%;
-    margin-top: 10px;
+    
     margin-bottom: 20px;
     overflow-y: auto;
     min-width: 1156px;

--
Gitblit v1.8.0