<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" >
        <keep-alive>
          <div >
         <el-row :gutter="24">
           <el-col :span="12"><tab-pane v-if='activeName==item.key' :type='item.key' ></tab-pane></el-col>
           <el-col :span="12"><tableson v-if='activeName==item.key' :type='item.key' ></tableson></el-col>
         </el-row>
          </div>
        </keep-alive>
      </el-tab-pane>
    </el-tabs>
  </div>
  </div>
</template>

<script>
import tabPane from './components/table'
import tableson from './components/tableson'
import BreadCrumb from '@/xt_pages/components/bread-crumb'

export default {
  name: 'tab',
  components: { tabPane, tableson, BreadCrumb },
  data() {
    return {
      crumbs: [
        { path: false, name: '管理中心' },
        { path: 'data/dictionary', name: '数据字典' }
      ],
      tabMapOptions: [
        { label: this.$t('data_config.patient'), key: 'patient' },
        { label: this.$t('data_config.hemodialysis'), key: 'hemodialysis' },
        { label: this.$t('data_config.manage_ment'), key: 'management' }
        // { label: this.$t('data_config.scheduling'), key: 'scheduling' },
        // { label: this.$t('data_config.device'), key: 'device' },
        // { label: this.$t('data_config.system'), key: 'system' }
      ],
      activeName: 'patient',
      createdTimes: 0
    }
  },
  methods: {
    showCreatedTimes() {
      this.createdTimes = this.createdTimes + 1
    }
  }
}
</script>

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