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

98 lines
2.3 KiB

  1. <template>
  2. <div class="mjy-index">
  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. <gspList v-if="active === 'gspList'" @showDetail="showDetailCallback" />
  12. <ffjlList v-if="active === 'ffjlList'" @showDetail="showDetailCallback" />
  13. <rkjlList v-if="active === 'rkjlList'" @showDetail="showDetailCallback" />
  14. </div>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. import gspList from "./comps/gspList";
  20. import ffjlList from "./comps/ffjlList";
  21. import rkjlList from "./comps/rkjlList";
  22. export default {
  23. name: 'Gsp',
  24. components: { gspList, ffjlList, rkjlList },
  25. data() {
  26. return {
  27. showDetail: false,
  28. tabList: [
  29. { key: 'gspList', name: this.$t('page.business.resource.gsp.gspgl') },
  30. { key: 'rkjlList', name: this.$t('page.business.resource.gsp.gsprkjl') },
  31. { key: 'ffjlList', name: this.$t('page.business.resource.gsp.ffhsjl') },
  32. ],
  33. active: 'gspList',
  34. }
  35. },
  36. created() { },
  37. methods: {
  38. show(row) {
  39. this.study = row
  40. },
  41. changeTab(item) {
  42. if (this.active !== item.key) {
  43. this.active = item.key
  44. this.saveSimpleLog({name:this.$t(item.name,'zh_CN'),nameEn:this.$t(item.name,'en_US'),jcmc:this.$t('system.enterPage','zh_CN'),jcmcEn:this.$t('system.enterPage','en_US')})
  45. }
  46. },
  47. showDetailCallback(val) {
  48. this.showDetail = val
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .mjy-index {
  55. padding: 10px 10px;
  56. .search-box {
  57. background: #fff;
  58. padding: 0;
  59. border-radius: 3px;
  60. margin-bottom: 10px;
  61. display: flex;
  62. flex-direction: row;
  63. align-items: center;
  64. .search-item {
  65. padding: 10px 20px;
  66. font-size: 14px;
  67. cursor: pointer;
  68. &.active {
  69. background: #1890ff;
  70. color: #fff;
  71. }
  72. &:hover {
  73. background: #46a6ff;
  74. color: #fff;
  75. }
  76. &:first-child {
  77. border-top-left-radius: 3px;
  78. border-bottom-left-radius: 3px;
  79. }
  80. &:last-child {
  81. border-top-right-radius: 3px;
  82. border-bottom-right-radius: 3px;
  83. }
  84. }
  85. }
  86. .content-box {}
  87. }
  88. </style>