血透系统pad前端

DialysisTab.vue 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <div class="fixedBox">
  3. <div class="nav">
  4. <ul>
  5. <li
  6. v-for="(item, i) in [
  7. '长期透析处方',
  8. '透析记录',
  9. '排班信息',
  10. '宣教信息'
  11. ]"
  12. :key="i"
  13. :class="index == i ? 'active' : ''"
  14. @click="ClickTab(i)"
  15. >
  16. {{ item }}
  17. </li>
  18. </ul>
  19. </div>
  20. <div class="tab-content">
  21. <long-table v-show="index == 0" title="长期透析处方"></long-table>
  22. <record-table v-show="index == 1" title="透析记录"></record-table>
  23. <!--<advice-table v-show="index==2" title="医嘱信息"></advice-table>-->
  24. <schedul-table v-show="index == 2" class="排班信息"></schedul-table>
  25. <mission-table v-show="index == 3" class="宣教信息"></mission-table>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. import LongTable from "./LongTable";
  31. import SchedulTable from "./SchedulTable";
  32. import RecordTable from "./RecordTable";
  33. import AdviceTable from "./AdviceTable";
  34. import MissionTable from "./MissionTable";
  35. export default {
  36. name: "DialysisTab",
  37. data() {
  38. return {
  39. index: 0
  40. };
  41. },
  42. components: {
  43. LongTable,
  44. SchedulTable,
  45. RecordTable,
  46. AdviceTable,
  47. MissionTable
  48. },
  49. methods: {
  50. ClickTab: function(tabIndex) {
  51. this.index = tabIndex;
  52. }
  53. }
  54. };
  55. </script>
  56. <style style="stylesheet/scss" lang="scss" scoped>
  57. .fixedBox {
  58. padding-top: 38px;
  59. // background: #fff;
  60. min-height: calc(100vh - 64px);
  61. // @media only screen and (min-width: 376px) and (max-width: 737px) {
  62. // padding-top: 46px;
  63. // }
  64. @media only screen and (min-width: 500px) {
  65. padding-top: 82px;
  66. }
  67. // @media only screen and (min-width: 813px) and (max-width: 1024px) {
  68. // padding-top: 74px;
  69. // }
  70. .nav {
  71. border-bottom: 1px #e5e5e5 solid;
  72. position: fixed;
  73. top: 40px;
  74. @media only screen and (min-width: 500px) {
  75. top: 63px;
  76. }
  77. // @media only screen and (min-width: 813px) and (max-width: 1024px) {
  78. // top: 64px;
  79. // }
  80. // @media only screen and (min-width: 376px) and (max-width: 668px) {
  81. // top: 50px;
  82. // }
  83. right: 0;
  84. z-index: 66;
  85. left: 0;
  86. background: #fff;
  87. ul {
  88. width: 80%;
  89. margin: 0 auto;
  90. @include box-sizing;
  91. @include display-flex;
  92. @include align-items-center;
  93. @include text-align;
  94. @include justify-content-between;
  95. li {
  96. font-size: 0.45rem;
  97. float: left;
  98. color: $pgh-color;
  99. padding: 0.3rem 0;
  100. cursor: pointer;
  101. }
  102. .active {
  103. position: relative;
  104. &::before {
  105. width: 100%;
  106. height: 2px;
  107. color: $main-color;
  108. position: absolute;
  109. bottom: 0;
  110. left: 0;
  111. content: "";
  112. background: $main-color;
  113. }
  114. }
  115. }
  116. }
  117. }
  118. </style>