content.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <template>
  2. <view class="content-box">
  3. <!-- <line-chart></line-chart> -->
  4. <view class="number-box">
  5. <view class="box-item">
  6. <text>最小</text>
  7. <view class="item-under">
  8. <view class="item-under-left">
  9. <image src="/static/image/contract.png" mode=""></image>
  10. <text>{{dayInfo.hypotensionMax}}</text>
  11. <text>收缩压</text>
  12. </view>
  13. <text>mmHg</text>
  14. </view>
  15. <view class="item-under">
  16. <view class="item-under-left">
  17. <image src="/static/image/diastole.png" mode=""></image>
  18. <text>{{dayInfo.hypotensionMin}}</text>
  19. <text>舒张压</text>
  20. </view>
  21. <text>mmHg</text>
  22. </view>
  23. </view>
  24. <view class="box-item">
  25. <text>最大</text>
  26. <view class="item-under">
  27. <view class="item-under-left">
  28. <image src="/static/image/contract.png" mode=""></image>
  29. <text>{{dayInfo.hypertensionMax}}</text>
  30. <text>收缩压</text>
  31. </view>
  32. <text>mmHg</text>
  33. </view>
  34. <view class="item-under">
  35. <view class="item-under-left">
  36. <image src="/static/image/diastole.png" mode=""></image>
  37. <text>{{dayInfo.hypertensionMin}}</text>
  38. <text>舒张压</text>
  39. </view>
  40. <text>mmHg</text>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="word-box">
  45. <p>{{word1}}</p>
  46. <p>{{word2}}</p>
  47. <p>{{word3}}</p>
  48. <p>{{word4}}</p>
  49. <p>{{word5}}</p>
  50. <p>{{word6}}</p>
  51. </view>
  52. <view class="list-box" >
  53. <block v-for="(item,index) in dayInfo.list">
  54. <view class="list-box-item">
  55. <view class="list-box-left">
  56. <image src="/static/image/hearticon.png" mode=""></image>
  57. <text>{{formatDate(item.createTime)}}</text>
  58. </view>
  59. <view class="list-box-right">
  60. <view class="num">{{item.hypertension}} / {{item.hypotension}}</view>
  61. <view>mmHg</view>
  62. </view>
  63. </view>
  64. </block>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. // import lineChart from './line_chart.vue'
  70. import dayjs from "@/plugin/dayjs/dayjs.min.js";
  71. export default {
  72. // components: {
  73. // lineChart
  74. // },
  75. props: {
  76. dayInfo: {
  77. type: Object,
  78. default: {},
  79. },
  80. },
  81. data() {
  82. return {
  83. list:[{time:'09:00',num:'111/80'},{time:'09:10',num:'111/80'},{time:'09:10',num:'111/80'}],
  84. word1:'成年人正常值,收缩压<1200,舒张压<80',
  85. word2:'正常高值,收缩压120-139,舒张压80-89',
  86. word3:'高血压,收缩压>120,舒张压>80',
  87. word4:'1级高血压,收缩压140-159,舒张压90-99',
  88. word5:'2级高血压,收缩压160-179,舒张压100-109',
  89. word6:'3级高血压,收缩压>180,舒张压>110',
  90. }
  91. },
  92. onLoad() {
  93. },
  94. methods: {
  95. formatDate: function(date) {
  96. return dayjs(date).format("YYYY-MM-DD HH:mm:ss");
  97. },
  98. },
  99. }
  100. </script>
  101. <style lang="scss">
  102. .content-box {
  103. background-color: #F7F7F7;
  104. // height: 100vh;
  105. .number-box {
  106. // height: 131rpx;
  107. background-color: #fff;
  108. display: flex;
  109. margin-top: 16rpx;
  110. padding: 16rpx 32rpx;
  111. justify-content: space-between;
  112. .box-item {
  113. // width: 218rpx;
  114. width: 48%;
  115. // height: 99rpx;
  116. padding: 10rpx 16rpx;
  117. box-sizing: border-box;
  118. border-radius: 12rpx;
  119. border: 2rpx solid rgba(119, 119, 119, 0.3);
  120. text{
  121. font-size: 24rpx;
  122. font-weight: 400;
  123. color: #777777;
  124. }
  125. .item-under {
  126. display: flex;
  127. justify-content: space-between;
  128. align-items: center;
  129. margin-top: 12rpx;
  130. .item-under-left {
  131. image {
  132. width: 32rpx;
  133. height: 28rpx;
  134. }
  135. text {
  136. margin-left: 15rpx;
  137. font-size: 32rpx;
  138. font-weight: 400;
  139. color: #000000;
  140. }
  141. }
  142. text {
  143. font-size: 24rpx;
  144. font-weight: 400;
  145. color: #777777;
  146. }
  147. }
  148. }
  149. }
  150. .word-box {
  151. margin-top: 16rpx;
  152. background-color: #fff;
  153. padding: 32rpx;
  154. font-size: 28rpx;
  155. font-weight: bold;
  156. color: #000000;
  157. line-height: 40rpx;
  158. // .word-title {
  159. // font-size: 32rpx;
  160. // font-weight: 600;
  161. // color: #000000;
  162. // }
  163. // .word {
  164. // font-size: 28rpx;
  165. // font-weight: 400;
  166. // color: #000000;
  167. // margin-top: 18rpx;
  168. // }
  169. }
  170. .list-box {
  171. margin-top: 16rpx;
  172. background-color: #fff;
  173. padding:0 32rpx;
  174. .list-box-item {
  175. height: 88rpx;
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. .list-box-left {
  180. display: flex;
  181. align-items: center;
  182. image{
  183. width: 48rpx;
  184. height: 48rpx;
  185. }
  186. text{
  187. margin-left: 32rpx;
  188. font-size: 32rpx;
  189. font-weight: 400;
  190. color: #000000;
  191. }
  192. }
  193. .list-box-right{
  194. display: flex;
  195. font-size: 32rpx;
  196. font-weight: 600;
  197. color: #000000;
  198. .num{
  199. margin-right: 30rpx;
  200. }
  201. }
  202. }
  203. }
  204. }
  205. </style>