<template>
  <div class="m-container">
    <h2>
      <div class="squrt"></div>系统日志
    </h2>
    <div class="m-core">
        <tab-router v-model="activeIndex" type="card" >
          <el-tab-pane label="系统通知" lazy v-if="permissionList.journalItem" name="SYSTEM">
            <list :type="activeIndex" v-if="activeIndex == 'SYSTEM'" saveKey="journal-system" permissionStr="journalItem/look" />
          </el-tab-pane>
          <el-tab-pane label="学生申诉" lazy v-if="permissionList.studentComplain" name="STUDENT">
            <list :type="activeIndex" v-if="activeIndex == 'STUDENT'" saveKey="journal-student" permissionStr="courseSchedule/queryCourseScheduleComplaintsDetail/look" />
          </el-tab-pane>
          <el-tab-pane label="退团退课" lazy v-if="permissionList.musicGroupCourse" name="MUSICGROUP">
            <list :type="activeIndex" v-if="activeIndex == 'MUSICGROUP'" saveKey="journal-musicGroup" permissionStr="musicGroupQuit/query" />
          </el-tab-pane>
          <el-tab-pane label="请假处理" lazy v-if="permissionList.leaveOperation" name="LEAVE">
            <list :type="activeIndex" v-if="activeIndex == 'LEAVE'" saveKey="journal-leave" permissionStr="teacherLeaveRecord/queryDetail" />
          </el-tab-pane>
          <el-tab-pane label="VIP申请审核" lazy v-if="permissionList.vipApply" name="VIPAPPLY">
            <list :type="activeIndex" v-if="activeIndex == 'VIPAPPLY'" saveKey="journal-vipApply" permissionStr="vipGroupManage/getVipGroupDetailForAudit" />
          </el-tab-pane>
        </tab-router>
    </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>
