index.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <template>
  2. <div class="page_longDialysis">
  3. <div class="box">
  4. <div class="info">
  5. <div class="photo">
  6. <img :src="patientform.avatar" alt />
  7. </div>
  8. <div class="infoRight">
  9. <div class="rightTop">
  10. <span class="name">{{patientform.name}}</span>
  11. <span>{{patientform.sex}}</span>&ensp;|
  12. <span>{{patientform.age}}岁</span>
  13. </div>
  14. <div class="rightBottom">
  15. <p class="num">
  16. [透析号:
  17. <span>{{patientform.dialysis_no}}</span>]
  18. </p>
  19. <div class="imgList">
  20. <img src="../../assets/images/b1.png" alt />
  21. <img src="../../assets/images/b2.png" alt />
  22. <img src="../../assets/images/b3.png" alt />
  23. <img src="../../assets/images/b4.png" alt />
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="search">
  30. <el-input
  31. placeholder="输入医嘱内容"
  32. prefix-icon="el-icon-search"
  33. v-model="searchVal"
  34. ></el-input>
  35. </div>
  36. <div class="time">
  37. <van-cell @click="showPopup(1)">
  38. {{ startTime }}
  39. <van-icon name="arrow-down" />
  40. </van-cell>
  41. <van-popup v-model="show1" position="bottom" :style="{ height: '50%' }">
  42. <van-datetime-picker
  43. v-model="currentDate1"
  44. type="date"
  45. @cancel="show1 = false"
  46. @confirm="chooseStartTime"
  47. />
  48. </van-popup>
  49. <div class="line">-</div>
  50. <van-cell @click="showPopup(2)">
  51. {{ endTime }}
  52. <van-icon name="arrow-down" />
  53. </van-cell>
  54. <van-popup v-model="show2" position="bottom" :style="{ height: '50%' }">
  55. <van-datetime-picker
  56. v-model="currentDate2"
  57. type="date"
  58. @cancel="show2 = false"
  59. @confirm="chooseEndTime"
  60. />
  61. </van-popup>
  62. </div>
  63. <div class="statOrder">
  64. <div class="statOrderOne" v-for="item in this.dialysisOrder" :key="item.id">
  65. <van-swipe-cell>
  66. <van-cell :border="false">
  67. <template>
  68. <div class="custom-title">{{RecordTime(item.dialysis_date)}}</div>
  69. </template>
  70. <van-icon
  71. slot="right-icon"
  72. name="ellipsis"
  73. style="line-height: inherit;"
  74. @click="onClick(2)"
  75. />
  76. </van-cell>
  77. <template slot="right">
  78. <van-button square type="danger" text="删除" />
  79. </template>
  80. </van-swipe-cell>
  81. <van-action-sheet
  82. v-model="show3"
  83. :actions="actions"
  84. cancel-text="取消"
  85. ></van-action-sheet>
  86. <!-- <div class="title">
  87. <i class="header-icon el-icon-arrow-down"></i>
  88. <p class="year">2019.10.17</p>
  89. <p class="edit">编辑</p>
  90. </div>-->
  91. <div class="msg">
  92. <ul class="msglist">
  93. <li>透析模式: <span>HD</span></li>
  94. <li>透析时长(h/min): <span>2h30min</span></li>
  95. <li>血流量(ml/min): <span>2h30min</span></li>
  96. <li>目标超滤量(ml): <span>10ml</span></li>
  97. <li>透析液配方: <span>HD</span></li>
  98. <li>抗凝剂: <span>HD</span></li>
  99. <li>首剂(mg): <span>HD</span></li>
  100. <li>维持(mg/h): <span>2h30min</span></li>
  101. </ul>
  102. </div>
  103. </div>
  104. <div class="statOrderOne">
  105. <van-swipe-cell>
  106. <van-cell :border="false" title="2019.10.17">
  107. <van-icon
  108. slot="right-icon"
  109. name="ellipsis"
  110. style="line-height: inherit;"
  111. @click="onClick(2)"
  112. />
  113. </van-cell>
  114. <template slot="right">
  115. <van-button square type="danger" text="删除" />
  116. </template>
  117. </van-swipe-cell>
  118. <van-action-sheet
  119. v-model="show3"
  120. :actions="actions"
  121. cancel-text="取消"
  122. ></van-action-sheet>
  123. <!-- <div class="title">
  124. <i class="header-icon el-icon-arrow-down"></i>
  125. <p class="year">2019.10.17</p>
  126. <p class="edit">编辑</p>
  127. </div> -->
  128. <div class="msg">
  129. <ul class="msglist">
  130. <li>透析模式: <span>HD</span></li>
  131. <li>透析时长(h/min): <span>2h30min</span></li>
  132. <li>血流量(ml/min): <span>2h30min</span></li>
  133. <li>目标超滤量(ml): <span>10ml</span></li>
  134. <li>透析液配方: <span>HD</span></li>
  135. <li>抗凝剂: <span>HD</span></li>
  136. <li>首剂(mg): <span>HD</span></li>
  137. <li>维持(mg/h): <span>2h30min</span></li>
  138. </ul>
  139. </div>
  140. </div>
  141. </div>
  142. <div class="add">
  143. <img src="../../assets/images/add4.png" alt />
  144. </div>
  145. </div>
  146. </template>
  147. <script>
  148. const moment = require('moment')
  149. import { getDialysRecord } from '@/api/patient/patient'
  150. import { uParseTime } from '@/utils/tools'
  151. export default {
  152. data() {
  153. return {
  154. searchVal: '',
  155. startTime: moment(new Date()).format('YYYY-MM-DD'),
  156. endTime: moment(new Date()).format('YYYY-MM-DD'),
  157. show1: false,
  158. show2: false,
  159. currentDate1: new Date(),
  160. currentDate2: new Date(),
  161. show3: false,
  162. actions: [
  163. { name: '编辑' },
  164. { name: '删除' },
  165. { name: '选项', subname: '描述信息' }
  166. ],
  167. patientform: {
  168. name: '',
  169. sex: '',
  170. age: '',
  171. dialysis_no: '',
  172. avatar: ''
  173. },
  174. dialysisOrder: []
  175. }
  176. },
  177. methods: {
  178. showPopup(index) {
  179. if (index == 1) {
  180. this.show1 = true
  181. } else if (index == 2) {
  182. this.show2 = true
  183. }
  184. },
  185. chooseStartTime(value) {
  186. this.startTime = moment(value).format('YYYY-MM-DD')
  187. this.show1 = false
  188. var patientid = this.$route.query.patientid
  189. console.log('patientid', patientid)
  190. var orgid = this.$route.query.orgid
  191. console.log('orgid', orgid)
  192. this.getDialysRecord(patientid, orgid, this.startTime)
  193. },
  194. chooseEndTime(value) {
  195. this.endTime = moment(value).format('YYYY-MM-DD')
  196. this.show2 = false
  197. var patientid = this.$route.query.patientid
  198. console.log('patientid', patientid)
  199. var orgid = this.$route.query.orgid
  200. this.getDialysRecord(patientid, orgid, this.endTime)
  201. },
  202. onClick(index) {
  203. if (index == 1) {
  204. this.show3 = true
  205. } else if (index == 2) {
  206. this.show3 = true
  207. }
  208. },
  209. RecordTime(time) {
  210. // return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  211. return uParseTime(time, '{y}-{m}-{d}')
  212. },
  213. getDialysRecord(patientid, orgid, startTime, endTime) {
  214. getDialysRecord(patientid, orgid, this.startTime, this.endTime).then(response => {
  215. if (response.data.state === 1) {
  216. var dialysisOrder = response.data.data.dialysisOrder
  217. this.dialysisOrder = dialysisOrder
  218. var patients = response.data.data.patients
  219. this.patientform = patients
  220. if (patients.gender === 1) {
  221. this.patientform.sex = '男'
  222. }
  223. if (patients.gender === 2) {
  224. this.patientform.sex = '女'
  225. }
  226. console.log('patients', patients)
  227. console.log('dialysisorder', dialysisOrder)
  228. }
  229. })
  230. }
  231. },
  232. created() {
  233. var patientid = this.$route.query.patientid
  234. console.log('patientid', patientid)
  235. var orgid = this.$route.query.orgid
  236. console.log('orgid', orgid)
  237. this.getDialysRecord(patientid, orgid)
  238. }
  239. }
  240. </script>
  241. <style lang="scss">
  242. .page_longDialysis {
  243. overflow: hidden;
  244. height: 100%;
  245. overflow-y: auto;
  246. .box {
  247. width: 100%;
  248. height: 9.1875rem;
  249. background: #fcfcfc;
  250. padding-top: 1.25rem;
  251. box-sizing: border-box;
  252. }
  253. .info {
  254. width: 21.375rem;
  255. height: 6.1875rem;
  256. background: rgba(255, 255, 255, 1);
  257. border-radius: 10px;
  258. margin: 0 auto;
  259. box-shadow: 0px 2px 12px 0px #f5f5f5;
  260. .photo {
  261. float: left;
  262. width: 3.75rem;
  263. height: 3.75rem;
  264. margin: 1.125rem 1rem 0 1.125rem;
  265. img {
  266. width: 100%;
  267. }
  268. }
  269. .infoRight {
  270. float: left;
  271. padding-top: 1.625rem;
  272. box-sizing: border-box;
  273. .rightTop {
  274. margin-bottom: 0.75rem;
  275. }
  276. .name {
  277. font-size: 1.0625rem;
  278. font-weight: 600;
  279. color: rgba(0, 0, 0, 1);
  280. margin-right: 1rem;
  281. }
  282. span {
  283. font-size: 0.875rem;
  284. color: rgba(60, 60, 60, 1);
  285. }
  286. .rightBottom {
  287. height: 1.4375rem;
  288. line-height: 1.4375rem;
  289. .num {
  290. float: left;
  291. font-size: 0.875rem;
  292. color: rgba(60, 60, 60, 1);
  293. }
  294. .imgList {
  295. float: left;
  296. margin-left: 0.875rem;
  297. img {
  298. width: 1.4375rem;
  299. height: 1.4375rem;
  300. margin: 0 0.125rem;
  301. }
  302. }
  303. }
  304. }
  305. }
  306. .search {
  307. width: 21.375rem;
  308. height: 2.125rem;
  309. background: rgba(244, 244, 244, 1);
  310. border-radius: 17px;
  311. margin: 0 auto;
  312. .el-input__inner {
  313. height: 2.125rem;
  314. line-height: 2.125rem;
  315. border: none;
  316. background: rgba(244, 244, 244, 1);
  317. border-radius: 17px;
  318. padding-left: 2.5rem;
  319. color: rgba(155, 155, 155, 1);
  320. font-size: 0.9375rem;
  321. }
  322. .el-input__prefix {
  323. margin-top: 0.0625rem;
  324. font-size: 1.25rem;
  325. }
  326. .el-input__icon {
  327. line-height: 2.125rem;
  328. }
  329. }
  330. .time {
  331. color: #9b9b9b;
  332. margin-left: 1rem;
  333. margin-top: 0.75rem;
  334. width: 342px;
  335. // height:2.125rem;
  336. overflow: hidden;
  337. .van-cell {
  338. width: 8.5rem;
  339. height: 2.125rem;
  340. line-height: 2.125rem;
  341. background: #f4f4f4;
  342. border-radius: 17px;
  343. margin-bottom: 0.75rem;
  344. padding: 0 1rem;
  345. font-size: 0.875rem;
  346. float: left;
  347. .van-icon-arrow-down {
  348. float: right;
  349. line-height: 2.125rem;
  350. }
  351. }
  352. .line {
  353. float: left;
  354. line-height: 2.125rem;
  355. }
  356. }
  357. .statOrder {
  358. width: 21.5625rem;
  359. margin: 0 auto;
  360. .statOrderOne {
  361. // margin-bottom: 1.25rem;
  362. border-top: 1px dashed #e6e6e6;
  363. border-bottom: 1px dashed #e6e6e6;
  364. }
  365. .van-cell {
  366. padding: 0.625rem 0.375rem;
  367. }
  368. .van-cell__value {
  369. span {
  370. float: right;
  371. width: 4.5625rem;
  372. height: 1.875rem;
  373. background: rgba(81, 119, 238, 0.2);
  374. border-radius: 15px;
  375. color: #5177ee;
  376. text-align: center;
  377. line-height: 1.875rem;
  378. margin-left: 8.75rem;
  379. }
  380. }
  381. // .edit {
  382. // float: right;
  383. // width: 4.5625rem;
  384. // height: 1.875rem;
  385. // background: rgba(81, 119, 238, 0.2);
  386. // border-radius: 15px;
  387. // color: #5177ee;
  388. // text-align: center;
  389. // line-height: 1.875rem;
  390. // margin-left: 8.75rem;
  391. // }
  392. // .title {
  393. // border-top: 1px solid #e6e6e6;
  394. // display: flex;
  395. // height: 3.125rem;
  396. // align-items: center;
  397. // }
  398. // .el-icon-arrow-down {
  399. // margin-left: 0.5rem;
  400. // }
  401. // .year {
  402. // margin-left: 0.625rem;
  403. // font-size: 0.9375rem;
  404. // font-weight: 600;
  405. // color: rgba(0, 0, 0, 1);
  406. // }
  407. .msg {
  408. font-size: 0.75rem;
  409. color: rgba(60, 60, 60, 1);
  410. font-weight: 600;
  411. // padding-top: 0.75rem;
  412. padding-bottom: 1rem;
  413. // border-top: 1px dashed #e6e6e6;
  414. .msglist {
  415. overflow: hidden;
  416. li {
  417. width: 50%;
  418. float: left;
  419. line-height: 16px;
  420. }
  421. }
  422. }
  423. .el-collapse-item__content {
  424. padding-bottom: 1rem;
  425. }
  426. .el-collapse {
  427. border-top: none;
  428. }
  429. .none {
  430. padding-bottom: 0;
  431. }
  432. }
  433. .add {
  434. width: 4.5rem;
  435. height: 4.5rem;
  436. background: rgba(255, 255, 255, 1);
  437. box-shadow: 0px 3px 9px 0px rgba(7, 30, 102, 0.15);
  438. border-radius: 50%;
  439. position: fixed;
  440. right: 1.125rem;
  441. bottom: 4.25rem;
  442. img {
  443. width: 100%;
  444. }
  445. }
  446. }
  447. </style>