<template>
  <div class="m-container">
    <h2>
      <div class="squrt"></div>系统日志
    </h2>
    <div class="m-core">
      <location-hash v-model="activeIndex">
        <el-tabs v-model="activeIndex">
          <el-tab-pane label="系统通知" lazy v-if="permissionList.journalItem" name="SYSTEM">
            <list :type="activeIndex" />
          </el-tab-pane>
          <el-tab-pane label="学生申诉" lazy v-if="permissionList.studentComplain" name="STUDENT">
            <list :type="activeIndex" />
          </el-tab-pane>
          <!-- <el-tab-pane label="退团退课" value="MUSICGROUP"></el-tab-pane> -->
          <el-tab-pane label="请假处理" lazy v-if="permissionList.leaveOperation" name="LEAVE">
            <list :type="activeIndex" />
          </el-tab-pane>
          <el-tab-pane label="VIP申请审核" lazy v-if="permissionList.vipApply" name="VIPAPPLY">
            <list :type="activeIndex" />
          </el-tab-pane>
        </el-tabs>
      </location-hash>
    </div>
  </div>
</template>
<script>
import { permission } from '@/utils/directivePage'
import List from './model/list'
export default {
  name: 'journal',
  components: { List },
  data () {
    const query = this.$route.query;
    return {
      activeIndex: query.opt || 'SYSTEM',
      permissionList: {
        journalItem: permission("/journalItem"),
        studentComplain: permission("/studentComplain"),
        musicGroupCourse: permission("/musicGroupCourse"),
        leaveOperation: permission("/leaveOperation"),
        vipApply: permission("/vipApply")
      },
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>