From 832896ccaf8ac6a8ca31394e55577f064bc5eacf Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期一, 20 十二月 2021 11:05:48 +0800
Subject: [PATCH] 暂存
---
src/pages/syslog/index/App.vue | 251 +++++++++++++++++---------------------------------
1 files changed, 85 insertions(+), 166 deletions(-)
diff --git a/src/pages/syslog/index/App.vue b/src/pages/syslog/index/App.vue
index 2b2d37e..09e8fa8 100644
--- a/src/pages/syslog/index/App.vue
+++ b/src/pages/syslog/index/App.vue
@@ -1,190 +1,109 @@
<template>
- <div class="s-log-management">
- <div class="top">
- <b>鏃ュ織绫诲瀷:</b>
- <el-select v-model="logValue" placeholder="璇烽�夋嫨" size="small">
- <el-option
- v-for="item in logOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- <b>鏃堕棿:</b>
- <el-date-picker
- v-model="timeValue"
- type="datetimerange"
- size="small"
- range-separator="鑷�"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- ></el-date-picker>
- <el-input
- v-model="searchValue"
- placeholder="璇疯緭鍏ュ唴瀹�"
- clearable
- style="width: 150px;margin: 0px 10px;"
- size="small"
- ></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>
- </div>
- <div class="foot-table s-table">
- <el-table
- ref="multipleTable"
- highlight-current-row
- :data="tableData"
- style="width: 100%"
- :header-cell-style="{background:'#f8f8f8',color:'#222222'}"
- @selection-change="handleSelectionChange"
+ <div class="container">
+ <div class="container-left">
+ <div
+ class="left-card"
+ v-for="(item, i) in menuArr"
+ :key="i"
+ :class="activePage == i ? 'left-card-active' : ''"
+ @click="openMenu(item, i)"
>
- <el-table-column type="selection" width="55"></el-table-column>
- <el-table-column :align="'center'" sortable prop="index" label="搴忓彿"></el-table-column>
- <el-table-column :align="'center'" sortable prop="logtype" label="鏃ュ織绫诲瀷"></el-table-column>
- <el-table-column :align="'center'" sortable prop="username" label="鐢ㄦ埛鍚�"></el-table-column>
- <el-table-column :align="'center'" sortable prop="ipaddress" label="IP鍦板潃"></el-table-column>
- <el-table-column :align="'center'" sortable prop="operation" label="鎿嶄綔鍔熻兘"></el-table-column>
- <el-table-column :align="'center'" sortable prop="operatetime" label="鎿嶄綔鏃堕棿"></el-table-column>
- <el-table-column :align="'center'" sortable prop="operateinfo" label="鎿嶄綔淇℃伅"></el-table-column>
- <el-table-column label="鎿嶄綔" :align="'center'">
- <template slot-scope="scope">
- <el-button
- type="text"
- style="color: red;font-size:16px"
- @click="handleDelete(scope.$index, scope.row)"
- icon="el-icon-delete"
- ></el-button>
- </template>
- </el-table-column>
- </el-table>
+ <span class="icon iconfont" :style="`font-size:${item.size}px`">{{
+ item.icon
+ }}</span>
+ <span class="card-text">{{ item.name }}</span>
+ </div>
</div>
+ <operationLog v-if="activePage == 0" style="width: 100%"></operationLog>
+ <systemLog v-if="activePage == 1" style="width: 100%"></systemLog>
+ <pollingLog v-if="activePage == 2" style="width: 100%"></pollingLog>
+ <eventPushLog v-if="activePage == 3" style="width: 100%"></eventPushLog>
</div>
</template>
<script>
+import operationLog from "../views/operationLog";
+import systemLog from "../views/systemLog";
+import pollingLog from "../views/pollingLog";
+import eventPushLog from "../views/eventPushLog";
export default {
+ name: "settings",
+ components: {
+ operationLog,
+ systemLog,
+ pollingLog,
+ eventPushLog,
+ },
data() {
return {
- tableData: [
- {
- index: "1",
- logtype: "寮傚父",
- username: "admin",
- ipaddress: "192.168.10.110",
- operation: "娣诲姞鎽勫儚鏈�",
- operatetime: "2019-5-31 16:38:21",
- operateinfo: "娣诲姞鎿嶄綔"
- },
- {
- index: "2",
- logtype: "淇℃伅",
- username: "admin",
- ipaddress: "192.168.10.108",
- operation: "鍒犻櫎鎽勫儚鏈�",
- operatetime: "2019-5-31 16:38:21",
- operateinfo: "娣诲姞鎿嶄綔"
- },
- {
- index: "3",
- logtype: "鎿嶄綔",
- username: "admin",
- ipaddress: "192.168.10.110",
- operation: "娣诲姞鎽勫儚鏈�",
- operatetime: "2019-5-31 16:38:21",
- operateinfo: "娣诲姞鎿嶄綔"
- },
- {
- index: "4",
- logtype: "寮傚父",
- username: "admin",
- ipaddress: "192.168.10.110",
- operation: "娣诲姞鎽勫儚鏈�",
- operatetime: "2019-5-31 16:38:21",
- operateinfo: "娣诲姞鎿嶄綔"
- },
- {
- index: "5",
- logtype: "寮傚父",
- username: "admin",
- ipaddress: "192.168.10.110",
- operation: "鍒犻櫎鎽勫儚鏈�",
- operatetime: "2019-5-31 16:38:21",
- operateinfo: "娣诲姞鎿嶄綔"
- },
- {
- index: "6",
- logtype: "寮傚父",
- username: "admin",
- ipaddress: "192.168.10.110",
- operation: "娣诲姞鎽勫儚鏈�",
- operatetime: "2019-5-31 16:38:21",
- operateinfo: "娣诲姞鎿嶄綔"
- }
+ menuArr: [
+ { name: "鎿嶄綔鏃ュ織", icon: "\ue7c6", size: 26 },
+ { name: "绯荤粺鏃ュ織", icon: "\ue7c8", size: 26 },
+ { name: "杞鏃ュ織", icon: "\ue7c4", size: 26 },
+ { name: "浜嬩欢鎺ㄩ�佹棩蹇�", icon: "\ue7c9", size: 19 },
],
- multipleSelection: [],
- logOptions: [
- {
- value: "鍏ㄩ儴绫诲瀷",
- label: "鍏ㄩ儴绫诲瀷"
- },
- {
- value: "鍏朵粬绫诲瀷",
- label: "鍏朵粬绫诲瀷"
- }
- ],
- logValue: "鍏ㄩ儴绫诲瀷",
- timeValue: [
- new Date(2000, 10, 10, 10, 10),
- new Date(2000, 10, 11, 10, 10)
- ],
- searchValue: ""
+ activePage: 0,
};
},
methods: {
- handleDelete(index, row) {
- console.log(index, row);
+ openMenu(item, i) {
+ this.activePage = i;
},
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- delSelected() {
- console.log(this.multipleSelection);
- }
- }
+ },
};
</script>
<style lang="scss">
-.s-log-management {
+.container {
height: 100%;
- width: 100%;
- .top {
- width: 100%;
- margin-top: 10px;
- margin-bottom: 20px;
- overflow-y: auto;
- min-width: 1156px;
- height: 40px;
- text-align: left;
- b {
- padding: 0px 10px;
- }
- }
- .export {
- display: inline-block;
- padding-right: 10px;
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+ flex-basis: auto;
+ box-sizing: border-box;
+ background-color: #fff;
+ .container-left {
+ height: 100%;
+ width: 244px;
+ overflow: auto;
box-sizing: border-box;
- margin-top: 20px;
- b:hover {
- color: #2249b4;
+ flex-shrink: 0;
+ padding: 10px;
+ border-top: 1px solid #e1e0e6;
+ box-sizing: border-box;
+ background-color: #fff;
+ .left-card {
+ height: 56px;
+ cursor: pointer;
+ border-radius: 8px;
+ margin-bottom: 4px;
+ display: flex;
+ align-items: center;
+
+ .iconfont {
+ margin-left: 17px;
+ margin-right: 27px;
+ font-size: 26px;
+ }
+ .card-text {
+ font-weight: bold;
+ font-size: 14px;
+ }
}
- }
- .clear-searching {
- cursor: pointer;
- text-decoration: underline;
- width: 40px;
- font-size: 13px;
- color: #3d68e1;
+ .left-card-active {
+ background-color: #4e94ff !important;
+ color: #fff;
+ }
+ .left-card:hover {
+ background-color: #f2f2f7;
+ }
}
}
+
+.icon_clear:hover {
+ border-radius: 50%;
+ background-color: #4e94ff !important;
+ color: #fff !important;
+}
</style>
+
+
--
Gitblit v1.8.0