血透系统pad前端

RecordPage.vue 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div>
  3. <van-row class="top_row">
  4. <van-col :span="9">
  5. <div>
  6. <span class="title"> {{ $store.getters.user.org.org_short_name }} </span>
  7. </div>
  8. </van-col>
  9. <van-col :span="6">
  10. <div class="department">
  11. <ul>
  12. <li :class="index == 0? 'active':'' " @click="ClickTab(0)">
  13. {{'候诊区'}}
  14. <span class="redpoint" v-if="un_read_wait_num">{{un_read_wait_num > 99 ? un_read_wait_num+'+':un_read_wait_num}}</span>
  15. </li>
  16. <li :class="index == 1? 'active':'' " @click="ClickTab(1)">
  17. {{'透析区'}}
  18. <span class="redpoint" v-if="un_read_dialysis_num">{{un_read_dialysis_num > 99 ? un_read_dialysis_num+'+':un_read_dialysis_num}}</span>
  19. </li>
  20. </ul>
  21. </div>
  22. </van-col>
  23. <van-col :span="9">
  24. <router-link to="/add_urgent_schedule">
  25. <van-button size="small" type="info" class="add_schedule_btn">临时排班</van-button>
  26. </router-link>
  27. <div class="search">
  28. <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
  29. <i class="iconfont" slot="left-icon">&#xe741;</i>
  30. <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索
  31. </van-button>
  32. </van-field>
  33. </div>
  34. </van-col>
  35. </van-row>
  36. <!-- <div class="top">
  37. <div class="hospital">
  38. <span class="title"> {{ $store.getters.user.org.org_short_name }} </span>
  39. </div>
  40. <div class="department">
  41. <ul>
  42. <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
  43. </ul>
  44. </div>
  45. <div class="search">
  46. <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" style="background-color: #ebf1f7; height: 0.6rem; line-height: 0.6rem; padding: 0 0 0 10px; border-radius: 30px;">
  47. <i class="iconfont" slot="left-icon">&#xe741;</i>
  48. <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索</van-button>
  49. </van-field>
  50. </div>
  51. <van-button size="small" type="info">临时排班</van-button>
  52. </div> -->
  53. <div class="area">
  54. <waiting-area v-show="index==0" title="候诊区" :search_keyword="search_keyword"></waiting-area>
  55. <dialysis-area v-show="index==1" title="透析区" :search_keyword="search_keyword"
  56. @clear_search_keyword="clearKeyword"></dialysis-area>
  57. </div>
  58. </div>
  59. </template>
  60. <script>
  61. import DialysisArea from './DialysisArea'
  62. import WaitingArea from './WaitingArea'
  63. import {Popover} from 'vux'
  64. import {getDialysisScheduals, getWaitingScheduals} from '@/api/dialysis'
  65. import {parseTime} from '@/utils/index'
  66. export default {
  67. name: 'RecordPage',
  68. props: {
  69. un_read_wait_num: {
  70. type: Number,
  71. },
  72. un_read_dialysis_num: {
  73. type: Number,
  74. }
  75. },
  76. data () {
  77. return {
  78. index: 1,
  79. search_input: '',
  80. search_keyword: '',
  81. scheduals: [],
  82. advice_groups:[],
  83. unReadWaitNum:0,
  84. unReadDialysisNum:0,
  85. }
  86. },
  87. components: {
  88. DialysisArea,
  89. WaitingArea,
  90. Popover
  91. // Group,
  92. // Cell
  93. },
  94. methods: {
  95. ClickTab: function (tabIndex) {
  96. this.index = tabIndex
  97. },
  98. searchWithKeyword: function () {
  99. this.$refs.search_field.blur()
  100. this.search_keyword = this.search_input
  101. },
  102. clearKeyword: function () {
  103. this.search_input = ''
  104. this.search_keyword = ''
  105. },
  106. }
  107. }
  108. </script>
  109. <style style="stylesheet/scss" lang="scss" scoped>
  110. .top_row {
  111. font-size: 0.3rem;
  112. padding: 0.3rem 0.3rem;
  113. border-bottom: 1px #e5e5e5 solid;
  114. display: flex;
  115. align-items: center;
  116. }
  117. .title {
  118. font-size: 0.34rem;
  119. font-weight: 600;
  120. color: $title-color;
  121. }
  122. .department {
  123. text-align: center;
  124. ul {
  125. li {
  126. float: left;
  127. font-size: 0.36rem;
  128. margin: 0 0.2rem;
  129. height: 0.64rem;
  130. line-height: 0.64rem;
  131. padding: 0 0.3rem;
  132. color: $title-color;
  133. &.active {
  134. background: $main-color;
  135. color: #fff;
  136. border-radius: 30px;
  137. }
  138. }
  139. }
  140. }
  141. .add_schedule_btn {
  142. margin-left: 10px;
  143. float: right;
  144. background-color: #ff7978;
  145. border: none;
  146. }
  147. .redpoint{
  148. display:inline-block;
  149. height:16px;
  150. width:16px;
  151. line-height:16px;
  152. text-align:center;
  153. font-size:0.1em;
  154. border-radius:16px;
  155. color:#fff;
  156. background:red;
  157. position: relative;
  158. top: -8px;
  159. right: 8px;
  160. }
  161. </style>