<template>
  <div class="main-contain">
    <div class="position">
      <bread-crumb :crumbs="crumbs"></bread-crumb>
    </div>
    <div class="app-container">
      <el-tabs v-model="activeName">
        <el-tab-pane
          v-for="item in tabMapOptions"
          :label="item.label"
          :key="item.key"
          :name="item.key"
          style="display:flex;"
        >
          <keep-alive>
            <div style="display:flex;width:100%;">
              <tab-pane
                v-if="activeName == item.key"
                :type="item.key"
                style="flex:1;"
              ></tab-pane>
            </div>
          </keep-alive>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import tabPane from "./components/templateTable";
import BreadCrumb from "@/xt_pages/components/bread-crumb";
export default {
  name: "tab",
  components: { tabPane, BreadCrumb },
  data() {
    return {
      crumbs: [
        { path: false, name: "管理中心" },
        { path: "data/template", name: "模版配置" }
      ],
      tabMapOptions: [
        { label: this.$t("data_config.education"), key: "education" },
        { label: this.$t("data_config.summary"), key: "summary" },
        { label: this.$t("data_config.nursing_record"), key: "nursing_record" },
        { label: this.$t("data_config.special_record"), key: "special_record" },
        { label: this.$t("data_config.course_disease"), key: "course_disease" },
        { label: this.$t("data_config.rescue_record"), key: "rescue_record" },
        { label: this.$t("data_config.template_summary"), key: "template_summary" },
        { label: this.$t("data_config.template_plan"), key: "template_plan" },
        { label: this.$t("data_config.admitting_diagnosis"), key: "admitting_diagnosis" },
        { label: this.$t("data_config.discharge_diagnosis"), key:"discharge_diagnosis"},
        { label: this.$t("data_config.diagnosis_admission"), key:"diagnosis_admission"},
        { label: this.$t("data_config.treatment"), key:"treatment"},
        { label: this.$t("data_config.illness_discharge"), key:"illness_discharge"},
        { label: this.$t("data_config.discharge_advice"), key:"discharge_advice"},
        { label: this.$t("data_config.dialysis_remark"), key:"dialysis_remark"},
        { label: this.$t("data_config.catheter_operation"), key:"catheter_operation"},
        { label: this.$t("data_config.main_content"), key:"main_content"},
        { label: this.$t("data_config.patient_case"), key:"patient_case"},
        { label: this.$t("data_config.tentative_diagnosis"), key:"tentative_diagnosis"},
        { label: this.$t("data_config.diagnostic_basis"), key:"diagnostic_basis"},
        { label: this.$t("data_config.differential_diagnosis"), key:"differential_diagnosis"},
        { label: this.$t("data_config.treatment_plan"), key:"treatment_plan"},
        { label: this.$t("data_config.sick_history"), key:"sick_history"},
        { label: this.$t("data_config.befor_symptoms"), key:"befor_symptoms"},
      ],
      activeName: "education",
      createdTimes: 0
    };
  },
  methods: {
    showCreatedTimes() {
      this.createdTimes = this.createdTimes + 1;
    }
  }
};
</script>

<style scoped>
.tab-container {
  margin: 30px;
}
</style>
