Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

BasicInfor.vue 6.9KB

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