血透系统pad前端

AdvicePage.vue 2.8KB

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