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
<template>
<div class="log-wrapper height100">
<ul class="btn-tab-group">
<li v-for="(item,index) in tabs" :key="index" @click="changeActive(index)" :class="{'active':activeIndex===index}">
{{item}}
</li>
</ul>
<div class="tab-content">
<platformlog v-if="activeIndex===0"/>
<userlog v-if="activeIndex===1"/>
<settoplog v-if="activeIndex===2"/>
<devops v-if="activeIndex===3"/>
</div>
</div>
</template>
<script>
import {
platformlog,
userlog,
settoplog,
devops
} from './log/index'
export default {
data(){
return{
tabs:['平台操作日志','用户操作日志','机顶盒运行日志', '运维日志'],
activeIndex:0
}
},
components:{platformlog, userlog, settoplog, devops },
mounted(){
},
methods:{
changeActive(index){
this.activeIndex = index
}
}
}
</script>
<style lang="less" scoped>
.btn-tab-group{
display: flex;
li{
width: 160px;
height: 40px;
line-height: 40px;
text-align: center;
background: rgba(172,147,116,0.10);
border: 1px solid #AC9374;
border-radius: 8px 8px 0 0;
border-bottom: none;
font-size: 16px;
color: @party-btn-color;
cursor: default;
&.active{
background-color: @party-btn-color;
border-color: @party-btn-color;
color: @party-white;
}
}
}
.tab-content{
height: calc(100% - 40px);
}
</style>