content.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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/oxygen.png" mode=""></image>
  10. <text>{{dayInfo.min}}</text>
  11. </view>
  12. <text>HbO2</text>
  13. </view>
  14. </view>
  15. <view class="box-item">
  16. <text>平均</text>
  17. <view class="item-under">
  18. <view class="item-under-left">
  19. <image src="/static/image/oxygen.png" mode=""></image>
  20. <text>{{dayInfo.avg}}</text>
  21. </view>
  22. <text>HbO2</text>
  23. </view>
  24. </view>
  25. <view class="box-item">
  26. <text>最高</text>
  27. <view class="item-under">
  28. <view class="item-under-left">
  29. <image src="/static/image/oxygen.png" mode=""></image>
  30. <text>{{dayInfo.max}}</text>
  31. </view>
  32. <text>HbO2</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="word-box">
  37. <view class="word-title">
  38. 测量结果仅供参考,成人静息心率:
  39. </view>
  40. <view class="word">
  41. <p>{{word1}}</p>
  42. <p>{{word2}}</p>
  43. <p>{{word3}}</p>
  44. </view>
  45. </view>
  46. <view class="list-box">
  47. <block v-for="(item,index) in dayInfo.list" :key="index">
  48. <view class="list-box-item">
  49. <view class="list-box-left">
  50. <image src="/static/image/hearticon.png" mode=""></image>
  51. <text>{{formatDate(item.createTime)}}</text>
  52. </view>
  53. <view class="list-box-right">
  54. <view class="num">{{item.bloodOxygen}}</view>
  55. <view>HbO2</view>
  56. </view>
  57. </view>
  58. </block>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. // import lineChart from './line_chart.vue'
  64. import dayjs from "@/plugin/dayjs/dayjs.min.js";
  65. export default {
  66. props: {
  67. dayInfo: {
  68. type: Object,
  69. default: {},
  70. },
  71. },
  72. // components: {
  73. // lineChart
  74. // },
  75. data() {
  76. return {
  77. list: [{
  78. time: '09:00',
  79. num: 63
  80. }, {
  81. time: '09:10',
  82. num: 63
  83. }, {
  84. time: '09:10',
  85. num: 63
  86. }],
  87. word1: '正常水平: 95%~100%;',
  88. word2: '高风险值:小于80%,可能会造成多器官乏氧,造成损伤;',
  89. word3: '调整建议:当确认存在低氧血症后,会查找病因,采取相应治疗措施。',
  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-around;
  112. .box-item {
  113. width: 218rpx;
  114. padding: 10rpx 16rpx;
  115. box-sizing: border-box;
  116. border-radius: 12rpx;
  117. border: 2rpx solid rgba(119, 119, 119, 0.3);
  118. text {
  119. font-size: 24rpx;
  120. font-weight: 400;
  121. color: #777777;
  122. }
  123. .item-under {
  124. display: flex;
  125. justify-content: space-between;
  126. align-items: center;
  127. margin-top: 12rpx;
  128. .item-under-left {
  129. display: flex;
  130. align-items: center;
  131. margin-right: 5rpx;
  132. image {
  133. width: 32rpx;
  134. height: 32rpx;
  135. }
  136. text {
  137. margin-left: 12rpx;
  138. font-size: 32rpx;
  139. font-weight: 400;
  140. color: #000000;
  141. }
  142. }
  143. text {
  144. font-size: 24rpx;
  145. font-weight: 400;
  146. color: #777777;
  147. }
  148. }
  149. }
  150. }
  151. .word-box {
  152. margin-top: 16rpx;
  153. background-color: #fff;
  154. padding: 32rpx;
  155. .word-title {
  156. font-size: 32rpx;
  157. font-weight: 600;
  158. color: #000000;
  159. }
  160. .word {
  161. font-size: 28rpx;
  162. font-weight: 400;
  163. color: #000000;
  164. line-height: 40rpx;
  165. margin-top: 18rpx;
  166. }
  167. }
  168. .list-box {
  169. margin-top: 16rpx;
  170. background-color: #fff;
  171. padding: 0 32rpx;
  172. .list-box-item {
  173. height: 88rpx;
  174. display: flex;
  175. align-items: center;
  176. justify-content: space-between;
  177. .list-box-left {
  178. display: flex;
  179. align-items: center;
  180. image {
  181. width: 48rpx;
  182. height: 48rpx;
  183. }
  184. text {
  185. margin-left: 32rpx;
  186. font-size: 32rpx;
  187. font-weight: 400;
  188. color: #000000;
  189. }
  190. }
  191. .list-box-right {
  192. display: flex;
  193. font-size: 32rpx;
  194. font-weight: 600;
  195. color: #000000;
  196. .num {
  197. margin-right: 30rpx;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. </style>