index.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <title id="title">心率展示</title>
  5. <script src="js/jquery-1.12.4.min.js"></script>
  6. <script src="js/echarts.min.js"></script>
  7. <script src="js/func.js"></script>
  8. <script src="js/fileinfo.js"></script>
  9. <script src="js/userinfo.js"></script>
  10. <script src="js/cle.js"></script>
  11. <script src="js/dealchart.js"></script>
  12. <script src="js/dealcsv.js"></script>
  13. </head>
  14. <body>
  15. <input type="hidden" id="rowNum" value="0" />
  16. <input type="hidden" id="totalTime" value="0" />
  17. <input type="hidden" id="rsCount" value="0" />
  18. <input type="hidden" id="endFlag" value="0" />
  19. <div id="box">
  20. <!-- <div id="title">运动强度 -- <span id="spIntensityLevelString"></span> [<span id="spIntensity"></span>]</div> -->
  21. <div id="title">运动强度 ── <span id="spIntensityLevelString"></span></div>
  22. <div id="content">
  23. <div id="areaHr" class="circle">
  24. <div id="hrIco"><img src="img/heart.svg" /></div>
  25. <div id="hrValue" class="">--</div>
  26. </div>
  27. <div id="areaChart"></div>
  28. </div>
  29. </div>
  30. </body>
  31. </html>
  32. <script>
  33. var param_f = getQueryParam('f');
  34. var filesNum = fileInfo.length;
  35. var fileId = 0;
  36. var file = '';
  37. var filePath = '';
  38. var filesSuffix = '.csv'; //文件后缀名
  39. var filePreUrl = 'http://localdata/csv/';
  40. var name = '';
  41. $(document).ready(function(){
  42. if (param_f == '')
  43. param_f = 0;
  44. if (param_f >= 0 && param_f <= filesNum) {
  45. fileId = param_f;
  46. name = fileInfo[fileId].name;
  47. file = fileInfo[fileId].file;
  48. }
  49. if (name != '' && file != '') {
  50. filePath = filePreUrl + file + filesSuffix;
  51. $("#title").text(file);
  52. setBaseInfo(userInfo[name].age, userInfo[name].sex, userInfo[name].weight, userInfo[name].basehr);
  53. console.log("file: " + file);
  54. console.log("name: " + name);
  55. csvInit();
  56. chartInit();
  57. loadCsvFile(filePath);
  58. }
  59. else {
  60. alert('参数错误!');
  61. return;
  62. }
  63. });
  64. </script>
  65. <style>
  66. .slowJump {
  67. animation: moveAct 3s infinite;
  68. -webkit-animation: moveAct 3s infinite;
  69. /*Safari and Chrome*/
  70. animation-direction: alternate;
  71. /*轮流反向播放动画。*/
  72. animation-timing-function: ease-in-out;
  73. /*动画的速度曲线*/
  74. /* Safari 和 Chrome */
  75. -webkit-animation-direction: alternate;
  76. /*轮流反向播放动画。*/
  77. -webkit-animation-timing-function: ease-in-out;
  78. /*动画的速度曲线*/
  79. }
  80. .normalJump {
  81. animation: moveAct 2s infinite;
  82. -webkit-animation: moveAct 2s infinite;
  83. /*Safari and Chrome*/
  84. animation-direction: alternate;
  85. /*轮流反向播放动画。*/
  86. animation-timing-function: ease-in-out;
  87. /*动画的速度曲线*/
  88. /* Safari 和 Chrome */
  89. -webkit-animation-direction: alternate;
  90. /*轮流反向播放动画。*/
  91. -webkit-animation-timing-function: ease-in-out;
  92. /*动画的速度曲线*/
  93. }
  94. .fastJump {
  95. animation: moveAct 1s infinite;
  96. -webkit-animation: moveAct 1s infinite;
  97. /*Safari and Chrome*/
  98. animation-direction: alternate;
  99. /*轮流反向播放动画。*/
  100. animation-timing-function: ease-in-out;
  101. /*动画的速度曲线*/
  102. /* Safari 和 Chrome */
  103. -webkit-animation-direction: alternate;
  104. /*轮流反向播放动画。*/
  105. -webkit-animation-timing-function: ease-in-out;
  106. /*动画的速度曲线*/
  107. }
  108. @keyframes moveAct {
  109. 0% {
  110. transform: scale(1);
  111. /*开始为原始大小*/
  112. }
  113. 25% {
  114. transform: scale(1.1);
  115. /*放大1.1倍*/
  116. }
  117. 50% {
  118. transform: scale(1);
  119. }
  120. 75% {
  121. transform: scale(1.1);
  122. }
  123. }
  124. @-webkit-keyframes moveAct
  125. /*Safari and Chrome*/
  126. {
  127. 0% {
  128. transform: scale(1);
  129. /*开始为原始大小*/
  130. }
  131. 25% {
  132. transform: scale(1.1);
  133. /*放大1.1倍*/
  134. }
  135. 50% {
  136. transform: scale(1);
  137. }
  138. 75% {
  139. transform: scale(1.1);
  140. }
  141. }
  142. body {
  143. display: flex;
  144. /*flex 布局*/
  145. align-items: center;
  146. /*实现垂直居中*/
  147. justify-content: center;
  148. /*实现水平居中*/
  149. /* background-color: #808080; */
  150. background-color: #5feb8c;
  151. overflow: hidden;
  152. margin: 0 0;
  153. /* display: block; */
  154. }
  155. #box {
  156. width: 40rem;
  157. height: 30rem;
  158. border: 5px solid white;
  159. /* margin: 0 auto; */
  160. }
  161. #title {
  162. width: 100%;
  163. height: 20%;
  164. background-color: #ffffff;
  165. font-family: "hei";
  166. font-weight: 550;
  167. text-align: center;
  168. line-height: 6rem;
  169. font-size: 3rem;
  170. letter-spacing: 0.4rem;
  171. }
  172. #content {
  173. margin: 0 auto;
  174. height: 80%;
  175. }
  176. #areaHr {
  177. margin: 0 auto;
  178. height: 65%;
  179. background-color: #028FE1;
  180. text-align: center;
  181. }
  182. #areaHr.circle {
  183. border: 3px solid white;
  184. border-radius: 50%;
  185. width: 220px;
  186. height: 220px;
  187. /* 宽度和高度需要相等 */
  188. margin-top: 1.2rem;
  189. }
  190. #hrIco img {
  191. width: 3rem;
  192. margin-top: 2.2rem;
  193. }
  194. #hrValue {
  195. font-size: 5rem;
  196. color: white;
  197. font-family: "Arial Black";
  198. margin-top: -0.5rem;
  199. /* font-weight: bold; */
  200. }
  201. #areaChart {
  202. margin: 0 auto;
  203. height: 37%;
  204. }
  205. </style>