log.vue 1.56 KB
Newer Older
1 2
<template>
  <div class="log-wrapper height100">
xulili's avatar
xulili committed
3 4 5 6 7 8 9 10 11 12 13
      <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>   
14 15 16
  </div>
</template>
<script>
xulili's avatar
xulili committed
17 18 19 20 21 22
import { 
     platformlog,
     userlog,
     settoplog,
     devops
} from './log/index'
23 24 25
export default {
    data(){
        return{
xulili's avatar
xulili committed
26 27
            tabs:['平台操作日志','用户操作日志','机顶盒运行日志', '运维日志'],
            activeIndex:0
28 29
        }
    },
xulili's avatar
xulili committed
30
    components:{platformlog, userlog, settoplog, devops },
31 32 33 34
    mounted(){

    },
    methods:{
xulili's avatar
xulili committed
35 36 37
       changeActive(index){
           this.activeIndex = index
       }
38 39 40 41
    }
}
</script>
<style lang="less" scoped>
xulili's avatar
xulili committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
.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);
}
66
</style>