血透系统PC前端

template.vue 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <el-tabs v-model="activeName" >
  8. <el-tab-pane v-for="item in tabMapOptions" :label="item.label" :key='item.key' :name="item.key" style="display:flex;">
  9. <keep-alive>
  10. <div style="display:flex;width:100%;">
  11. <tab-pane v-if='activeName==item.key' :type='item.key' style="flex:1;"></tab-pane>
  12. </div>
  13. </keep-alive>
  14. </el-tab-pane>
  15. </el-tabs>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. import tabPane from './components/templateTable'
  21. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  22. export default {
  23. name: 'tab',
  24. components: { tabPane,BreadCrumb},
  25. data() {
  26. return {
  27. crumbs: [
  28. { path: false, name: '数据字典' },
  29. { path: 'data/template', name: '模版配置' },
  30. ],
  31. tabMapOptions: [
  32. { label: this.$t("data_config.education"), key: 'education'},
  33. { label: this.$t("data_config.summary"), key: 'summary'},
  34. { label: this.$t("data_config.course_disease"), key: 'course_disease' },
  35. { label: this.$t("data_config.rescue_record"), key: 'rescue_record'}
  36. ],
  37. activeName: 'education',
  38. createdTimes: 0
  39. }
  40. },
  41. methods: {
  42. showCreatedTimes() {
  43. this.createdTimes = this.createdTimes + 1
  44. }
  45. }
  46. }
  47. </script>
  48. <style scoped>
  49. .tab-container{
  50. margin: 30px;
  51. }
  52. </style>