<template>
  <div class="p-2">
    <a-tabs v-model:activeKey="activeKey">
      <a-tab-pane key="1" tab="成绩列表"> 
        <XxhbjwxtjxrwList @callback="handleCjXiangxi" />
        <XxhbjwxtxsmdList v-show="cjxxShow" ref="cjxxRef"/>
      </a-tab-pane>
      <a-tab-pane key="2" tab="作业列表">
        <ZyHuizongList @callback="handleZyXiangxi" />
        <ZyHuizongXiangxiList v-show="zyhzxxShow" ref="zyxxRef"/>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script lang="ts" name="zyHuizong-zyHuizong" setup>
import { ref } from 'vue';
import ZyHuizongList from '/@/views/bl/zyHuizong/ZyHuizongList.vue';
import ZyHuizongXiangxiList from '/@/views/bl/zyHuizongXiangxi/ZyHuizongXiangxiList.vue';
import XxhbjwxtjxrwList from '/@/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList.vue';
import XxhbjwxtxsmdList from '/@/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList.vue';


const activeKey = ref('1');
const zyxxRef = ref();
const cjxxRef = ref();
const zyhzxxShow = ref<boolean>(false);
const cjxxShow = ref<boolean>(false);

function handleZyXiangxi(record) {
  console.log('🤡', record);
  zyxxRef.value.init(record);
  zyhzxxShow.value = true;
}

function handleCjXiangxi(record) {
  console.log('🤡', record);
  cjxxRef.value.init(record);
  cjxxShow.value = true;
}
</script>

<style lang="less" scoped>
</style>
