血透系统pad前端

RecordPage.vue 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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 v-show="index == 0" title="候诊区" :search_keyword="search_keyword"></waiting-area>
  122. <dialysis-area
  123. v-show="index == 1"
  124. title="透析区"
  125. :search_keyword="search_keyword"
  126. @clear_search_keyword="clearKeyword"
  127. ></dialysis-area>
  128. </div>
  129. </div>
  130. </template>
  131. <script>
  132. import DialysisArea from "./DialysisArea";
  133. import WaitingArea from "./WaitingArea";
  134. import { Popover } from "vux";
  135. import { getDialysisScheduals, getWaitingScheduals } from "@/api/dialysis";
  136. import { parseTime } from "@/utils/index";
  137. import { getDialysisOrWaitSelectedConfig } from "@/utils/data_config";
  138. export default {
  139. name: "RecordPage",
  140. props: {
  141. un_read_wait_num: {
  142. type: Number
  143. },
  144. un_read_dialysis_num: {
  145. type: Number
  146. }
  147. },
  148. data() {
  149. return {
  150. index: 1,
  151. search_input: "",
  152. search_keyword: "",
  153. scheduals: [],
  154. advice_groups: [],
  155. unReadWaitNum: 0,
  156. unReadDialysisNum: 0
  157. };
  158. },
  159. components: {
  160. DialysisArea,
  161. WaitingArea,
  162. Popover
  163. // Group,
  164. // Cell
  165. },
  166. methods: {
  167. ClickTab: function(tabIndex) {
  168. this.index = tabIndex;
  169. },
  170. searchWithKeyword: function() {
  171. this.$refs.search_field.blur();
  172. this.search_keyword = this.search_input;
  173. },
  174. clearKeyword: function() {
  175. this.search_input = "";
  176. this.search_keyword = "";
  177. }
  178. },
  179. created() {
  180. var index = getDialysisOrWaitSelectedConfig();
  181. console.log(index);
  182. if (index != null) {
  183. this.index = index;
  184. }
  185. }
  186. };
  187. </script>
  188. <style lang="scss" scoped>
  189. .top_row {
  190. // height: 50px;
  191. font-size: 0.3rem;
  192. padding: 0 0.3rem 0;
  193. @media only screen and (min-width: 813px) and (max-width: 1024px) {
  194. padding: 0.3rem 0.3rem;
  195. }
  196. // border-bottom: 1px #e5e5e5 solid;
  197. // display: flex;
  198. // align-items: center;
  199. background: #258ffc;
  200. .floatLeft {
  201. line-height: 1rem;
  202. height: 1rem;
  203. margin-top: 0.1rem;
  204. .order {
  205. float: right;
  206. font-size: 0.45rem;
  207. color: #fff;
  208. }
  209. }
  210. .search {
  211. float: right;
  212. margin-top: 15px;
  213. }
  214. }
  215. .title {
  216. font-size: 0.45rem;
  217. font-weight: 600;
  218. height: 45px;
  219. // line-height: 50px;
  220. margin-left: 8px;
  221. // color: $title-color;
  222. color: #fff;
  223. }
  224. .newDepartment {
  225. text-align: center;
  226. // height: 100%;
  227. width: 60%;
  228. margin: 0 auto;
  229. ul {
  230. height: 100%;
  231. display: flex;
  232. justify-content: space-around;
  233. align-items: center;
  234. li {
  235. float: left;
  236. font-size: 0.45rem;
  237. margin: 0 0.2rem;
  238. height: 0.8rem;
  239. line-height: 0.8rem;
  240. padding: 0 0.4rem;
  241. // color: $title-color;
  242. color: #fff;
  243. &.active {
  244. // background: $main-color;
  245. background: #ffffff;
  246. color: #258ffc;
  247. border-radius: 30px;
  248. }
  249. }
  250. }
  251. }
  252. .add_schedule_btn {
  253. margin-left: 10px;
  254. float: right;
  255. background-color: #ff7978;
  256. border: none;
  257. }
  258. .redpoint {
  259. display: inline-block;
  260. height: 30px;
  261. width: 30px;
  262. line-height: 26px;
  263. text-align: center;
  264. font-size: 0.8em;
  265. border-radius: 20px;
  266. color: #fff;
  267. background: #f56c6c;
  268. position: absolute;
  269. top: -6px;
  270. right: -8px;
  271. border: 1px solid #fff;
  272. @media only screen and (max-width: 767px) {
  273. height: 16px;
  274. width: 16px;
  275. line-height: 15px;
  276. }
  277. @media only screen and (min-width: 415px) and (max-width: 767px) {
  278. height: 20px;
  279. width: 20px;
  280. line-height: 20px;
  281. font-size: 0.36rem;
  282. }
  283. }
  284. .box {
  285. height: 1rem;
  286. margin-top: 0.26rem;
  287. background: #258ffc;
  288. }
  289. .head {
  290. width: 45px;
  291. height: 45px;
  292. border-radius: 50%;
  293. margin-top: 3px;
  294. display: inline-block;
  295. float: left;
  296. img {
  297. width: 100%;
  298. height: 100%;
  299. border-radius: 50%;
  300. }
  301. }
  302. .newSearch {
  303. height: 1rem;
  304. width: 100%;
  305. background: #fff;
  306. border-radius: 30px;
  307. overflow: hidden;
  308. .searchBtn {
  309. width: 14%;
  310. float: right;
  311. height: 1rem;
  312. line-height: 1rem;
  313. text-align: center;
  314. font-size: 0.45rem;
  315. color: #258ffc;
  316. vertical-align: middle;
  317. }
  318. }
  319. </style>
  320. <style lang="scss">
  321. .newinput {
  322. height: 100%;
  323. width: 85% !important;
  324. float: left;
  325. .el-input__inner {
  326. height: 1rem;
  327. line-height: 1rem;
  328. width: 100%;
  329. border-radius: 30px;
  330. border: none;
  331. font-size: 0.45rem;
  332. box-sizing: border-box;
  333. padding-bottom: 0.05rem;
  334. vertical-align: middle;
  335. @media only screen and (min-width: 768px) {
  336. padding-left: 0.9rem !important;
  337. }
  338. }
  339. .el-input__icon {
  340. line-height: 0.95rem;
  341. font-size: 0.45rem;
  342. margin-top: 0.02rem;
  343. padding-left: 0.1rem;
  344. @media only screen and (min-width: 768px) {
  345. margin-top: 1px;
  346. }
  347. }
  348. .el-input__prefix {
  349. // left:1px;
  350. @media only screen and (min-width: 768px) {
  351. left: 10px;
  352. }
  353. }
  354. }
  355. </style>