From 6a5962fe9544005dba620b00fb36c25fe2da4e76 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 16 十一月 2021 15:24:46 +0800
Subject: [PATCH] 后端没修改的情况下添加默认背景图

---
 src/pages/syslog/views/eventPushLog.vue |   82 ++++++++++++++++++++++++++++++++++++-----
 1 files changed, 72 insertions(+), 10 deletions(-)

diff --git a/src/pages/syslog/views/eventPushLog.vue b/src/pages/syslog/views/eventPushLog.vue
index b17cb4b..6cbeea0 100644
--- a/src/pages/syslog/views/eventPushLog.vue
+++ b/src/pages/syslog/views/eventPushLog.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, i) in levelOptions"
+              :key="i"
               :label="item.proc_name"
               :value="item.proc_name"
             >
@@ -72,7 +83,11 @@
         :header-cell-style="{ background: '#f8f8f8', color: '#222222' }"
         style="width: 100%"
         v-if="!showSubTable"
+        border
       >
+        <template slot="empty">
+          <img :src="png1" class="empty_img" alt="" />
+        </template>
         <el-table-column :align="'center'" label="搴忓彿" type="index" width="50">
         </el-table-column>
         <el-table-column
@@ -107,14 +122,13 @@
         <el-table-column
           :align="'center'"
           prop="msg"
-          min-width="100px"
           label="澶辫触鎬婚噺"
         ></el-table-column>
       </el-table>
 
       <div class="back" v-if="showSubTable" @click="showSubTable = false">
         <span class="icon iconfont">&#xe680;</span>
-        <span class="title">浜嬩欢鎺ㄩ�佹棩蹇�</span>
+        <span class="title" style="color: #4e94ff">浜嬩欢鎺ㄩ�佹棩蹇�</span>
       </div>
       <el-table
         class="tableBox"
@@ -125,7 +139,11 @@
         :header-cell-style="{ background: '#f8f8f8', color: '#222222' }"
         style="width: 100%"
         v-if="showSubTable"
+        border
       >
+        <template slot="empty">
+          <img :src="png2" class="empty_img2" alt="" />
+        </template>
         <el-table-column :align="'center'" label="搴忓彿" type="index" width="50">
         </el-table-column>
         <el-table-column
@@ -176,11 +194,13 @@
 <script>
 import { deleteDate } from "@/api/system";
 import { pad0 } from "@/api/utils";
-import {} from "@/api/log";
+import { getModules } from "@/api/log";
 
 export default {
   data() {
     return {
+      png1: "",
+      png2: require("../../../../public/images/syslog/娌℃暟鎹�.png"),
       loading: false,
       loadingText: "",
       showSubTable: false,
@@ -251,6 +271,7 @@
     getOptions() {
       getModules().then((res) => {
         this.levelOptions = res.data;
+        this.png1 = require("../../../../public/images/syslog/娌℃暟鎹�.png");
       });
     },
     clickFaults(row, column, cell, event) {
@@ -310,6 +331,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);
     },
   },
 };
@@ -387,13 +412,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;
@@ -450,6 +476,14 @@
     border-radius: 5px;
     padding: 12px;
     background-color: white;
+    .empty_img {
+      margin: 80px auto;
+      width: 164px;
+    }
+    .empty_img2 {
+      margin: 50px auto;
+      width: 164px;
+    }
     .back {
       display: flex;
       align-items: center;
@@ -465,15 +499,43 @@
       }
     }
     .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