<!--
 * @Description: 分析标签集页面组件
 * @Author: liusheng
 * @Date: 2024-09-29 09:01:52
-->
<template>
  <div class="body">
    <el-tabs class="tab-header" v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="计算型标签" :name="panelList[0]">
        <comp-tagset-panel />
      </el-tab-pane>
      <el-tab-pane label="评估型标签" :name="panelList[1]">
        <eval-tagset-panel />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import CompTagSetPanel from "./CompTagSetPanel.vue";
import EvalTagSetPanel from "./EvalTagSetPanel.vue";

export default {
  name: 'AnalTagSetList',
  components: { 
     'comp-tagset-panel': CompTagSetPanel,
     'eval-tagset-panel': EvalTagSetPanel,
  },

  data() {
    return {
      panelList: ['comptag', 'evaltag'],
      activeIndex: 0,
      activeName: '',
    }
  },

  methods: {
    handleClick(tab, _event) {
      this.activeIndex = tab.index;
      this.activeName = this.panelList[this.activeIndex];
    }
  },
  
  mounted() {
    this.activeName = this.panelList[0];
  }
}
</script>

<style scoped>
.body {
  margin: 0 20px;
  text-align: center;
  border: solid 0px;
}
.tab-header {
  margin: 0 20px;
}
</style>