1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
| <template>
| <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)"
| >
| <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 {
| menuArr: [
| { name: "操作日志", icon: "\ue7c6", size: 26 },
| { name: "系统日志", icon: "\ue7c8", size: 26 },
| { name: "轮询日志", icon: "\ue7c4", size: 26 },
| { name: "事件推送日志", icon: "\ue7c9", size: 19 },
| ],
| activePage: 0,
| };
| },
| methods: {
| openMenu(item, i) {
| this.activePage = i;
| },
| },
| };
| </script>
| <style lang="scss">
| .container {
| height: 100%;
| 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;
| 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;
| }
| }
| .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>
|
|