华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
2.9 KiB

  1. <template>
  2. <div class="study-enter">
  3. <div class="content-list">
  4. <div class="search-box" v-show="!showDetail">
  5. <div class="search-item" :class="active === item.key ? 'active' : ''" v-for="(item, index) in tabList"
  6. :key="index" @click="changeTab(item)">
  7. {{ item.name }}
  8. </div>
  9. </div>
  10. <div class="content-box">
  11. <ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
  12. <tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
  13. <sqbd v-if="active === 'sqbd'" :study="study" @showDetail="showDetailCallback"/>
  14. <syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/>
  15. <syff v-if="active === 'syff'" :study="study" @showDetail="showDetailCallback"/>
  16. <wzlb v-if="active === 'wzlb'" :study="study" @showDetail="showDetailCallback"/>
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import ytbd from './ytbd.vue'
  23. import tbbd from './tbbd.vue'
  24. import sqbd from './sqbd.vue'
  25. import syxx from './syxx.vue'
  26. import syff from './syff.vue'
  27. import wzlb from './wzlb.vue'
  28. export default {
  29. name: 'StudyEnter',
  30. props: {},
  31. components: { ytbd, tbbd ,syxx,sqbd,syff,wzlb},
  32. computed: {},
  33. filters: {},
  34. data() {
  35. return {
  36. showDetail: false,
  37. tabList: [
  38. { key: 'ytbd', name: this.$t('page.business.study.studyEnter.ytbdlb') },
  39. { key: 'tbbd', name: this.$t('page.business.study.studyEnter.tbbdlb') },
  40. { key: 'sqbd', name: this.$t('page.business.study.studyEnter.sqbdlb') },
  41. { key: 'syxx', name: this.$t('page.business.study.studyEnter.syxx') },
  42. { key: 'wzlb', name: this.$t('page.business.study.studyEnter.wzlb') },
  43. { key: 'syff', name: this.$t('page.business.study.studyEnter.syfflb') },
  44. { key: 'syj', name: this.$t('page.business.study.studyEnter.syjsygl') }
  45. ],
  46. active: 'ytbd',
  47. study: {},
  48. }
  49. },
  50. created() { },
  51. methods: {
  52. show(row) {
  53. this.study = row
  54. },
  55. showDetailCallback(val) {
  56. this.showDetail = val
  57. },
  58. changeTab(item) {
  59. if (this.active !== item.key) {
  60. this.active = item.key
  61. }
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .study-enter {
  68. .search-box {
  69. background: #fff;
  70. padding: 0;
  71. border-radius: 3px;
  72. margin-bottom: 10px;
  73. display: flex;
  74. flex-direction: row;
  75. align-items: center;
  76. .search-item {
  77. padding: 10px 20px;
  78. font-size: 14px;
  79. cursor: pointer;
  80. &.active {
  81. background: #1890ff;
  82. color: #fff;
  83. }
  84. &:hover {
  85. background: #46a6ff;
  86. color: #fff;
  87. }
  88. &:first-child {
  89. border-top-left-radius: 3px;
  90. border-bottom-left-radius: 3px;
  91. }
  92. &:last-child {
  93. border-top-right-radius: 3px;
  94. border-bottom-right-radius: 3px;
  95. }
  96. }
  97. }
  98. .content-box {}
  99. }
  100. </style>