<template>
  <div class="main-box">
    <el-tabs v-model="activeName" @tab-change="handleClick">
      <el-tab-pane label="待审核" name="pending">
        <AuditList ref="pendingRef" :is-audit="false" />
      </el-tab-pane>
      <el-tab-pane label="已审核" name="resolve">
        <AuditList ref="resolveRef" :is-audit="true" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script lang="ts" setup name="SemanticsAssociationAudit">
import { ref } from "vue";
import AuditList from "./components/AuditList.vue";

const pendingRef = ref<typeof AuditList>();
const resolveRef = ref<typeof AuditList>();
const activeName = ref("pending");

const handleClick = () => {
  if (activeName.value === "resolve") {
    pendingRef.value?.getTableList();
  } else {
    resolveRef.value?.getTableList();
  }
};
</script>
<style lang="scss" scoped>
.main-box {
  height: 100%;
  padding: 0;
  padding-bottom: 10px;
  .tableNode {
    flex: 1;
  }
  :deep(.el-tabs) {
    display: flex;
    width: 100%;
    height: 100%;
    margin-top: 1px;

    --el-tabs-header-height: 56px;
    .el-tabs__header {
      margin-bottom: 10px;
      background: #ffffff;
      .el-tabs__nav-wrap {
        padding-left: 20px;
      }
      .el-tabs__item {
        font-size: 16px;
        &.is-active {
          font-size: 18px;
        }
      }
      .el-tabs__nav-scroll {
        &::after {
          height: 1px;
          background: #dcdfe6;
        }
      }
    }
    .el-tabs__content {
      flex: 1;
      margin: 0 20px;
      .el-tab-pane {
        height: 100%;
      }
    }
  }
}
</style>
