detail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <view class="main">
  3. <view class="content">
  4. <view class="nameBox">
  5. <view class="name">{{patientName}}</view>
  6. </view>
  7. <view class="cardNum">{{patientId}}</view>
  8. <view class="list">
  9. <view class="item" v-for="(item, index) in item">
  10. <view class="topTitle">{{ titleType(item.diagnosticType) }}</view>
  11. <view class="title">{{ item.diagnosticName }}</view>
  12. <view class="botBox">
  13. <view class="time">诊断时间: 20130529145258 </view>
  14. <view class="type">{{ diaCode(item.diagnosticCategoryCode) }}</view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. item: [],
  26. patientName:'',
  27. patientId:'',
  28. }
  29. },
  30. onLoad(e) {
  31. console.log(e);
  32. this.patientName = e.patientName
  33. this.patientId = e.patientId
  34. // this.item = [
  35. // {
  36. // topTile:'主要诊断:',
  37. // title:'慢性支气管炎急性发作',
  38. // time:'20130529145258',
  39. // type:'门诊诊断'
  40. // },{
  41. // topTile:'第一辅诊:',
  42. // title:'树枝状角膜炎',
  43. // time:'20130529145258',
  44. // type:'入院诊断'
  45. // },{
  46. // topTile:'第二辅诊:',
  47. // title:'脑梗死',
  48. // time:'20130529145258',
  49. // type:'出院诊断'
  50. // },
  51. // ]
  52. this.http.request({
  53. url: '/app/diagnosis/' + e.id,
  54. loading: 'true',
  55. success: (res) => {
  56. console.log(res);
  57. this.item = res.data.data
  58. }
  59. });
  60. },
  61. methods: {
  62. titleType(type) {
  63. // 诊断类型代码:
  64. // 0-主要诊断
  65. // 1-第一辅诊
  66. // 2-第二辅诊
  67. switch (type) {
  68. case '0':
  69. return "主要诊断:"
  70. break;
  71. case '1':
  72. return "第一辅诊:"
  73. break;
  74. case '2':
  75. return "第二辅诊:"
  76. break;
  77. }
  78. },
  79. diaCode(code) {
  80. // 诊断类别代码:
  81. // 0-门诊诊断
  82. // 1-入院诊断
  83. // 2-出院诊断
  84. // 3-中医入院诊断
  85. // 4-中医出院诊断
  86. // 5-修正诊断
  87. // 6-最终诊断
  88. // 7-初步诊断
  89. // 8 目前诊断
  90. // 9-术前诊断
  91. // 10-术后诊断
  92. // 11-产后诊断
  93. // 99-其他诊断
  94. switch (code) {
  95. case '0':
  96. return "门诊诊断"
  97. break;
  98. case '1':
  99. return "入院诊断"
  100. break;
  101. case '2':
  102. return "出院诊断"
  103. break;
  104. case '3':
  105. return "中医入院诊断"
  106. break;
  107. case '4':
  108. return "中医出院诊断"
  109. break;
  110. case '5':
  111. return "修正诊断"
  112. break;
  113. case '6':
  114. return "最终诊断"
  115. break;
  116. case '7':
  117. return "初步诊断"
  118. break;
  119. case '8':
  120. return "目前诊断"
  121. break;
  122. case '9':
  123. return "术前诊断"
  124. break;
  125. case '10':
  126. return "术后诊断"
  127. break;
  128. case '11':
  129. return "产后诊断"
  130. break;
  131. case '99':
  132. return "其他诊断"
  133. break;
  134. }
  135. },
  136. }
  137. }
  138. </script>
  139. <style lang="scss">
  140. .content {
  141. padding: 15px;
  142. background-color: white;
  143. border-radius: 8px;
  144. .nameBox {
  145. display: flex;
  146. align-items: center;
  147. .name {
  148. font-weight: bold;
  149. font-size: 16px;
  150. }
  151. }
  152. .cardNum {
  153. padding-top: 10px;
  154. font-size: 14px;
  155. }
  156. .list {
  157. .item {
  158. overflow: hidden;
  159. padding: 13px 0;
  160. border-bottom: 1px solid $line;
  161. margin-bottom: 10px;
  162. .topTitle{
  163. font-size: 18px;
  164. font-weight: bold;
  165. }
  166. .title {
  167. font-size: 24px;
  168. font-weight: bold;
  169. }
  170. .botBox {
  171. display: flex;
  172. justify-content: space-between;
  173. align-items: center;
  174. .time,
  175. .type {
  176. font-size: 14px;
  177. padding-top: 15px;
  178. color: $font-c;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. </style>