血透系统pad前端

AdvicePage.vue 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div>
  3. <van-row class="top_row">
  4. <van-col :span="9">
  5. <div style="visibility: hidden">
  6. <span class="title"></span>
  7. </div>
  8. </van-col>
  9. <van-col :span="14">
  10. <div class="department">
  11. <ul>
  12. <li
  13. v-for="(item,i) in ['透析临嘱','普通医嘱']"
  14. :key="i"
  15. :class="index == i? 'active':'' "
  16. @click="ClickTab(i)"
  17. >{{item}}</li>
  18. </ul>
  19. </div>
  20. </van-col>
  21. <van-col :span="4">
  22. <router-link to="/add_urgent_schedule"></router-link>
  23. <div class="search" style="visibility: hidden">
  24. <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
  25. <i class="iconfont" slot="left-icon">&#xe741;</i>
  26. <van-button
  27. slot="button"
  28. size="small"
  29. type="info"
  30. style="border: none;"
  31. @click="searchWithKeyword"
  32. >搜索</van-button>
  33. </van-field>
  34. </div>
  35. </van-col>
  36. </van-row>
  37. <div class="area">
  38. <DialysisAdviceTable v-show="index==0"></DialysisAdviceTable>
  39. <NormalAdviceTable v-show="index==1"></NormalAdviceTable>
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. import DialysisAdviceTable from "./DialysisAdviceTable";
  45. import NormalAdviceTable from "./NormalAdviceTable";
  46. export default {
  47. name: "RecordPage",
  48. data() {
  49. return {
  50. index: 0,
  51. search_input: "",
  52. search_keyword: ""
  53. };
  54. },
  55. components: {
  56. NormalAdviceTable,
  57. DialysisAdviceTable
  58. },
  59. methods: {
  60. ClickTab: function(tabIndex) {
  61. this.index = tabIndex;
  62. },
  63. searchWithKeyword: function() {
  64. this.$refs.search_field.blur();
  65. this.search_keyword = this.search_input;
  66. },
  67. clearKeyword: function() {
  68. this.search_input = "";
  69. this.search_keyword = "";
  70. }
  71. }
  72. };
  73. </script>
  74. <style style="stylesheet/scss" lang="scss" scoped>
  75. .top_row {
  76. font-size: 0.3rem;
  77. padding: 0.3rem 0.3rem;
  78. // border-bottom: 1px #e5e5e5 solid;
  79. display: flex;
  80. align-items: center;
  81. }
  82. .title {
  83. font-size: 0.34rem;
  84. font-weight: 600;
  85. color: $title-color;
  86. }
  87. .department {
  88. text-align: center;
  89. ul {
  90. li {
  91. float: left;
  92. font-size: 0.36rem;
  93. margin: 0 0.2rem;
  94. height: 0.64rem;
  95. line-height: 0.64rem;
  96. padding: 0 0.3rem;
  97. color: $title-color;
  98. &.active {
  99. background: $main-color;
  100. color: #fff;
  101. border-radius: 30px;
  102. }
  103. }
  104. }
  105. }
  106. .search {
  107. color: #a8b3ba;
  108. width: 4.2rem;
  109. float: right;
  110. .iconfont {
  111. color: #a8b3ba;
  112. font-size: 0.36rem;
  113. }
  114. .field {
  115. background-color: #ebf1f7;
  116. height: 0.6rem;
  117. line-height: 0.6rem;
  118. padding: 0 0 0 10px;
  119. border-radius: 30px;
  120. }
  121. }
  122. .add_schedule_btn {
  123. margin-left: 10px;
  124. float: right;
  125. background-color: #ff7978;
  126. border: none;
  127. @media only screen and (max-width: 812px) {
  128. min-width: 60px !important;
  129. }
  130. }
  131. </style>