From 4ff29e301de38488db0ff04f0209c99e37cf30b4 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 07 十二月 2021 18:56:34 +0800
Subject: [PATCH] 对比库管理

---
 src/pages/syslog/views/systemLog.vue |   75 ++++++++++++++++++++++++++++++++-----
 1 files changed, 65 insertions(+), 10 deletions(-)

diff --git a/src/pages/syslog/views/systemLog.vue b/src/pages/syslog/views/systemLog.vue
index 4bd479f..5a52519 100644
--- a/src/pages/syslog/views/systemLog.vue
+++ b/src/pages/syslog/views/systemLog.vue
@@ -23,14 +23,25 @@
             v-model="fuzzySearch"
             size="small"
             class="input-with-select"
+            @keyup.enter.native="getOperationLog(1)"
           >
             <span
-              class="icon iconfont"
+              class="icon iconfont icon_clear"
+              @click="clearSearch"
+              slot="append"
+              v-if="fuzzySearch"
+            >
+              &#xe785;
+            </span>
+            <span
+              class="icon iconfont icon_search"
               @click="getOperationLog(1)"
               slot="append"
+              v-else
             >
               &#xe714;
             </span>
+
             <!-- <el-button
               slot="append"
               icon="el-icon-search"
@@ -51,8 +62,8 @@
           >
             <el-option label="鍏ㄩ儴" :value="''"> </el-option>
             <el-option
-              v-for="item in levelOptions"
-              :key="item.proc_name"
+              v-for="(item, index) in levelOptions"
+              :key="index"
               :label="item.proc_name"
               :value="item.proc_name"
             >
@@ -68,8 +79,8 @@
             @change="getOperationLog(1)"
           >
             <el-option
-              v-for="item in hostNameOptions"
-              :key="item.value"
+              v-for="(item, index) in hostNameOptions"
+              :key="index"
               :label="item.label"
               :value="item.value"
             >
@@ -86,7 +97,11 @@
         :data="tableData"
         :header-cell-style="{ background: '#f8f8f8', color: '#222222' }"
         style="width: 100%"
+        border
       >
+        <template slot="empty">
+          <img :src="png" class="empty_img" alt="" />
+        </template>
         <!-- <el-table-column :align="'center'" label="搴忓彿" type="index" width="50">
         </el-table-column> -->
         <el-table-column
@@ -142,12 +157,14 @@
 
 <script>
 import { deleteDate } from "@/api/system";
+import { getModules } from "@/api/log";
 import { pad0 } from "@/api/utils";
 import {} from "@/api/log";
 
 export default {
   data() {
     return {
+      png: "",
       loading: false,
       loadingText: "",
       input3: "",
@@ -208,6 +225,7 @@
     getOptions() {
       getModules().then((res) => {
         this.levelOptions = res.data;
+        this.png = require("../../../../public/images/syslog/娌℃暟鎹�.png");
       });
     },
     choseRange(item, i) {
@@ -264,6 +282,10 @@
       var preDay = new Date(new Date().getTime() - gap);
       this.timeStart = this.getTimeStr(preDay);
       this.timeEnd = this.getTimeStr(date);
+    },
+    clearSearch() {
+      this.fuzzySearch = "";
+      this.getOperationLog(1);
     },
   },
 };
@@ -341,13 +363,14 @@
             border: 2px solid #f2f2f7;
             border-right: none;
 
-            // &:focus + .el-input-group__append {
-            //   border-color: #409eff;
-            // }
+            &:focus,
+            &:focus + .el-input-group__append {
+              border-color: #409eff;
+            }
           }
 
           .el-input-group__append {
-            //    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
+            transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
             background-color: #fff;
             border: 2px solid #f2f2f7;
             border-radius: 0 18px 18px 0;
@@ -403,17 +426,49 @@
     margin-top: 16px;
     border-radius: 5px;
     padding: 12px;
-    background-color: white;
+    background-color: rgb(255, 255, 255);
+    .empty_img {
+      margin: 80px auto;
+      width: 164px;
+    }
     .tableBox {
+      border: none;
+      &::before,
+      &::after {
+        display: none;
+      }
+
+      tr {
+        td:first-child {
+          border-radius: 4px 0 0 4px;
+        }
+        td:last-child {
+          border-radius: 0 4px 4px 0;
+        }
+        &.current-row td {
+          background-color: #4e94ff !important;
+          color: #fff;
+        }
+        &:hover td {
+          background-color: rgb(242, 242, 247);
+        }
+      }
       th {
         padding: 0 !important;
         height: 40px;
         line-height: 40px;
+        border-color: #fff !important;
+        border-right: 2px solid #fff;
+        border-radius: 4px;
+        font-size: 12px;
+        background: #f2f2f7;
       }
       td {
         padding: 0 !important;
         height: 34px;
         line-height: 34px;
+        border: none;
+        font-size: 12px;
       }
     }
   }

--
Gitblit v1.8.0