血透系统PC前端

BasicInfor.vue 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <div>
  3. <h2 class="DetailsTit"><span>{{ title }}</span></h2>
  4. <div class="ui-step clearfix">
  5. <ul class="ui-step-ul">
  6. <li v-for="(step, index) in steps" :key="index" class="ui-step-done" :class="step.finish ? 'ui-step-done' : 'unfinished'">
  7. <div class="ui-step-number"><i /></div>
  8. <div class="ui-step-title">{{ step.title }}</div>
  9. </li>
  10. </ul>
  11. </div>
  12. <ul class="info clearfix">
  13. <li>
  14. <label>姓名 : </label>
  15. <span>{{ patient.id == 0 ? "" : patient.name }}</span>
  16. </li>
  17. <li>
  18. <label>性别 : </label>
  19. <span>{{ patient.id == 0 ? "" : (patient.gender == 1 ? "男" : "女") }}</span>
  20. </li>
  21. <li>
  22. <label>年龄:</label>
  23. <span>{{ getAge(patient) }}</span>
  24. </li>
  25. <li>
  26. <label>透析号 : </label>
  27. <span>{{ patient.dialysis_no }}</span>
  28. </li>
  29. <li>
  30. <label>床位号 : </label>
  31. <span>{{ device_number }}</span>
  32. </li>
  33. <li>
  34. <label>来源 : </label>
  35. <span>{{ source }}</span>
  36. </li>
  37. <li>
  38. <label>住院号 : </label>
  39. <span>{{ patient.admission_number }}</span>
  40. </li>
  41. <li>
  42. <label>透析日期:</label>
  43. <span>{{dialysis_time}}</span>
  44. </li>
  45. </ul>
  46. <div class="middleLine"></div>
  47. </div>
  48. </template>
  49. <script>
  50. const moment = require('moment')
  51. import { parseTime } from '@/utils'
  52. import { jsGetAge, uParseTime } from '@/utils/tools'
  53. export default {
  54. name: 'BasicInfor',
  55. data() {
  56. return {
  57. title: '基本信息',
  58. dialysis_time:0,
  59. // steps: [
  60. // { title: "透析处方" },
  61. // { title: "接诊评估" },
  62. // { title: "透前评估" },
  63. // { title: "临时医嘱" },
  64. // { title: "透析上机" },
  65. // { title: "双人查对" },
  66. // { title: "透析监测" },
  67. // { title: "透析下机" },
  68. // { title: "透后评估" },
  69. // { title: "治疗小结" }
  70. // ]
  71. }
  72. },
  73. props: {
  74. patient: {
  75. type: Object,
  76. default: function() {
  77. return { id: 0 }
  78. }
  79. },
  80. device_number: {
  81. type: String
  82. },
  83. steps: {
  84. type: Array,
  85. default: function() {
  86. return []
  87. }
  88. }
  89. },
  90. computed: {
  91. created_time: function() {
  92. if (this.patient.id == 0) {
  93. return ''
  94. } else {
  95. return parseTime(this.patient.created_time, '{y}-{m}-{d}')
  96. }
  97. },
  98. source: function() {
  99. return this.patient.source == 1 ? '门诊' : '住院'
  100. }
  101. },
  102. methods: {
  103. getAge: function(val) {
  104. if (val.age == 0) {
  105. if (val.birthday == 0) {
  106. return ''
  107. }
  108. return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
  109. } else {
  110. return val.age
  111. }
  112. },
  113. stepState: function() {
  114. return parseInt((Math.random() * 1000) + '') % 2 == 1
  115. }
  116. },
  117. created() {
  118. this.dialysis_time = parseTime(this.$route.query.date, '{y}-{m}-{d}')
  119. }
  120. }
  121. </script>
  122. <style style="stylesheet/scss" lang="scss" scoped>
  123. .ui-step {
  124. margin: 20px 30px 0 30px;
  125. padding: 5px 0 10px 0;
  126. zoom: 1;
  127. background: #fff;
  128. .ui-step-tit {
  129. font-size: 18px;
  130. text-align: center;
  131. color: #34495e;
  132. font-weight: 700;
  133. height: 50px;
  134. line-height: 50px;
  135. }
  136. .ui-step-ul {
  137. list-style: none;
  138. .ui-step-done {
  139. float: left;
  140. position: relative;
  141. -webkit-box-sizing: border-box;
  142. -moz-box-sizing: border-box;
  143. box-sizing: border-box;
  144. text-align: center;
  145. width: 10%;
  146. &:before,
  147. &:after {
  148. position: absolute;
  149. left: 0;
  150. top: 21px;
  151. display: block;
  152. content: " ";
  153. content: " ";
  154. width: 50%;
  155. height: 1px;
  156. background: #409eff;
  157. z-index: 1;
  158. }
  159. &:after {
  160. left: 50%;
  161. }
  162. &:first-child:before,
  163. &:last-child::after {
  164. width: 0;
  165. }
  166. .ui-step-title {
  167. color: #34495e;
  168. font-size: 15px;
  169. font-weight: normal;
  170. line-height: 18px;
  171. }
  172. .ui-step-number {
  173. position: relative;
  174. display: inline-block;
  175. width: 22px;
  176. height: 22px;
  177. margin: 10px 0;
  178. line-height: 22px;
  179. background: #409eff;
  180. color: #fff;
  181. border-radius: 100%;
  182. -webkit-box-sizing: border-box;
  183. -moz-box-sizing: border-box;
  184. box-sizing: border-box;
  185. z-index: 2;
  186. border: 1px #409eff solid;
  187. i {
  188. position: absolute;
  189. left: 4px;
  190. top: 6px;
  191. width: 12px;
  192. height: 6px;
  193. border: 2px #fff solid;
  194. color: #fff;
  195. z-index: 9;
  196. border-top: none;
  197. border-right: none;
  198. transform: rotate(-45deg);
  199. -webkit-transform: rotate(-45deg);
  200. -moz-transform: rotate(-45deg);
  201. -ms-transform: rotate(-45deg);
  202. -o-transform: rotate(-45deg);
  203. }
  204. }
  205. }
  206. .unfinished {
  207. .ui-step-number {
  208. background: #fff;
  209. color: #fff;
  210. border: 1px $main-color solid;
  211. border-radius: 50%;
  212. }
  213. }
  214. }
  215. }
  216. .info {
  217. padding:20px 40px;
  218. li {
  219. float: left;
  220. width: 28%;
  221. // margin: 0 1rem 0 0;
  222. font-size: 15px;
  223. height: 35px;
  224. line-height: 35px;
  225. color: #34495e;
  226. margin-left: 60px;
  227. }
  228. // border: solid red 1px;
  229. }
  230. </style>