RecordPage.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  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="floatLeftBox">
  10. <div class="floatLeft">
  11. <!-- <span class="title">{{ $store.getters.user.org.org_short_name }}</span>
  12. <router-link to="/add_urgent_schedule">
  13. <p class="order">临时排班</p>
  14. </router-link>-->
  15. <i
  16. class="iconfont icon-zuojiantou jiantou"
  17. @click="toReturn"
  18. ></i>
  19. <span class="titleName">透析记录</span>
  20. <router-link to="/add_urgent_schedule">
  21. <p class="order">临时排班</p>
  22. </router-link>
  23. <!-- <van-icon class="icons" name="ellipsis" @click="show = true" /> -->
  24. </div>
  25. <van-popup
  26. v-model="show"
  27. closeable
  28. position="top"
  29. :style="{ height: '200px' }"
  30. >
  31. <div class="popupContent">
  32. <div class="popupBox">
  33. <div class="popupBoxOne" @click="goMonitoring">
  34. <img src="../../assets/images/T1.png" alt />
  35. <p>透析监测</p>
  36. </div>
  37. <div class="popupBoxOne" @click="goAdvice">
  38. <img src="../../assets/images/T2.png" alt />
  39. <p>透析医嘱</p>
  40. </div>
  41. <div class="popupBoxOne" @click="goSchedule">
  42. <img src="../../assets/images/T3.png" alt />
  43. <p>临时排班</p>
  44. </div>
  45. </div>
  46. </div>
  47. </van-popup>
  48. </div>
  49. <!-- </van-col> -->
  50. <!-- <van-col :span="6">
  51. <div class="department">
  52. <ul>
  53. <li style="position: relative;" :class="index == 0? 'active':'' " @click="ClickTab(0)">
  54. {{'候诊区'}}
  55. <span class="redpoint" v-if="un_read_wait_num">{{un_read_wait_num > 99 ? un_read_wait_num+'+':un_read_wait_num}}</span>
  56. </li>
  57. <li style="position: relative;" :class="index == 1? 'active':'' " @click="ClickTab(1)">
  58. {{'透析区'}}
  59. <span class="redpoint" v-if="un_read_dialysis_num">{{un_read_dialysis_num > 99 ? un_read_dialysis_num+'+':un_read_dialysis_num}}</span>
  60. </li>
  61. </ul>
  62. </div>
  63. </van-col>-->
  64. <!-- <van-col :span="10"> -->
  65. <!-- <router-link to="/add_urgent_schedule">
  66. <van-button size="small" type="info" class="add_schedule_btn">临时排班</van-button>
  67. </router-link>-->
  68. <!-- <div class="search">
  69. <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
  70. <i class="iconfont" slot="left-icon">&#xe741;</i>
  71. <van-button
  72. slot="button"
  73. size="small"
  74. type="info"
  75. style="border: none;"
  76. @click="searchWithKeyword"
  77. >搜索</van-button>
  78. </van-field>
  79. </div>-->
  80. <!-- </van-col>
  81. </van-row>-->
  82. <div class="newSearch">
  83. <!-- <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
  84. <i class="iconfont" slot="left-icon">&#xe741;</i>
  85. <van-button
  86. slot="button"
  87. size="small"
  88. type="info"
  89. style="border: none;"
  90. @click="searchWithKeyword"
  91. >搜索</van-button>
  92. </van-field>-->
  93. <el-input
  94. class="newinput"
  95. prefix-icon="el-icon-search"
  96. v-model="search_input"
  97. ref="search_field"
  98. placeholder="透析号/姓名"
  99. ></el-input>
  100. <p class="searchBtn" @click="searchWithKeyword">搜索</p>
  101. </div>
  102. <div class="box">
  103. <div class="newDepartment">
  104. <ul>
  105. <li
  106. style="position: relative;"
  107. :class="index == 0 ? 'active' : ''"
  108. @click="ClickTab(0)"
  109. >
  110. {{ "候诊区" }}
  111. <span class="redpoint" v-if="un_read_wait_num">
  112. {{
  113. un_read_wait_num > 99
  114. ? un_read_wait_num + "+"
  115. : un_read_wait_num
  116. }}
  117. </span>
  118. </li>
  119. <li
  120. style="position: relative;"
  121. :class="index == 1 ? 'active' : ''"
  122. @click="ClickTab(1)"
  123. >
  124. {{ "透析区" }}
  125. <span class="redpoint" v-if="un_read_dialysis_num">
  126. {{
  127. un_read_dialysis_num > 99
  128. ? un_read_dialysis_num + "+"
  129. : un_read_dialysis_num
  130. }}
  131. </span>
  132. </li>
  133. </ul>
  134. </div>
  135. </div>
  136. </div>
  137. <!-- <div class="top">
  138. <div class="hospital">
  139. <span class="title"> {{ $store.getters.user.org.org_short_name }} </span>
  140. </div>
  141. <div class="department">
  142. <ul>
  143. <li v-for="(item,i) in ['候诊室','透析区']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
  144. </ul>
  145. </div>
  146. <div class="search">
  147. <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;">
  148. <i class="iconfont" slot="left-icon">&#xe741;</i>
  149. <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索</van-button>
  150. </van-field>
  151. </div>
  152. <van-button size="small" type="info">临时排班</van-button>
  153. </div>-->
  154. <div class="area">
  155. <waiting-area
  156. ref="waitingArea"
  157. v-show="index == 0"
  158. title="候诊区"
  159. :search_keyword="search_keyword"
  160. ></waiting-area>
  161. <dialysis-area
  162. @refWaitingArea="refWaitingArea"
  163. v-show="index == 1"
  164. title="透析区"
  165. :search_keyword="search_keyword"
  166. @clear_search_keyword="clearKeyword"
  167. ></dialysis-area>
  168. </div>
  169. <div class="fixedBox">
  170. <div @click="goMonitoring" style="margin-bottom:0.375rem">
  171. <img src="../../assets/images/monitoring.png" alt />
  172. </div>
  173. <div @click="goAdvice">
  174. <img src="../../assets/images/advice.png" alt />
  175. </div>
  176. </div>
  177. </div>
  178. </template>
  179. <script>
  180. import DialysisArea from "./DialysisArea";
  181. import WaitingArea from "./WaitingArea";
  182. import { Popover } from "vux";
  183. import { getDialysisScheduals, getWaitingScheduals } from "@/api/dialysis";
  184. import { parseTime } from "@/utils/index";
  185. import { getDialysisOrWaitSelectedConfig } from "@/utils/data_config";
  186. export default {
  187. name: "RecordPage",
  188. props: {
  189. un_read_wait_num: {
  190. type: Number
  191. },
  192. un_read_dialysis_num: {
  193. type: Number
  194. }
  195. },
  196. data() {
  197. return {
  198. index: 1,
  199. search_input: "",
  200. search_keyword: "",
  201. scheduals: [],
  202. advice_groups: [],
  203. unReadWaitNum: 0,
  204. unReadDialysisNum: 0,
  205. show: false
  206. };
  207. },
  208. components: {
  209. DialysisArea,
  210. WaitingArea,
  211. Popover
  212. // Group,
  213. // Cell
  214. },
  215. methods: {
  216. refWaitingArea: function() {
  217. this.$refs.waitingArea.requestScheduals();
  218. this.$emit("refAdvice");
  219. },
  220. ClickTab: function(tabIndex) {
  221. this.index = tabIndex;
  222. },
  223. searchWithKeyword: function() {
  224. this.$refs.search_field.blur();
  225. this.search_keyword = this.search_input;
  226. },
  227. clearKeyword: function() {
  228. this.search_input = "";
  229. this.search_keyword = "";
  230. },
  231. goSchedule() {
  232. this.$router.push("/add_urgent_schedule");
  233. },
  234. goMonitoring() {
  235. this.$router.push("/monitoring");
  236. },
  237. goAdvice() {
  238. this.$router.push("/advice");
  239. },
  240. toReturn() {
  241. this.$router.push("/homeIndex");
  242. }
  243. },
  244. created() {
  245. var index = getDialysisOrWaitSelectedConfig();
  246. console.log(index);
  247. if (index != null) {
  248. this.index = index;
  249. }
  250. }
  251. };
  252. </script>
  253. <style lang="scss" scoped>
  254. .top_row {
  255. // height: 50px;
  256. font-size: 0.3rem;
  257. padding: 0 0.3rem 0;
  258. @media only screen and (min-width: 813px) and (max-width: 1024px) {
  259. padding: 0.3rem 0.3rem;
  260. }
  261. // border-bottom: 1px #e5e5e5 solid;
  262. // display: flex;
  263. // align-items: center;
  264. background: #258ffc;
  265. .floatLeftBox {
  266. .van-popup {
  267. top: 0;
  268. transform: translate3d(0, 0, 0);
  269. border-radius: 0;
  270. }
  271. .popupContent {
  272. display: flex;
  273. justify-content: space-around;
  274. align-items: center;
  275. height: 100%;
  276. }
  277. .popupBox {
  278. display: flex;
  279. justify-content: space-around;
  280. width: 100%;
  281. height: 40%;
  282. .popupBoxOne {
  283. display: flex;
  284. align-items: center;
  285. justify-content: space-around;
  286. flex-direction: column;
  287. font-size: 0.44rem;
  288. img {
  289. width: 1.7rem;
  290. height: 1.7rem;
  291. }
  292. }
  293. }
  294. }
  295. .floatLeft {
  296. height: 1rem;
  297. // margin-top: 0.1rem;
  298. display: flex;
  299. align-items: center;
  300. justify-content: space-between;
  301. color: #fff;
  302. font-size: 0.6rem;
  303. .titleName {
  304. font-size: 0.6rem;
  305. }
  306. .icons {
  307. font-size: 0.8rem;
  308. }
  309. .jiantou {
  310. font-size: 0.8rem;
  311. color: #fff;
  312. }
  313. .order {
  314. float: right;
  315. font-size: 0.45rem;
  316. color: #fff;
  317. }
  318. }
  319. .search {
  320. float: right;
  321. margin-top: 15px;
  322. }
  323. }
  324. .title {
  325. font-size: 0.45rem;
  326. font-weight: 600;
  327. height: 45px;
  328. // line-height: 50px;
  329. margin-left: 8px;
  330. // color: $title-color;
  331. color: #fff;
  332. }
  333. .newDepartment {
  334. text-align: center;
  335. // height: 100%;
  336. width: 60%;
  337. margin: 0 auto;
  338. ul {
  339. height: 100%;
  340. display: flex;
  341. justify-content: space-around;
  342. align-items: center;
  343. li {
  344. float: left;
  345. font-size: 0.45rem;
  346. margin: 0 0.2rem;
  347. height: 0.8rem;
  348. line-height: 0.8rem;
  349. padding: 0 0.4rem;
  350. // color: $title-color;
  351. color: #fff;
  352. &.active {
  353. // background: $main-color;
  354. background: #ffffff;
  355. color: #258ffc;
  356. border-radius: 30px;
  357. }
  358. }
  359. }
  360. }
  361. .add_schedule_btn {
  362. margin-left: 10px;
  363. float: right;
  364. background-color: #ff7978;
  365. border: none;
  366. }
  367. .redpoint {
  368. display: inline-block;
  369. height: 30px;
  370. width: 30px;
  371. line-height: 26px;
  372. text-align: center;
  373. font-size: 0.8em;
  374. border-radius: 20px;
  375. color: #fff;
  376. background: #f56c6c;
  377. position: absolute;
  378. top: -6px;
  379. right: -8px;
  380. border: 1px solid #fff;
  381. @media only screen and (max-width: 767px) {
  382. height: 16px;
  383. width: 16px;
  384. line-height: 15px;
  385. }
  386. @media only screen and (min-width: 415px) and (max-width: 767px) {
  387. height: 20px;
  388. width: 20px;
  389. line-height: 20px;
  390. font-size: 0.36rem;
  391. }
  392. }
  393. .box {
  394. height: 1rem;
  395. margin-top: 0.26rem;
  396. background: #258ffc;
  397. }
  398. .head {
  399. width: 45px;
  400. height: 45px;
  401. border-radius: 50%;
  402. margin-top: 3px;
  403. display: inline-block;
  404. float: left;
  405. img {
  406. width: 100%;
  407. height: 100%;
  408. border-radius: 50%;
  409. }
  410. }
  411. .newSearch {
  412. height: 1rem;
  413. width: 100%;
  414. background: #fff;
  415. border-radius: 30px;
  416. overflow: hidden;
  417. .searchBtn {
  418. width: 14%;
  419. float: right;
  420. height: 1rem;
  421. line-height: 1rem;
  422. text-align: center;
  423. font-size: 0.45rem;
  424. color: #258ffc;
  425. vertical-align: middle;
  426. }
  427. }
  428. .fixedBox {
  429. position: fixed;
  430. bottom: 0.625rem;
  431. right: 0.625rem;
  432. img {
  433. width: 1.875rem;
  434. height: 1.875rem;
  435. }
  436. }
  437. </style>
  438. <style lang="scss">
  439. .newinput {
  440. height: 100%;
  441. width: 85% !important;
  442. float: left;
  443. .el-input__inner {
  444. height: 1rem;
  445. line-height: 1rem;
  446. width: 100%;
  447. border-radius: 30px;
  448. border: none;
  449. font-size: 0.45rem;
  450. box-sizing: border-box;
  451. padding-bottom: 0.05rem;
  452. vertical-align: middle;
  453. @media only screen and (min-width: 768px) {
  454. padding-left: 0.9rem !important;
  455. }
  456. @media only screen and (min-width: 416px) and (max-width: 767px) {
  457. padding-left: 1.2rem !important;
  458. }
  459. }
  460. .el-input__icon {
  461. line-height: 0.95rem;
  462. font-size: 0.45rem;
  463. margin-top: 0.02rem;
  464. padding-left: 0.1rem;
  465. @media only screen and (min-width: 768px) {
  466. margin-top: 1px;
  467. font-size: 24px;
  468. width: 0;
  469. }
  470. @media only screen and (min-width: 416px) and (max-width: 767px) {
  471. margin-top: 1px;
  472. font-size: 24px;
  473. width: 0;
  474. }
  475. }
  476. .el-input__prefix {
  477. // left:1px;
  478. @media only screen and (min-width: 768px) {
  479. // left: 10px;
  480. }
  481. }
  482. }
  483. </style>