<template>
  <div class="question-wrapper">
    <el-tabs v-model="activeTab" @tab-click="clickTab">
      <el-tab-pane label="阅片标准配置" name="criterions">
        <criterions-tmp v-if="activeTab == 'criterions'" />
      </el-tab-pane>
      <el-tab-pane label="DICOM字段匿名化配置" name="anonymization">
        <Anonymization v-if="activeTab == 'anonymization'" />
      </el-tab-pane>
      <el-tab-pane label="签名管理" name="sign">
        <Sign v-if="activeTab == 'sign'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import QcQuestions from './components/QcQuestions.vue'
import CriterionsTmp from './components/CriterionsTmp'
import ClinicalData from './components/ClinicalDataConfig'
import MedicalAudit from './components/MedicalAudit'
import Anonymization from './components/Anonymization'
import IncreaseFields from './components/IncreaseFields'
import Email from './email/index.vue'
import Sign from './sign/index.vue'
export default {
  name: 'Questions',
  components: {
    QcQuestions, CriterionsTmp, ClinicalData, Anonymization, IncreaseFields, Email, Sign,
    MedicalAudit
  },
  data() {
    return {
      activeTab: 'criterions'
    }
  }, mounted() {
    if (this.$route.query.tabActive) {
      this.activeTab = this.$route.query.tabActive
    } else {
      this.activeTab = 'criterions'
    }
  },
  methods: {
    clickTab(tab, event) {
      this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` })
    }
  }
}
</script>
<style lang="scss">
.question-wrapper{
  .el-tabs{
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .el-tabs__header {
    height: 40px;
    margin-bottom:5px;
  }
  .el-tabs__content{
    flex: 1;
    .el-tab-pane{
      height: 100%;
    }
  }
}
</style>

