血透系统pad前端

RecordPage.vue 9.2KB

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