content.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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/heart.png" mode=""></image>
  10. <text>{{dayInfo.min}}</text>
  11. </view>
  12. <text>BPM</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/heart.png" mode=""></image>
  20. <text>{{dayInfo.avg}}</text>
  21. </view>
  22. <text>BPM</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/heart.png" mode=""></image>
  30. <text>{{dayInfo.max}}</text>
  31. </view>
  32. <text>BPM</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="list-box" v-if="dayInfo.list">
  37. <block v-for="(item,index) in dayInfo.list" :key="index">
  38. <view class="list-box-item">
  39. <view class="list-box-left">
  40. <image src="/static/image/hearticon.png" mode=""></image>
  41. <text>{{formatDate(item.createTime)}}</text>
  42. </view>
  43. <view class="list-box-right">
  44. <view class="num">{{item.heartRate}}</view>
  45. <view>BPM</view>
  46. </view>
  47. </view>
  48. </block>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. // import contentPage from './components/content'
  54. // 图表
  55. import uCharts from "@/components/ucharts/ucharts.js";
  56. import dayjs from "@/plugin/dayjs/dayjs.min.js";
  57. // import uCharts from "@/components/u-charts/u-charts.js";
  58. var _self;
  59. var canvaRing = null;
  60. var canvaArea = null;
  61. var canvaGauge = null;
  62. var canvaPie = null;
  63. var canvaColumn = null;
  64. var canvaFunnel = null;
  65. var canvaWord = null;
  66. export default {
  67. props: {
  68. dayInfo: {
  69. type: Object,
  70. default: {},
  71. },
  72. },
  73. data() {
  74. return {
  75. list:[{time:'09:00',num:63},{time:'09:10',num:63},{time:'09:10',num:63}],
  76. cWidth: '',
  77. cHeight: '',
  78. pixelRatio: 1,
  79. word1:'100<心率值<160,称为窦性心动过速;',
  80. word2:'45<心率值<60称为窦性心动过缓;',
  81. word3:'心率值<45,应考虑有病态窦房结综合症、房室传导阻滞等情况。',
  82. };
  83. },
  84. onLoad() {
  85. _self = this;
  86. this.cWidth = uni.upx2px(750);
  87. this.cHeight = uni.upx2px(420);
  88. this.getServerData();
  89. },
  90. computed: {
  91. },
  92. mounted() {
  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" scoped>
  102. .chartsMain {
  103. width: 750rpx;
  104. height: 450rpx;
  105. padding-top: 15rpx;
  106. background: #fff;
  107. margin-bottom: 24rpx;
  108. border-top: 2rpx solid #f2f2f2;
  109. .charts {
  110. width: 750rpx;
  111. height: 450rpx;
  112. box-sizing: border-box;
  113. }
  114. }
  115. .content-box {
  116. background-color: #F7F7F7;
  117. // height: 100vh;
  118. .number-box {
  119. height: 131rpx;
  120. background-color: #fff;
  121. display: flex;
  122. margin-top: 16rpx;
  123. padding: 16rpx 32rpx;
  124. justify-content: space-around;
  125. .box-item {
  126. width: 218rpx;
  127. padding: 10rpx 16rpx;
  128. box-sizing: border-box;
  129. border-radius: 12rpx;
  130. border: 2rpx solid rgba(119, 119, 119, 0.3);
  131. text{
  132. font-size: 24rpx;
  133. font-weight: 400;
  134. color: #777777;
  135. }
  136. .item-under {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. margin-top: 12rpx;
  141. .item-under-left {
  142. image {
  143. width: 32rpx;
  144. height: 28rpx;
  145. }
  146. text {
  147. margin-left: 15rpx;
  148. font-size: 32rpx;
  149. font-weight: 400;
  150. color: #000000;
  151. }
  152. }
  153. text {
  154. font-size: 24rpx;
  155. font-weight: 400;
  156. color: #777777;
  157. }
  158. }
  159. }
  160. }
  161. .word-box {
  162. margin-top: 16rpx;
  163. background-color: #fff;
  164. padding: 32rpx;
  165. .word-title {
  166. font-size: 32rpx;
  167. font-weight: 600;
  168. color: #000000;
  169. }
  170. .word {
  171. font-size: 28rpx;
  172. font-weight: 400;
  173. color: #000000;
  174. line-height: 40rpx;
  175. margin-top: 18rpx;
  176. }
  177. }
  178. .list-box {
  179. margin-top: 16rpx;
  180. background-color: #fff;
  181. padding:0 32rpx;
  182. .list-box-item {
  183. height: 88rpx;
  184. display: flex;
  185. align-items: center;
  186. justify-content: space-between;
  187. .list-box-left {
  188. display: flex;
  189. align-items: center;
  190. image{
  191. width: 48rpx;
  192. height: 48rpx;
  193. }
  194. text{
  195. margin-left: 32rpx;
  196. font-size: 32rpx;
  197. font-weight: 400;
  198. color: #000000;
  199. }
  200. }
  201. .list-box-right{
  202. display: flex;
  203. font-size: 32rpx;
  204. font-weight: 600;
  205. color: #000000;
  206. .num{
  207. margin-right: 30rpx;
  208. }
  209. }
  210. }
  211. }
  212. }
  213. </style>