华西海圻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.

113 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. <syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/>
  14. <syff v-if="active === 'syff'" :study="study" @showDetail="showDetailCallback"/>
  15. <wzlb v-if="active === 'wzlb'" :study="study" @showDetail="showDetailCallback"/>
  16. <syj v-if="active === 'syj'" :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 syxx from './syxx.vue'
  25. import syff from './syff.vue'
  26. import wzlb from './wzlb.vue'
  27. import syj from './syj.vue'
  28. export default {
  29. name: 'StudyEnter',
  30. props: {},
  31. components: { ytbd, tbbd ,syxx,syff,wzlb, syj},
  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: 'syxx', name: this.$t('page.business.study.studyEnter.syxx') },
  41. { key: 'wzlb', name: this.$t('page.business.study.studyEnter.wzlb') },
  42. { key: 'syff', name: this.$t('page.business.study.studyEnter.syfflb') },
  43. { key: 'syj', name: this.$t('page.business.study.studyEnter.syjsygl') }
  44. ],
  45. active: 'ytbd',
  46. study: {},
  47. }
  48. },
  49. created() {
  50. // let x = this.$route.params
  51. // let y = this.$route.query
  52. // debugger
  53. },
  54. methods: {
  55. show(row) {
  56. this.study = row
  57. },
  58. showDetailCallback(val) {
  59. this.showDetail = val
  60. },
  61. changeTab(item) {
  62. if (this.active !== item.key) {
  63. this.active = item.key
  64. }
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .study-enter {
  71. .search-box {
  72. background: #fff;
  73. padding: 0;
  74. border-radius: 3px;
  75. margin-bottom: 10px;
  76. display: flex;
  77. flex-direction: row;
  78. align-items: center;
  79. .search-item {
  80. padding: 10px 20px;
  81. font-size: 14px;
  82. cursor: pointer;
  83. &.active {
  84. background: #1890ff;
  85. color: #fff;
  86. }
  87. &:hover {
  88. background: #46a6ff;
  89. color: #fff;
  90. }
  91. &:first-child {
  92. border-top-left-radius: 3px;
  93. border-bottom-left-radius: 3px;
  94. }
  95. &:last-child {
  96. border-top-right-radius: 3px;
  97. border-bottom-right-radius: 3px;
  98. }
  99. }
  100. }
  101. .content-box {}
  102. }
  103. </style>