BasicInfor.vue 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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.birthday == 0) {
  105. return ''
  106. }
  107. return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
  108. },
  109. stepState: function() {
  110. return parseInt((Math.random() * 1000) + '') % 2 == 1
  111. }
  112. },
  113. created() {
  114. this.dialysis_time = parseTime(this.$route.query.date, '{y}-{m}-{d}')
  115. }
  116. }
  117. </script>
  118. <style style="stylesheet/scss" lang="scss" scoped>
  119. .ui-step {
  120. margin: 20px 30px 0 30px;
  121. padding: 5px 0 10px 0;
  122. zoom: 1;
  123. background: #fff;
  124. .ui-step-tit {
  125. font-size: 18px;
  126. text-align: center;
  127. color: #34495e;
  128. font-weight: 700;
  129. height: 50px;
  130. line-height: 50px;
  131. }
  132. .ui-step-ul {
  133. list-style: none;
  134. .ui-step-done {
  135. float: left;
  136. position: relative;
  137. -webkit-box-sizing: border-box;
  138. -moz-box-sizing: border-box;
  139. box-sizing: border-box;
  140. text-align: center;
  141. width: 10%;
  142. &:before,
  143. &:after {
  144. position: absolute;
  145. left: 0;
  146. top: 21px;
  147. display: block;
  148. content: " ";
  149. content: " ";
  150. width: 50%;
  151. height: 1px;
  152. background: #409eff;
  153. z-index: 1;
  154. }
  155. &:after {
  156. left: 50%;
  157. }
  158. &:first-child:before,
  159. &:last-child::after {
  160. width: 0;
  161. }
  162. .ui-step-title {
  163. color: #34495e;
  164. font-size: 15px;
  165. font-weight: normal;
  166. line-height: 18px;
  167. }
  168. .ui-step-number {
  169. position: relative;
  170. display: inline-block;
  171. width: 22px;
  172. height: 22px;
  173. margin: 10px 0;
  174. line-height: 22px;
  175. background: #409eff;
  176. color: #fff;
  177. border-radius: 100%;
  178. -webkit-box-sizing: border-box;
  179. -moz-box-sizing: border-box;
  180. box-sizing: border-box;
  181. z-index: 2;
  182. border: 1px #409eff solid;
  183. i {
  184. position: absolute;
  185. left: 4px;
  186. top: 6px;
  187. width: 12px;
  188. height: 6px;
  189. border: 2px #fff solid;
  190. color: #fff;
  191. z-index: 9;
  192. border-top: none;
  193. border-right: none;
  194. transform: rotate(-45deg);
  195. -webkit-transform: rotate(-45deg);
  196. -moz-transform: rotate(-45deg);
  197. -ms-transform: rotate(-45deg);
  198. -o-transform: rotate(-45deg);
  199. }
  200. }
  201. }
  202. .unfinished {
  203. .ui-step-number {
  204. background: #fff;
  205. color: #fff;
  206. border: 1px $main-color solid;
  207. border-radius: 50%;
  208. }
  209. }
  210. }
  211. }
  212. .info {
  213. padding:20px 40px;
  214. li {
  215. float: left;
  216. width: 28%;
  217. // margin: 0 1rem 0 0;
  218. font-size: 15px;
  219. height: 35px;
  220. line-height: 35px;
  221. color: #34495e;
  222. margin-left: 60px;
  223. }
  224. // border: solid red 1px;
  225. }
  226. </style>