血透系统pad前端

RecordPage.vue 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <template>
  2. <div>
  3. <!-- <van-row class="top_row">
  4. <van-col :span="14">-->
  5. <div class="top_row">
  6. <!-- <div class="head">
  7. <img :src="$store.getters.user.org.org_logo" alt />
  8. </div>-->
  9. <div class="floatLeft">
  10. <span class="title">{{ $store.getters.user.org.org_short_name }}</span>
  11. <router-link to="/add_urgent_schedule">
  12. <p class="order">临时排班</p>
  13. </router-link>
  14. </div>
  15. <!-- </van-col> -->
  16. <!-- <van-col :span="6">
  17. <div class="department">
  18. <ul>
  19. <li style="position: relative;" :class="index == 0? 'active':'' " @click="ClickTab(0)">
  20. {{'候诊区'}}
  21. <span class="redpoint" v-if="un_read_wait_num">{{un_read_wait_num > 99 ? un_read_wait_num+'+':un_read_wait_num}}</span>
  22. </li>
  23. <li style="position: relative;" :class="index == 1? 'active':'' " @click="ClickTab(1)">
  24. {{'透析区'}}
  25. <span class="redpoint" v-if="un_read_dialysis_num">{{un_read_dialysis_num > 99 ? un_read_dialysis_num+'+':un_read_dialysis_num}}</span>
  26. </li>
  27. </ul>
  28. </div>
  29. </van-col>-->
  30. <!-- <van-col :span="10"> -->
  31. <!-- <router-link to="/add_urgent_schedule">
  32. <van-button size="small" type="info" class="add_schedule_btn">临时排班</van-button>
  33. </router-link>-->
  34. <!-- <div class="search">
  35. <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
  36. <i class="iconfont" slot="left-icon">&#xe741;</i>
  37. <van-button
  38. slot="button"
  39. size="small"
  40. type="info"
  41. style="border: none;"
  42. @click="searchWithKeyword"
  43. >搜索</van-button>
  44. </van-field>
  45. </div>-->
  46. <!-- </van-col>
  47. </van-row>-->
  48. <div class="newSearch">
  49. <!-- <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
  50. <i class="iconfont" slot="left-icon">&#xe741;</i>
  51. <van-button
  52. slot="button"
  53. size="small"
  54. type="info"
  55. style="border: none;"
  56. @click="searchWithKeyword"
  57. >搜索</van-button>
  58. </van-field>-->
  59. <el-input
  60. class="newinput"
  61. prefix-icon="el-icon-search"
  62. v-model="search_input"
  63. ref="search_field"
  64. placeholder="透析号/姓名"
  65. ></el-input>
  66. <p class="searchBtn" @click="searchWithKeyword">搜索</p>
  67. </div>
  68. <div class="box">
  69. <div class="newDepartment">
  70. <ul>
  71. <li
  72. style="position: relative;"
  73. :class="index == 0 ? 'active' : ''"
  74. @click="ClickTab(0)"
  75. >
  76. {{ "候诊区" }}
  77. <span class="redpoint" v-if="un_read_wait_num">
  78. {{
  79. un_read_wait_num > 99
  80. ? un_read_wait_num + "+"
  81. : un_read_wait_num
  82. }}
  83. </span>
  84. </li>
  85. <li
  86. style="position: relative;"
  87. :class="index == 1 ? 'active' : ''"
  88. @click="ClickTab(1)"
  89. >
  90. {{ "透析区" }}
  91. <span class="redpoint" v-if="un_read_dialysis_num">
  92. {{
  93. un_read_dialysis_num > 99
  94. ? un_read_dialysis_num + "+"
  95. : un_read_dialysis_num
  96. }}
  97. </span>
  98. </li>
  99. </ul>
  100. </div>
  101. </div>
  102. </div>
  103. <!-- <div class="top">
  104. <div class="hospital">
  105. <span class="title"> {{ $store.getters.user.org.org_short_name }} </span>
  106. </div>
  107. <div class="department">
  108. <ul>
  109. <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
  110. </ul>
  111. </div>
  112. <div class="search">
  113. <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;">
  114. <i class="iconfont" slot="left-icon">&#xe741;</i>
  115. <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索</van-button>
  116. </van-field>
  117. </div>
  118. <van-button size="small" type="info">临时排班</van-button>
  119. </div>-->
  120. <div class="area">
  121. <waiting-area ref="waitingArea" v-show="index == 0" title="候诊区" :search_keyword="search_keyword"></waiting-area>
  122. <dialysis-area @refWaitingArea="refWaitingArea" v-show="index == 1" title="透析区" :search_keyword="search_keyword" @clear_search_keyword="clearKeyword" ></dialysis-area>
  123. </div>
  124. </div>
  125. </template>
  126. <script>
  127. import DialysisArea from './DialysisArea'
  128. import WaitingArea from './WaitingArea'
  129. import { Popover } from 'vux'
  130. import { getDialysisScheduals, getWaitingScheduals } from '@/api/dialysis'
  131. import { parseTime } from '@/utils/index'
  132. import { getDialysisOrWaitSelectedConfig } from '@/utils/data_config'
  133. export default {
  134. name: 'RecordPage',
  135. props: {
  136. un_read_wait_num: {
  137. type: Number
  138. },
  139. un_read_dialysis_num: {
  140. type: Number
  141. }
  142. },
  143. data () {
  144. return {
  145. index: 1,
  146. search_input: '',
  147. search_keyword: '',
  148. scheduals: [],
  149. advice_groups: [],
  150. unReadWaitNum: 0,
  151. unReadDialysisNum: 0
  152. }
  153. },
  154. components: {
  155. DialysisArea,
  156. WaitingArea,
  157. Popover
  158. // Group,
  159. // Cell
  160. },
  161. methods: {
  162. refWaitingArea: function () {
  163. this.$refs.waitingArea.requestScheduals()
  164. this.$emit('refAdvice')
  165. },
  166. ClickTab: function (tabIndex) {
  167. this.index = tabIndex
  168. },
  169. searchWithKeyword: function () {
  170. this.$refs.search_field.blur()
  171. this.search_keyword = this.search_input
  172. },
  173. clearKeyword: function () {
  174. this.search_input = ''
  175. this.search_keyword = ''
  176. }
  177. },
  178. created () {
  179. var index = getDialysisOrWaitSelectedConfig()
  180. console.log(index)
  181. if (index != null) {
  182. this.index = index
  183. }
  184. }
  185. }
  186. </script>
  187. <style lang="scss" scoped>
  188. .top_row {
  189. // height: 50px;
  190. font-size: 0.3rem;
  191. padding: 0 0.3rem 0;
  192. @media only screen and (min-width: 813px) and (max-width: 1024px) {
  193. padding: 0.3rem 0.3rem;
  194. }
  195. // border-bottom: 1px #e5e5e5 solid;
  196. // display: flex;
  197. // align-items: center;
  198. background: #258ffc;
  199. .floatLeft {
  200. line-height: 1rem;
  201. height: 1rem;
  202. margin-top: 0.1rem;
  203. .order {
  204. float: right;
  205. font-size: 0.45rem;
  206. color: #fff;
  207. }
  208. }
  209. .search {
  210. float: right;
  211. margin-top: 15px;
  212. }
  213. }
  214. .title {
  215. font-size: 0.45rem;
  216. font-weight: 600;
  217. height: 45px;
  218. // line-height: 50px;
  219. margin-left: 8px;
  220. // color: $title-color;
  221. color: #fff;
  222. }
  223. .newDepartment {
  224. text-align: center;
  225. // height: 100%;
  226. width: 60%;
  227. margin: 0 auto;
  228. ul {
  229. height: 100%;
  230. display: flex;
  231. justify-content: space-around;
  232. align-items: center;
  233. li {
  234. float: left;
  235. font-size: 0.45rem;
  236. margin: 0 0.2rem;
  237. height: 0.8rem;
  238. line-height: 0.8rem;
  239. padding: 0 0.4rem;
  240. // color: $title-color;
  241. color: #fff;
  242. &.active {
  243. // background: $main-color;
  244. background: #ffffff;
  245. color: #258ffc;
  246. border-radius: 30px;
  247. }
  248. }
  249. }
  250. }
  251. .add_schedule_btn {
  252. margin-left: 10px;
  253. float: right;
  254. background-color: #ff7978;
  255. border: none;
  256. }
  257. .redpoint {
  258. display: inline-block;
  259. height: 30px;
  260. width: 30px;
  261. line-height: 26px;
  262. text-align: center;
  263. font-size: 0.8em;
  264. border-radius: 20px;
  265. color: #fff;
  266. background: #f56c6c;
  267. position: absolute;
  268. top: -6px;
  269. right: -8px;
  270. border: 1px solid #fff;
  271. @media only screen and (max-width: 767px) {
  272. height: 16px;
  273. width: 16px;
  274. line-height: 15px;
  275. }
  276. @media only screen and (min-width: 415px) and (max-width: 767px) {
  277. height: 20px;
  278. width: 20px;
  279. line-height: 20px;
  280. font-size: 0.36rem;
  281. }
  282. }
  283. .box {
  284. height: 1rem;
  285. margin-top: 0.26rem;
  286. background: #258ffc;
  287. }
  288. .head {
  289. width: 45px;
  290. height: 45px;
  291. border-radius: 50%;
  292. margin-top: 3px;
  293. display: inline-block;
  294. float: left;
  295. img {
  296. width: 100%;
  297. height: 100%;
  298. border-radius: 50%;
  299. }
  300. }
  301. .newSearch {
  302. height: 1rem;
  303. width: 100%;
  304. background: #fff;
  305. border-radius: 30px;
  306. overflow: hidden;
  307. .searchBtn {
  308. width: 14%;
  309. float: right;
  310. height: 1rem;
  311. line-height: 1rem;
  312. text-align: center;
  313. font-size: 0.45rem;
  314. color: #258ffc;
  315. vertical-align: middle;
  316. }
  317. }
  318. </style>
  319. <style lang="scss">
  320. .newinput {
  321. height: 100%;
  322. width: 85% !important;
  323. float: left;
  324. .el-input__inner {
  325. height: 1rem;
  326. line-height: 1rem;
  327. width: 100%;
  328. border-radius: 30px;
  329. border: none;
  330. font-size: 0.45rem;
  331. box-sizing: border-box;
  332. padding-bottom: 0.05rem;
  333. vertical-align: middle;
  334. @media only screen and (min-width: 768px) {
  335. padding-left: 0.9rem !important;
  336. }
  337. }
  338. .el-input__icon {
  339. line-height: 0.95rem;
  340. font-size: 0.45rem;
  341. margin-top: 0.02rem;
  342. padding-left: 0.1rem;
  343. @media only screen and (min-width: 768px) {
  344. margin-top: 1px;
  345. }
  346. }
  347. .el-input__prefix {
  348. // left:1px;
  349. @media only screen and (min-width: 768px) {
  350. left: 10px;
  351. }
  352. }
  353. }
  354. </style>