report.vue 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862
  1. <template>
  2. <view class="report-container">
  3. <cu-custom bgColor="#000000"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
  4. <view v-if="!isDeviceAdded" class="flex-col no-device-page">
  5. <view class="flex-col flex-auto image-wrapper_2">
  6. <view class="flex-row items-center self-center bottom-btns">
  7. <view class="btn_1 bottom-btn" @click="addBindDevice">立即体验</view>
  8. <view class="btn_2 bottom-btn" @click="addBindDevice">添加设备</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view v-if="isDeviceAdded" class="flex-col justify-start page">
  13. <view class="flex-col report">
  14. <!-- report header -->
  15. <view class="flex-col justify-start report_header relative">
  16. <img class="report-header-img" src="http://wdklmall.oss-cn-shenzhen.aliyuncs.com/mallgoods/goods/0BCE344518834C32B0E9CA02F34C3439.png" />
  17. <!-- <view class="btns-report">-->
  18. <!-- <view @click="handleMonthClick" class="btn-month-report">月报</view>-->
  19. <!-- <view @click="handleWeekClick" class="btn-week-report">周报</view>-->
  20. <!-- </view>-->
  21. <view class="flex-col report_score space-y-55">
  22. <view class="flex-row space-x-10 report_period">
  23. <view class="flex-row justify-between flex-auto section_3">
  24. <view class="flex-row items-center space-x-24" @click="calendarShow=true">
  25. <image class="shrink-0 image_4" src="../../static/report/reportIconLeft.png"/>
  26. <text class="margin-right text-white">{{ selectDay }}</text>
  27. <image class="image_4" src="../../static/report/reportIconRight.png"/>
  28. </view>
  29. </view>
  30. <view class="flex-row items-center shrink-0 section_4 space-x-10">
  31. <picker v-if="todayTimeList.length > 0" @change="PickerChange" :value="index" :range="todayTimeList">
  32. <view class="picker text-white">
  33. {{ todayTimeList[index] }}
  34. </view>
  35. </picker>
  36. <image class="shrink-0 image_5" src="../../static/report/reportIconTop.png"/>
  37. </view>
  38. </view>
  39. <view class="flex-col report_score_data items-center">
  40. <view class="flex-row justify-between items-center space-x-76-reverse">
  41. <text class="text_4">{{ sleepReportFrom.report_content.score.desc }}</text>
  42. </view>
  43. <text class="self-center text_6" :class="sleepReportFrom.report_content.score.state >= 3 ?
  44. 'text-green' : sleepReportFrom.report_content.score.state === 2 ? 'text-yellow' : 'text-red'">{{ sleepReportFrom.report_content.score.value }}</text>
  45. <text class="self-center font_2 text_7">香睡指数</text>
  46. </view>
  47. <view class="flex-row report-data-sum justify-between">
  48. <view class="flex-row items-center">
  49. <image class="icon-data-sum" src="../../static/report/reportIconTime.png" />
  50. <view class="flex-col items-center text-data-sum">
  51. <view class="title-data-sum">睡眠总时长</view>
  52. <view class="flex-row justify-evenly items-baseline group_5">
  53. <text class="font_5">{{ formateSeconds(sleepReportFrom.total_duration, 0) }}</text>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="flex-row items-center">
  58. <image class="icon-data-sum" src="../../static/report/reportIconClock.png"/>
  59. <view class="flex-col items-center text-data-sum">
  60. <view class="title-data-sum">睡眠时间</view>
  61. <view class="flex-row justify-evenly items-baseline group_5">
  62. <text class="font_5">{{ sleepReportFrom.gobed_time + '~' + sleepReportFrom.outbed_time }}</text>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- report analysis -->
  70. <view class="flex-col report_analysis space-y-4">
  71. <text class="self-start font_4 text_8">各项睡眠数据统计</text>
  72. <view class="flex-col justify-start items-center relative report_analysis_data">
  73. <view class="flex-row equal-division space-x-29 pos">
  74. <view class="flex-col equal-division-item">
  75. <view class="flex-col section_6 space-y-12">
  76. <view class="flex-row space-x-10">
  77. <image class="image_7" src="../../static/report/reportIconGreen.png"/>
  78. <text class="font_3">上床时间</text>
  79. </view>
  80. <text class="self-start font_4 text_9">{{ sleepReportFrom.gobed_time }}</text>
  81. </view>
  82. <view class="flex-col section_6 view space-y-12">
  83. <view class="flex-row items-center space-x-12">
  84. <image class="image_7" src="../../static/report/reportIconGreen.png"/>
  85. <text class="font_3">深睡时长</text>
  86. </view>
  87. <view class="flex-row items-baseline group_6 space-x-6">
  88. <text class="font_4">{{ formateSeconds(sleepReportFrom.deep_duration, 0) }}</text>
  89. </view>
  90. </view>
  91. <view class="flex-col section_6 view space-y-12">
  92. <view class="flex-row items-center space-x-12">
  93. <image class="image_7" :src="sleepReportFrom.report_content.avg_hx.state === 3 ? '../../static/report/reportIconGreen.png' :
  94. sleepReportFrom.report_content.avg_hx.state === 2 ? '../../static/report/reportIconYellow.png' : '../../static/report/reportIconRed.png'"/>
  95. <text class="font_3">平均呼吸率</text>
  96. </view>
  97. <view class="flex-row items-baseline group_6 space-x-6">
  98. <text class="font_4">{{ sleepReportFrom.report_content.avg_hx.value }}</text>
  99. <text class="font_5">次/分</text>
  100. </view>
  101. </view>
  102. <view class="flex-col items-left group_7 space-x-10">
  103. <view>
  104. <image class="image_7" src="../../static/report/reportIconGreen.png"/>
  105. <text class="font_3">温馨提示</text>
  106. </view>
  107. <text class="font_2 text_10">本次睡眠,您有{{ errCount }}项指标不及格。</text>
  108. </view>
  109. </view>
  110. <view class="flex-col equal-division-item_2 space-y-10">
  111. <view class="flex-col section_7 space-y-12">
  112. <view class="flex-row space-x-10">
  113. <image class="image_7" src="../../static/report/reportIconGreen.png"/>
  114. <text class="font_3">在床时间</text>
  115. </view>
  116. <view class="flex-row items-baseline group_5">
  117. <text class="font_4">{{ formateSeconds(sleepReportFrom.inbed_duration, 0) }}</text>
  118. </view>
  119. </view>
  120. <view class="flex-col section_7 space-y-12">
  121. <view class="flex-row space-x-10">
  122. <image class="image_7" :src="sleepReportFrom.report_content.sleep_eff.state === 3 ? '../../static/report/reportIconGreen.png' :
  123. sleepReportFrom.report_content.sleep_eff.state === 2 ? '../../static/report/reportIconYellow.png' : '../../static/report/reportIconRed.png'"/>
  124. <text class="font_3">睡眠效率</text>
  125. </view>
  126. <view class="flex-row items-baseline group_5">
  127. <text class="font_4">{{ sleepReportFrom.report_content.sleep_eff.value }}</text>
  128. </view>
  129. </view>
  130. <view class="flex-col section_7 space-y-12">
  131. <view class="flex-row space-x-10">
  132. <image class="image_7" :src="sleepReportFrom.report_content.avg_rh.state === 3 ? '../../static/report/reportIconGreen.png' :
  133. sleepReportFrom.report_content.avg_rh.state === 2 ? '../../static/report/reportIconYellow.png' : '../../static/report/reportIconRed.png'"/>
  134. <text class="font_3">平均心率</text>
  135. </view>
  136. <view class="flex-row items-baseline group_6 space-x-4">
  137. <text class="font_4">{{ sleepReportFrom.report_content.avg_rh.value }}</text>
  138. <text class="font_5">次/分</text>
  139. </view>
  140. </view>
  141. <view class="flex-row shrink-0 justify-between section_8 space-x-34">
  142. <view class="flex-row items-center space-x-8">
  143. <image class="image_7" :src="sleepReportFrom.report_content.move_count.state === 3 ? '../../static/report/reportIconGreen.png' :
  144. sleepReportFrom.report_content.move_count.state === 2 ? '../../static/report/reportIconYellow.png' : '../../static/report/reportIconRed.png'"/>
  145. <text class="font_3">体动次数</text>
  146. </view>
  147. <view class="flex-row items-baseline space-x-6">
  148. <text class="font_4">{{ sleepReportFrom.report_content.move_count.value }}</text>
  149. <text class="font_5">次</text>
  150. </view>
  151. </view>
  152. <view class="flex-row shrink-0 justify-between section_8 space-x-34">
  153. <view class="flex-row items-center space-x-8">
  154. <image class="image_7" :src="sleepReportFrom.report_content.outbed_count.state === 3 ? '../../static/report/reportIconGreen.png' :
  155. sleepReportFrom.report_content.outbed_count.state === 2 ? '../../static/report/reportIconYellow.png' : '../../static/report/reportIconRed.png'"/>
  156. <text class="font_3">离床次数</text>
  157. </view>
  158. <view class="flex-row items-baseline space-x-6">
  159. <text class="font_4">{{ sleepReportFrom.report_content.outbed_count.value }}</text>
  160. <text class="font_5">次</text>
  161. </view>
  162. </view>
  163. <view class="flex-row justify-between section_8">
  164. <view class="flex-row items-center space-x-8">
  165. <image class="image_7" :src="sleepReportFrom.report_content.snoring_count.state === 3 ? '../../static/report/reportIconGreen.png' :
  166. sleepReportFrom.report_content.snoring_count.state === 2 ? '../../static/report/reportIconYellow.png' : '../../static/report/reportIconRed.png'"/>
  167. <text class="font_3">打鼾次数</text>
  168. </view>
  169. <view class="flex-row items-baseline space-x-6">
  170. <text class="font_4">{{ sleepReportFrom.report_content.snoring_count.value }}</text>
  171. <text class="font_5">次</text>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. <view class="flex-row justify-between section_efficiency">
  178. <view class="flex-row items-center">
  179. <image class="shrink-0 image_7" src="../../static/report/reportIconWatch.png" />
  180. <text class="font_3">睡眠效率</text>
  181. <text @click="handleClickBreath(0)" class="margin-left myFont">详情>></text>
  182. <!-- <image @click="handleClickBreath(0)" class="image_11 margin-left" src="../../static/report/reportIconWhy.png" />-->
  183. </view>
  184. <view class="flex-row items-center space-x-6">
  185. <text class="font_4">{{ sleepReportFrom.report_content.sleep_eff.value }}</text>
  186. </view>
  187. </view>
  188. <view class="flex-col justify-start report_breath report-easy">
  189. <view class="flex-col justify-start">
  190. <view class="flex-row items-center group_11 space-x-10 pos_33">
  191. <image class="image_8" src="../../static/report/reportIconBreath.png"/>
  192. <text class="font_3">安稳度</text>
  193. <text @click="handleClickBreath(2)" class="margin-left myFont">详情>></text>
  194. <!-- <image @click="handleClickBreath(1)" class="image_11" src="../../static/report/reportIconWhy.png" />-->
  195. </view>
  196. </view>
  197. <view class="flex-col pos_34">
  198. <view class="flex-col group_15">
  199. <view class="flex-row justify-between group_2">
  200. <text class="font_3 text_12">入睡时长</text>
  201. <view class="flex-row items-center space-x-30">
  202. <view class="flex-row items-baseline shrink-0 space-x-6">
  203. <text class="font_5">{{ formateSeconds(sleepReportFrom.rs_duration, 0) }}</text>
  204. </view>
  205. </view>
  206. </view>
  207. </view>
  208. <view class="list-divider"></view>
  209. <view class="flex-col group_15">
  210. <view class="flex-row justify-between group_2">
  211. <text class="font_3 text_12">离床次数</text>
  212. <view class="flex-row items-center space-x-30">
  213. <view class="flex-row items-baseline shrink-0 space-x-6">
  214. <text class="font_5">{{ sleepReportFrom.report_content.outbed_count.value }}</text>
  215. <text class="font_6">次</text>
  216. </view>
  217. </view>
  218. </view>
  219. <view class="report_breath_chart">
  220. <view class="echarts-wrap">
  221. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-1" ref="refChart-1" @onInit="onInit1"></mpvue-echarts>
  222. </view>
  223. </view>
  224. </view>
  225. <view class="list-divider"></view>
  226. <view class="flex-col group_15">
  227. <view class="flex-row justify-between group_2">
  228. <text class="font_3 text_12">体动次数</text>
  229. <view class="flex-row items-center space-x-30">
  230. <view class="flex-row items-baseline shrink-0 space-x-6">
  231. <text class="font_5">{{ sleepReportFrom.report_content.move_count.value }}</text>
  232. <text class="font_6">次</text>
  233. </view>
  234. </view>
  235. </view>
  236. <view class="report_breath_chart">
  237. <view class="echarts-wrap">
  238. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-2" ref="refChart-2" @onInit="onInit1"></mpvue-echarts>
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. </view>
  245. <view class="flex-col report-charts">
  246. <view class="flex-col justify-start flex-auto group">
  247. <view class="flex-col justify-start group_3">
  248. <view class="flex-col group_8 space-y-10">
  249. <view class="flex-col justify-start report_breath">
  250. <view class="flex-col justify-start">
  251. <view class="flex-row items-center group_11 space-x-10 pos_33">
  252. <image class="image_8" src="../../static/report/reportIconBeat.png" />
  253. <text class="font_3">心脏系统</text>
  254. <text @click="handleClickBreath(3)" class="margin-left myFont">详情>></text>
  255. <!-- <image @click="handleClickBreath(2)" class="image_11" src="../../static/report/reportIconWhy.png" />-->
  256. </view>
  257. </view>
  258. <view class="flex-col pos_34 report_heart">
  259. <view class="flex-col group_15">
  260. <view class="flex-row justify-between group_2">
  261. <text class="font_3 text_12">平均心率</text>
  262. <view class="flex-row items-center space-x-30">
  263. <view class="flex-row items-baseline shrink-0 space-x-6">
  264. <text class="font_5">{{ sleepReportFrom.report_content.avg_rh.value }}</text>
  265. <text class="font_6">次/分</text>
  266. </view>
  267. </view>
  268. </view>
  269. </view>
  270. <view class="report_breath_chart">
  271. <view class="echarts-wrap">
  272. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-3" ref="refChart-3" @onInit="onInit1"></mpvue-echarts>
  273. </view>
  274. </view>
  275. </view>
  276. </view>
  277. <view class="flex-col justify-start report_breath">
  278. <view class="flex-col justify-start">
  279. <view class="flex-row justify-center items-center group_11 space-x-10 pos_33">
  280. <image class="image_8" src="../../static/report/reportIconBreath.png" />
  281. <text class="font_3">呼吸系统</text>
  282. <text @click="handleClickBreath(4)" class="margin-left myFont">详情>></text>
  283. <!-- <image @click="handleClickBreath(3)" class="image_11" src="../../static/report/reportIconWhy.png" />-->
  284. </view>
  285. </view>
  286. <view class="flex-col pos_34">
  287. <view class="flex-col group_15">
  288. <view class="flex-row justify-between group_2">
  289. <text class="font_3 text_12">平均呼吸率</text>
  290. <view class="flex-row items-center space-x-30">
  291. <view class="flex-row items-baseline shrink-0 space-x-6">
  292. <text class="font_5">{{ sleepReportFrom.report_content.avg_hx.value }}</text>
  293. <text class="font_6">次/分</text>
  294. </view>
  295. </view>
  296. </view>
  297. <view class="report_breath_chart">
  298. <view class="echarts-wrap">
  299. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-4" ref="refChart-4" @onInit="onInit1"></mpvue-echarts>
  300. </view>
  301. </view>
  302. </view>
  303. <view class="list-divider"></view>
  304. <view class="flex-col group_15">
  305. <view class="flex-row justify-between group_2">
  306. <text class="font_3 text_12">打鼾</text>
  307. <view class="flex-row items-center space-x-30">
  308. <view class="flex-row items-baseline shrink-0 space-x-6">
  309. <text class="font_5">{{ sleepReportFrom.report_content.snoring_count.value }}</text>
  310. <text class="font_6">次</text>
  311. </view>
  312. </view>
  313. </view>
  314. <view class="report_breath_chart">
  315. <view class="echarts-wrap">
  316. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-5" ref="refChart-5" @onInit="onInit1"></mpvue-echarts>
  317. </view>
  318. </view>
  319. </view>
  320. <view class="list-divider"></view>
  321. <view class="flex-col group_15">
  322. <view class="flex-row justify-between group_2">
  323. <text class="font_3 text_12">呼吸异常</text>
  324. <!-- <view class="flex-row items-center space-x-30">-->
  325. <!-- <view class="flex-row items-baseline shrink-0 space-x-6">-->
  326. <!-- <text class="font_5">{{ sleepReportFrom.report_content.snoring_count.value }}</text>-->
  327. <!-- <text class="font_6">次</text>-->
  328. <!-- </view>-->
  329. <!-- </view>-->
  330. </view>
  331. <view class="report_breath_chart">
  332. <view class="echarts-wrap">
  333. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-6" ref="refChart-6" @onInit="onInit1"></mpvue-echarts>
  334. </view>
  335. </view>
  336. </view>
  337. </view>
  338. </view>
  339. <view class="flex-col justify-start report_breath">
  340. <view class="flex-col justify-start">
  341. <view class="flex-row items-center group_11 space-x-10 pos_33">
  342. <image class="image_8" src="../../static/report/reportIconMoon.png" />
  343. <text class="font_3">深浅睡眠</text>
  344. <text @click="handleClickBreath(1)" class="margin-left myFont">详情>></text>
  345. </view>
  346. </view>
  347. <view class="flex-col pos_34 report_heart">
  348. <view class="flex-col group_15">
  349. <view class="flex-row justify-between report-sleep items-center">
  350. <view class="flex-col item-sleep">
  351. <text class="item-sleep-title">清醒</text>
  352. <text class="item-sleep-desc">{{ formateSeconds(sleepReportFrom.awake_duration, 1) }}</text>
  353. </view>
  354. <view class="flex-col item-sleep">
  355. <text class="item-sleep-title">浅睡</text>
  356. <text class="item-sleep-desc">{{ formateSeconds(sleepReportFrom.light_duration, 1) }}</text>
  357. </view>
  358. <view class="flex-col item-sleep">
  359. <text class="item-sleep-title">中睡</text>
  360. <text class="item-sleep-desc">{{ formateSeconds(sleepReportFrom.in_duration, 1) }}</text>
  361. </view>
  362. <view class="flex-col item-sleep">
  363. <text class="item-sleep-title">深睡</text>
  364. <text class="item-sleep-desc">{{ formateSeconds(sleepReportFrom.deep_duration, 1) }}</text>
  365. </view>
  366. </view>
  367. </view>
  368. <view class="report_breath_chart">
  369. <view class="echarts-wrap">
  370. <mpvue-echarts class="ec-canvas" canvasId="canvasChart-7" ref="refChart-7" @onInit="onInit1"></mpvue-echarts>
  371. </view>
  372. </view>
  373. </view>
  374. </view>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. </view>
  380. </view>
  381. <!-- <tab-bar currentPage="report" /> -->
  382. <view class="cu-modal bottom-modal" :class="calendarShow === true?'show':''" @tap="hideModal">
  383. <view class="cu-dialog" @tap.stop="" data-id="myCalendar">
  384. <uni-calendar
  385. @change="change"
  386. @monthSwitch="monthSwitch"
  387. :selected="selected"
  388. returnName="最新一次"
  389. ></uni-calendar>
  390. </view>
  391. </view>
  392. <view class="cu-modal" :class="bindShow?'show':''">
  393. <view class="cu-dialog">
  394. <view class="cu-bar bg-white justify-end">
  395. <view style="color: black" class="content">设备绑定</view>
  396. <view class="action" @tap="bindShow=false">
  397. <text class="cuIcon-close text-red"></text>
  398. </view>
  399. </view>
  400. <view class="">
  401. <form>
  402. <view class="cu-form-group solid-bottom">
  403. <view class="title">扫描二维码</view>
  404. <input type="text" v-model="bindSn" placeholder="输入或扫描IMEI" class="text-left"/>
  405. <text class="cuIcon-scan text-xxl text-green" style="font-size: 50rpx;"
  406. @click="scan"></text>
  407. </view>
  408. </form>
  409. </view>
  410. <view class="cu-bar bg-white justify-end">
  411. <!-- <view class="action">-->
  412. <!-- <button class="cu-btn bg-cyan" @tap="goBuy">去购买</button>-->
  413. <!-- </view>-->
  414. <view class="action">
  415. <button class="cu-btn bg-green margin-left" @tap="bindDevice">确定</button>
  416. </view>
  417. </view>
  418. </view>
  419. </view>
  420. <!-- <view class="cu-load load-modal" v-if="disabled">-->
  421. <!-- <view class="cuIcon-emojifill text-orange"></view>-->
  422. <!-- <view class="gray-text">正在获取</view>-->
  423. <!-- </view>-->
  424. </view>
  425. </template>
  426. <script>
  427. import echarts from '@/static/echarts.min.js'
  428. import mpvueEcharts from '@/components/mpvue-echarts/src/echarts.vue'
  429. import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
  430. import Storage from '@/utils/storage'
  431. import * as Foundation from '@/ui-utils/Foundation'
  432. import * as API_SLEEP_REPORT from '@/api/sleep_report'
  433. import * as API_deviceMemberBind from '@/api/device_member_bind'
  434. import * as deviceDtypeEnum from '@/utils/enum/DeviceDTypeEnum'
  435. export default {
  436. components: {
  437. uniCalendar,mpvueEcharts
  438. },
  439. data() {
  440. return {
  441. isDeviceAdded: false,
  442. todayStr: Foundation.unixToDate(parseInt(new Date() / 1000), "yyyy-MM-dd"),
  443. selectDay: '',
  444. selectYearMonth: {
  445. year: Foundation.unixToDate(parseInt(new Date() / 1000), "yyyy"),
  446. month: Foundation.unixToDate(parseInt(new Date() / 1000), "M")
  447. },
  448. calendarShow: false,
  449. selected: [
  450. {
  451. // 打点日期
  452. "date": Foundation.unixToDate(parseInt(new Date() / 1000), "yyyy-MM-dd")
  453. }
  454. ],
  455. index: 0,
  456. todayTimeList: [],
  457. sleepReportFrom: {
  458. total_duration: 0,
  459. inbed_duration: 0,
  460. deep_duration: 0,
  461. rs_duration: 0
  462. },
  463. sleepReportList: [],
  464. chartObj1: null, // 离床次数图表
  465. chartObj2: null, // 体动次数图表
  466. myData1: [], // 离床次数数据
  467. myData2: [], // 体动次数数据
  468. params: {
  469. unionId: '',
  470. reportTime: -1
  471. },
  472. disabled: true,
  473. bindShow: false,
  474. bindSn: '',
  475. memberId: '',
  476. userInfo: null,
  477. errCount: 0,
  478. showCount: 0
  479. }
  480. },
  481. // mounted() {
  482. // this.memberId = 50289
  483. // this.params.unionId = '6291d3bde21b840008ae7842' // 先写死
  484. // this.getNewSleepReport()
  485. // },
  486. onShow() {
  487. this.memberId = Storage.getItem('uid')
  488. if (this.memberId) {
  489. if (!this.isDeviceAdded) {
  490. this.user = Storage.getItem('userInfo')
  491. this.params.unionId = this.user.union_id
  492. this.getNewSleepReport()
  493. } else {
  494. if (Storage.getItem('refreshSleepReport')) {
  495. Storage.removeItem('refreshSleepReport')
  496. this.getNewSleepReport()
  497. } else {
  498. this.showCount ++
  499. if (this.showCount === 3) {
  500. this.showCount = 0
  501. this.getNewSleepReport()
  502. }
  503. }
  504. }
  505. } else {
  506. this.isDeviceAdded = false
  507. }
  508. },
  509. methods: {
  510. handleMonthClick() {
  511. uni.navigateTo({
  512. url: '/pages/log/report/monthReport'
  513. })
  514. },
  515. handleWeekClick() {
  516. uni.navigateTo({
  517. url: '/pages/log/report/weekReport'
  518. })
  519. },
  520. // 获取睡眠报告
  521. getNewSleepReport() {
  522. const _this = this
  523. this.todayTimeList = []
  524. API_SLEEP_REPORT.getNewListByUnionId(this.params).then(res => {
  525. _this.disabled = false
  526. if (res.length > 0) {
  527. this.isDeviceAdded = true
  528. _this.sleepReportFrom = Object.assign({}, res[0])
  529. _this.sleepReportFrom.report_content = JSON.parse(_this.sleepReportFrom.report_content)
  530. _this.sleepReportList = res
  531. res.forEach(item => {
  532. _this.todayTimeList.push(item.gobed_time + '~' + item.outbed_time)
  533. })
  534. _this.selectDay = Foundation.unixToDate(_this.sleepReportFrom.report_time, "yyyy-MM-dd")
  535. let str = _this.selectDay.split("-")
  536. _this.selectYearMonth.year = str[0]
  537. _this.selectYearMonth.month = str[1]
  538. if (_this.params.reportTime === -1) {
  539. _this.getDaysTag()
  540. }
  541. _this.params.reportTime = res[0].report_time
  542. _this.qualifiedCount(_this.sleepReportFrom.report_content)
  543. _this.initAllChar(_this.sleepReportFrom)
  544. } else {
  545. this.isDeviceAdded = false
  546. if (Storage.getItem('myBindDevices')) {
  547. uni.showToast({
  548. title: '您还没有睡眠报告,请先进行睡眠测量',
  549. icon: 'none',
  550. duration: 5000
  551. })
  552. }
  553. }
  554. })
  555. },
  556. // 选中日历
  557. change(e) {
  558. console.log('change===', e)
  559. const date = this.selected.find(item=> item.date === e.extraInfo.date)
  560. if (date) {
  561. this.index = 0
  562. this.params.reportTime = date.report_time
  563. this.selectDay = e.fulldate
  564. this.calendarShow = false
  565. this.getNewSleepReport()
  566. } else {
  567. if (this.todayStr === e.fulldate && this.selectYearMonth.month !== e.month) {
  568. this.index = 0
  569. this.params.reportTime = -1
  570. this.calendarShow = false
  571. this.getNewSleepReport()
  572. } else {
  573. uni.showToast({
  574. title: e.fulldate + '无睡眠报告',
  575. icon: 'none',
  576. duration: 5000
  577. })
  578. }
  579. }
  580. // this.selected[0].date = e.fulldate
  581. },
  582. // 月份切换
  583. monthSwitch(e) {
  584. console.log('monthSwitch===', e)
  585. //{year: 2020, month: 5}
  586. this.selectYearMonth = e
  587. this.getDaysTag()
  588. },
  589. // 获取日期点
  590. getDaysTag() {
  591. this.selectYearMonth.unionId = this.params.unionId
  592. API_SLEEP_REPORT.getSleepReportDaysTag(this.selectYearMonth).then(res => {
  593. this.selected = []
  594. res.forEach(p => {
  595. this.selected.push({
  596. date: this.selectYearMonth.year + '-' + this.selectYearMonth.month + '-' + p.flog_time,
  597. report_time: p.report_time
  598. })
  599. })
  600. })
  601. },
  602. // 时间选择
  603. PickerChange(e) {
  604. this.index = e.detail.value
  605. this.sleepReportFrom = Object.assign({}, this.sleepReportList[this.index])
  606. this.sleepReportFrom.report_content = JSON.parse(this.sleepReportFrom.report_content)
  607. this.qualifiedCount(this.sleepReportFrom.report_content)
  608. this.initAllChar(this.sleepReportFrom)
  609. },
  610. qualifiedCount(data) {
  611. let count = 0
  612. if (data.avg_hx.state === 1) {
  613. count ++
  614. } else if (data.sleep_eff.state === 1) {
  615. count ++
  616. } else if (data.avg_rh.state === 1) {
  617. count ++
  618. } else if (data.move_count.state === 1) {
  619. count ++
  620. } else if (data.outbed_count.state === 1) {
  621. count ++
  622. } else if (data.snoring_count.state === 1) {
  623. count ++
  624. }
  625. this.errCount = count
  626. },
  627. initAllChar(data) {
  628. const _this = this
  629. setTimeout(() => {
  630. _this.nowChart("refChart-1", 1, data.report_content.dt_arr, data.report_content.outbed_arr)
  631. _this.nowChart("refChart-2", 2, data.report_content.dt_arr, data.report_content.move_arr)
  632. _this.nowChart("refChart-3", 3, data.report_content.dt_arr, data.report_content.rh_arr)
  633. _this.nowChart("refChart-4", 4, data.report_content.dt_arr, data.report_content.hx_arr)
  634. _this.nowChart("refChart-5", 0, data.report_content.dt_arr, data.report_content.snoring_arr)
  635. _this.nowChart("refChart-6", 6, data.report_content.dt_arr, data.report_content.hxstop_arr)
  636. _this.nowChart("refChart-7", -1, data.report_content.dt_arr, data.report_content.sleep_arr)
  637. }, 800)
  638. },
  639. // 将分转化为时分
  640. formateSeconds(endTime, type) {
  641. let secondTime = endTime//将传入的秒的值转化为Number
  642. let hourStr, minuteStr
  643. if (type === 0) {
  644. hourStr = '小时'
  645. minuteStr = '分钟'
  646. } else {
  647. hourStr = '时'
  648. minuteStr = '分'
  649. }
  650. let h = 0// 初始化小时
  651. if (secondTime > 60) {//如果秒数大于60,将秒数转换成整数
  652. h = parseInt(secondTime / 60)//获取小时,获取分钟除以60,得到整数小时
  653. secondTime = parseInt(secondTime % 60) //获取小时后取佘的分,获取分钟除以60取佘的分
  654. return h + hourStr + secondTime + minuteStr
  655. } else {
  656. return secondTime + minuteStr
  657. }
  658. },
  659. onInit1(e) {
  660. this.chartObj = e
  661. },
  662. // 组装图表
  663. nowChart(refChar, type, xData, yData) {
  664. this.onInit1(this.chartObj)
  665. let canvas = this.$refs[refChar].canvas
  666. echarts.setCanvasCreator(() => canvas)
  667. let myChart = echarts.init(canvas, 'halloween', {
  668. width: this.chartObj.width + 10,
  669. height: this.chartObj.height - 10
  670. })
  671. let options = Object.assign(this.getOptions(xData, yData), {})
  672. if (type <=2) {
  673. options.yAxis = this.getOptionsY1(type)
  674. } else {
  675. options.yAxis = this.getOptionsY2()
  676. }
  677. if (type === -1) {
  678. options.series[0].areaStyle = {}
  679. }
  680. myChart.setOption(options)
  681. },
  682. getOptions(xData, yData) {
  683. return {
  684. visualMap: [
  685. {
  686. show: false,
  687. type: 'continuous',
  688. seriesIndex: 0,
  689. min: 0,
  690. max: 300,
  691. },
  692. ],
  693. color: '#FFFFFF',
  694. title: {
  695. left: 'left',
  696. // text: title,
  697. },
  698. tooltip: {
  699. trigger: 'axis',
  700. axisPointer: {
  701. animation: false,
  702. },
  703. },
  704. grid: {
  705. top: '15%',
  706. bottom: '10%',
  707. },
  708. xAxis: {
  709. type: 'category',
  710. boundaryGap: [0, '100%'],
  711. // show: false, // 不显示x轴
  712. splitLine: {
  713. show: false,
  714. },
  715. axisLine: {
  716. lineStyle:{
  717. color:'#FFFFFF',
  718. width:1, //x轴线的宽度
  719. }
  720. },
  721. triggerEvent: true,
  722. data: xData,
  723. },
  724. yAxis: {},
  725. series: [
  726. {
  727. type: 'line',
  728. lineStyle: {
  729. width: 0.8
  730. },
  731. showSymbol: false,
  732. hoverAnimation: false,
  733. data: yData,
  734. },
  735. ]
  736. }
  737. },
  738. getOptionsY1(type) {
  739. let min = 0, max = 1
  740. if (type === -1) {
  741. min = 0
  742. max = 'dataMax'
  743. }
  744. return {
  745. type: 'value',
  746. // boundaryGap: [0, '100%'],
  747. min: min,
  748. max: max, // dataMax取数据在该轴上的最大值作为最大刻度
  749. splitNumber: 4,
  750. minInterval: 1,
  751. splitLine: {
  752. show: false, // 是否显示分隔线
  753. },
  754. axisLine: {
  755. show: true, // 是否显示坐标轴轴线
  756. lineStyle:{
  757. color:'#FFFFFF',
  758. width:1, //x轴线的宽度
  759. }
  760. },
  761. // axisLine: {
  762. // show: false // 是否显示坐标轴轴线
  763. // },
  764. axisLabel: {
  765. formatter: function (value, index) {
  766. switch (type) {
  767. case -1:
  768. let str = ''
  769. console.log('value===', value)
  770. switch (value) {
  771. case 0:
  772. str = '清醒'
  773. break
  774. case 10:
  775. str = '浅睡'
  776. break
  777. case 20:
  778. str = '中睡'
  779. break
  780. case 30:
  781. str = '深睡'
  782. break
  783. default:
  784. break
  785. }
  786. return str
  787. case 0:
  788. return value === 0 ? '睡眠' : '打鼾'
  789. case 1:
  790. return value === 0 ? '离床' : '在床'
  791. case 2:
  792. return value === 0 ? '睡眠' : '体动'
  793. default:
  794. return value
  795. }
  796. }
  797. }
  798. }
  799. },
  800. getOptionsY2() {
  801. return {
  802. type: 'value',
  803. boundaryGap: [0, '100%'],
  804. min: 0,
  805. max: 'dataMax', // 取数据在该轴上的最大值作为最大刻度
  806. splitLine: {
  807. show: false, // 是否显示分隔线
  808. },
  809. axisLine: {
  810. show: false, // 是否显示坐标轴轴线
  811. lineStyle:{
  812. color:'#FFFFFF'
  813. }
  814. }
  815. }
  816. },
  817. // 扫描条码
  818. scan() {
  819. let _this = this
  820. uni.scanCode({
  821. success: function (res) {
  822. console.log(res, res.result.length)
  823. if (res.result.length > 20) {
  824. if (res.scanType === 'QR_CODE') {
  825. const urlStr = res.result
  826. const qs = Foundation.getQueryObject(urlStr)
  827. if (qs.mac && qs.type === 'MATTRESS') {
  828. _this.bindSn = qs.mac
  829. } else {
  830. uni.showToast({
  831. title: '请扫码正确的睡眠床垫二维码',
  832. icon: 'none',
  833. duration: 5000
  834. });
  835. }
  836. } else {
  837. _this.bindSn = res.result
  838. }
  839. } else {
  840. let str = res.result.split(':')
  841. if (str.length > 1) {
  842. _this.bindSn = str[1]
  843. } else {
  844. _this.bindSn = res.result
  845. }
  846. }
  847. },
  848. fail: (err) => {
  849. console.log(err)
  850. // #ifdef MP
  851. uni.getSetting({
  852. success: (res) => {
  853. let authStatus = res.authSetting['scope.camera'];
  854. if (!authStatus) {
  855. uni.showModal({
  856. title: '授权失败',
  857. content: 'app需要使用您的相机,请在设置界面打开相关权限',
  858. success: (res) => {
  859. if (res.confirm) {
  860. uni.openSetting()
  861. }
  862. }
  863. })
  864. }
  865. }
  866. })
  867. // #endif
  868. }
  869. })
  870. },
  871. bindDevice() {
  872. if (!this.bindSn) {
  873. uni.showToast({
  874. title: '请输入或绑定正确的二维码',
  875. icon: 'none',
  876. duration: 5000
  877. })
  878. return
  879. }
  880. const params = {
  881. imei: this.bindSn,
  882. memberId: this.memberId,
  883. dtype: deviceDtypeEnum.DEVICE_TYPE.SMCD
  884. }
  885. this.bindShow = false
  886. let _this = this
  887. API_deviceMemberBind.bindDeviceByDtype(params).then(res => {
  888. if (res.success) {
  889. _this.bindSn = ''
  890. uni.showToast({
  891. title: '绑定成功',
  892. })
  893. _this.API_getDeviceList()
  894. } else {
  895. uni.showToast({
  896. title: res.message,
  897. icon: 'none'
  898. })
  899. }
  900. })
  901. },
  902. API_getDeviceList() {
  903. const _this = this
  904. API_deviceMemberBind.getDeviceByDtypeAndMemberId({dtype: deviceDtypeEnum.DEVICE_TYPE.SMCD, memberId: this.memberId}).then(res => {
  905. if (res.length === 0) {
  906. Storage.removeItem("nowChangeDevice")
  907. Storage.removeItem("myBindDevices")
  908. } else {
  909. Storage.setItem("nowChangeDevice", res[0].imei)
  910. Storage.setItem("myBindDevices", res)
  911. }
  912. })
  913. },
  914. addBindDevice() {
  915. if (this.memberId) {
  916. this.bindShow = 'show'
  917. } else {
  918. uni.showModal({
  919. title: '提示',
  920. content: "您还没有登录,是否前往登录?",
  921. confirmText: "确定",
  922. showCancel: true,
  923. success: function(res) {
  924. if (res.confirm) {
  925. uni.reLaunch({
  926. url:'/pages/login/auth'
  927. })
  928. }
  929. }
  930. })
  931. }
  932. },
  933. hideModal(e) {
  934. this.calendarShow = null
  935. },
  936. handleClickBreath(index) {
  937. uni.navigateTo({
  938. url: '/pages/log/report/reportDetail?index=' + index + '&unionId=' + this.params.unionId + '&time=' + this.params.reportTime
  939. })
  940. }
  941. }
  942. }
  943. </script>
  944. <style lang="scss">
  945. .btns-report {
  946. color: #ffffff;
  947. position: absolute;
  948. top: 9rem;
  949. font-size: 15px;
  950. z-index: 101;
  951. }
  952. .btn-week-report, .btn-month-report {
  953. background-color: #7e5a9d4d;
  954. -webkit-backdrop-filter: blur(0.31rem);
  955. backdrop-filter: blur(0.31rem);
  956. padding: 0.3rem 1rem;
  957. border-radius: 0 1rem 1rem 0;
  958. margin-bottom: 0.5rem;
  959. }
  960. .report_heart {
  961. .section_25 {
  962. opacity: 0.8;
  963. //background: linear-gradient(90deg, rgba(86, 17, 247, 0.5) 0%, #4d9efa 100%);
  964. border-radius: 0.5rem;
  965. height: 11.19rem;
  966. }
  967. .space-x-9 {
  968. & > view:not(:first-child),
  969. & > text:not(:first-child),
  970. & > image:not(:first-child) {
  971. margin-left: 0.56rem;
  972. }
  973. }
  974. .pos_21 {
  975. position: absolute;
  976. left: 0.63rem;
  977. top: 0.63rem;
  978. }
  979. .group_12 {
  980. width: 17.88rem;
  981. .text_11 {
  982. color: #6b6b6b;
  983. }
  984. .space-x-48 {
  985. & > view:not(:first-child),
  986. & > text:not(:first-child),
  987. & > image:not(:first-child) {
  988. margin-left: 3rem;
  989. }
  990. }
  991. }
  992. .pos_22 {
  993. position: absolute;
  994. right: 0.59rem;
  995. top: 3.66rem;
  996. }
  997. }
  998. .report-easy {
  999. margin: 1rem 1.25rem 0 1.25rem;
  1000. }
  1001. .image_8 {
  1002. border-radius: 50%;
  1003. width: 2rem;
  1004. height: 2rem;
  1005. }
  1006. .font_3 {
  1007. font-size: 1rem;
  1008. font-family: PingFangSC;
  1009. line-height: 0.94rem;
  1010. color: #ffffff;
  1011. }
  1012. .image_11 {
  1013. width: 1rem;
  1014. height: 1rem;
  1015. }
  1016. .report_breath {
  1017. padding: 0.63rem;
  1018. background-image: linear-gradient(180deg, #341a4b 0%, #167df2 100%);
  1019. border-radius: 0.5rem;
  1020. .report_breath_chart {
  1021. position: relative;
  1022. height: 7rem;
  1023. }
  1024. .pos_33 {
  1025. }
  1026. .pos_34 {
  1027. .group_15 {
  1028. padding: 1rem 0;
  1029. .font_10 {
  1030. font-size: 0.88rem;
  1031. font-family: PingFangSC;
  1032. line-height: 0.81rem;
  1033. color: #ffffff;
  1034. }
  1035. .font_5 {
  1036. font-size: 1.13rem;
  1037. font-family: PingFangSC;
  1038. line-height: 0.81rem;
  1039. color: #ffffff;
  1040. }
  1041. .font_6 {
  1042. font-size: 0.75rem;
  1043. font-family: PingFangSC;
  1044. line-height: 0.69rem;
  1045. color: #ffffff;
  1046. }
  1047. .group_2 {
  1048. padding-left: 1.25rem;
  1049. .text_12 {
  1050. color: #ffffff;
  1051. }
  1052. .space-x-30 {
  1053. & > view:not(:first-child),
  1054. & > text:not(:first-child),
  1055. & > image:not(:first-child) {
  1056. margin-left: 1.88rem;
  1057. }
  1058. }
  1059. }
  1060. .group_16 {
  1061. margin-top: 0.63rem;
  1062. .section_32 {
  1063. width: 2.28rem;
  1064. height: 5.53rem;
  1065. border: solid 0.031rem #4a315e;
  1066. }
  1067. .section_34 {
  1068. width: 2.22rem;
  1069. height: 5.53rem;
  1070. border: solid 0.031rem #4a315e;
  1071. }
  1072. .view_7 {
  1073. margin-left: 2.13rem;
  1074. }
  1075. .section_36 {
  1076. margin-left: 2.31rem;
  1077. width: 2.34rem;
  1078. height: 5.53rem;
  1079. border: solid 0.031rem #4a315e;
  1080. }
  1081. .view_8 {
  1082. margin-left: 2.13rem;
  1083. }
  1084. .pos_36 {
  1085. position: absolute;
  1086. left: 2.25rem;
  1087. top: 0;
  1088. }
  1089. .pos_38 {
  1090. position: absolute;
  1091. right: 4.47rem;
  1092. top: 0;
  1093. }
  1094. .section_35 {
  1095. width: 2.41rem;
  1096. height: 5.53rem;
  1097. border: solid 0.031rem #4a315e;
  1098. }
  1099. .pos_37 {
  1100. position: absolute;
  1101. left: 6.63rem;
  1102. top: 0;
  1103. }
  1104. .pos_39 {
  1105. position: absolute;
  1106. right: 0;
  1107. top: 0;
  1108. }
  1109. .section_33 {
  1110. width: 17.97rem;
  1111. height: 1.41rem;
  1112. border: solid 0.031rem #4a315e;
  1113. }
  1114. .pos_41 {
  1115. position: absolute;
  1116. left: 0;
  1117. right: 0;
  1118. top: 2.75rem;
  1119. }
  1120. .pos_40 {
  1121. position: absolute;
  1122. left: 0;
  1123. right: 0;
  1124. top: 1.38rem;
  1125. }
  1126. .pos_35 {
  1127. position: absolute;
  1128. left: 0;
  1129. right: 0;
  1130. top: 0;
  1131. }
  1132. .pos_43 {
  1133. position: absolute;
  1134. left: 0;
  1135. right: 0;
  1136. top: 2.88rem;
  1137. }
  1138. .pos_42 {
  1139. position: absolute;
  1140. left: 0;
  1141. right: 0.13rem;
  1142. top: 50%;
  1143. transform: translateY(-50%);
  1144. }
  1145. }
  1146. .group_17 {
  1147. padding: 0.38rem 0 1rem 0.5rem;
  1148. }
  1149. }
  1150. .list-divider {
  1151. margin: 0 0.63rem;
  1152. background-color: #523c65;
  1153. height: 0.063rem;
  1154. }
  1155. }
  1156. }
  1157. .echarts-wrap {
  1158. width: 100%;
  1159. height: 7rem;
  1160. margin-bottom: 0.3rem;
  1161. position: absolute;
  1162. bottom: 0
  1163. }
  1164. .report-sleep {
  1165. //position: absolute;
  1166. top: 3rem;
  1167. width: 100%;
  1168. padding: 0.3rem;
  1169. .item-sleep {
  1170. .item-sleep-title {
  1171. font-size: 14px;
  1172. font-weight: 400;
  1173. letter-spacing: 0px;
  1174. line-height: 14px;
  1175. color: rgba(155, 151, 188, 1);
  1176. text-align: left;
  1177. vertical-align: top;
  1178. }
  1179. .item-sleep-desc {
  1180. font-size: 12px;
  1181. font-weight: 400;
  1182. letter-spacing: 0px;
  1183. line-height: 12px;
  1184. color: rgba(255, 255, 255, 1);
  1185. text-align: left;
  1186. vertical-align: top;
  1187. margin-top: 5px;
  1188. }
  1189. }
  1190. }
  1191. .report-charts {
  1192. margin-top: 0.5rem;
  1193. }
  1194. .bottom-btns {
  1195. position: absolute;
  1196. bottom: 10px;
  1197. .bottom-btn {
  1198. font-size: 16px;
  1199. font-weight: 500;
  1200. letter-spacing: 0px;
  1201. line-height: 30px;
  1202. color: #ffffff;
  1203. text-align: center;
  1204. width: 98px;
  1205. height: 30px;
  1206. border-radius: 14.5px;
  1207. margin: 10px;
  1208. }
  1209. .btn_1 {
  1210. background: linear-gradient(90deg, rgba(44, 37, 247, 0.6) 0%, rgba(6, 21, 153, 1) 100%);
  1211. }
  1212. .btn_2 {
  1213. background: linear-gradient(90deg, rgba(5, 96, 232, 1) 0%, rgba(100, 158, 245, 1) 100%);
  1214. }
  1215. }
  1216. .report-container {
  1217. background-color: #000000;
  1218. padding-bottom: 50px;
  1219. height: -webkit-fill-available;
  1220. .image-wrapper_2 {
  1221. background: url("http://wdklmall.oss-cn-shenzhen.aliyuncs.com/mallgoods/goods/560AFD2D700A40F19029F9FA2FD4612E.png");
  1222. background-repeat: no-repeat;
  1223. background-size: cover;
  1224. height: 100%;
  1225. width: 100%;
  1226. }
  1227. }
  1228. .report-data-sum {
  1229. margin: 1rem;
  1230. padding-top: 2.5rem;
  1231. color: #ffffff;
  1232. .icon-data-sum {
  1233. width: 40px;
  1234. height: 40px;
  1235. }
  1236. .text-data-sum {
  1237. margin-left: 6px;
  1238. text-align: left;
  1239. .title-data-sum {
  1240. width: 100%;
  1241. font-size: 12px;
  1242. line-height: 12px;
  1243. font-weight: 400;
  1244. margin-bottom: 2px;
  1245. }
  1246. .font_4 {
  1247. font-size: 24px;
  1248. line-height: 24px;
  1249. height: 24px;
  1250. }
  1251. .font_5 {
  1252. font-size: 14px;
  1253. line-height: 24px;
  1254. }
  1255. }
  1256. }
  1257. .no-device-page {
  1258. background-color: #000000;
  1259. width: 100%;
  1260. overflow-y: auto;
  1261. overflow-x: hidden;
  1262. height: 100%;
  1263. height: -webkit-fill-available;
  1264. }
  1265. .page {
  1266. background-color: #000000;
  1267. width: 100%;
  1268. overflow-y: auto;
  1269. overflow-x: hidden;
  1270. height: auto!important;
  1271. .group {
  1272. overflow-y: auto;
  1273. .group_3 {
  1274. padding: 0rem 0 0.25rem;
  1275. .group_8 {
  1276. padding: 0 1.25rem;
  1277. .space-x-6 {
  1278. & > view:not(:first-child),
  1279. & > text:not(:first-child),
  1280. & > image:not(:first-child) {
  1281. margin-left: 0.38rem;
  1282. }
  1283. .font_5 {
  1284. font-size: 1.13rem;
  1285. font-family: PingFangSC;
  1286. line-height: 0.81rem;
  1287. color: #ffffff;
  1288. }
  1289. }
  1290. .space-y-12 {
  1291. & > view:not(:first-child),
  1292. & > text:not(:first-child),
  1293. & > image:not(:first-child) {
  1294. margin-top: 0.75rem;
  1295. }
  1296. }
  1297. .font_7 {
  1298. font-size: 0.75rem;
  1299. font-family: PingFangSC;
  1300. line-height: 0.69rem;
  1301. color: #9b97bc;
  1302. }
  1303. .space-x-4 {
  1304. & > view:not(:first-child),
  1305. & > text:not(:first-child),
  1306. & > image:not(:first-child) {
  1307. margin-left: 0.25rem;
  1308. }
  1309. }
  1310. .group_11 {
  1311. width: 8.25rem;
  1312. }
  1313. .space-x-10 {
  1314. & > view:not(:first-child),
  1315. & > text:not(:first-child),
  1316. & > image:not(:first-child) {
  1317. margin-left: 0.63rem;
  1318. }
  1319. }
  1320. .font_10 {
  1321. font-size: 0.88rem;
  1322. font-family: PingFangSC;
  1323. line-height: 0.81rem;
  1324. color: #ffffff;
  1325. }
  1326. .divider {
  1327. background-image: repeating-linear-gradient(
  1328. 90deg,
  1329. #e02020,
  1330. #e02020 0.35%,
  1331. transparent 0.35%,
  1332. transparent 1.047%
  1333. );
  1334. background-position: -0.031rem 0px;
  1335. height: 0.063rem;
  1336. }
  1337. .font_9 {
  1338. font-size: 0.56rem;
  1339. font-family: PingFangSC;
  1340. line-height: 0.41rem;
  1341. color: #9b97bc;
  1342. }
  1343. }
  1344. .space-y-10 {
  1345. & > view:not(:first-child),
  1346. & > text:not(:first-child),
  1347. & > image:not(:first-child) {
  1348. margin-top: 0.63rem;
  1349. }
  1350. }
  1351. }
  1352. }
  1353. .font_6 {
  1354. font-size: 0.75rem;
  1355. font-family: PingFangSC;
  1356. line-height: 0.69rem;
  1357. color: #ffffff;
  1358. }
  1359. }
  1360. .page {
  1361. background-color: #000000;
  1362. width: 100%;
  1363. overflow-y: auto;
  1364. overflow-x: hidden;
  1365. height: 100%;
  1366. margin-bottom: 1rem;
  1367. .report {
  1368. overflow-y: auto;
  1369. .report_header {
  1370. .report-header-img {
  1371. position: absolute;
  1372. top: -5rem;
  1373. left: 50%;
  1374. width: 22.5rem;
  1375. height: 28.5em;
  1376. margin-left: -11.25rem;
  1377. }
  1378. .report_score {
  1379. padding-top: 1rem;
  1380. z-index: 100;
  1381. .report_period {
  1382. margin-left: 1.2rem;
  1383. }
  1384. .report_score_data {
  1385. .section_5 {
  1386. padding: 0.38rem 0.88rem;
  1387. background-color: #7e5a9d4d;
  1388. border-radius: 1rem 0px 0px 1rem;
  1389. backdrop-filter: blur(0.31rem);
  1390. width: 5.25rem;
  1391. height: 2rem;
  1392. .image_6 {
  1393. width: 1.5rem;
  1394. height: 1.31rem;
  1395. }
  1396. .text_5 {
  1397. line-height: 0.72rem;
  1398. }
  1399. }
  1400. .space-x-76-reverse {
  1401. & > view:not(:last-child),
  1402. & > text:not(:last-child),
  1403. & > image:not(:last-child) {
  1404. margin-right: 4.75rem;
  1405. }
  1406. .text_4 {
  1407. color: #ffffff;
  1408. font-size: 1.5rem;
  1409. font-family: PingFangSC;
  1410. line-height: 1.38rem;
  1411. }
  1412. }
  1413. .text_6 {
  1414. margin-top: 1rem;
  1415. //color: #ffffff;
  1416. font-size: 3.38rem;
  1417. font-family: PingFangSC;
  1418. line-height: 2.47rem;
  1419. }
  1420. .text_7 {
  1421. margin-top: 1.38rem;
  1422. line-height: 0.94rem;
  1423. }
  1424. }
  1425. }
  1426. .space-y-55 {
  1427. & > view:not(:first-child),
  1428. & > text:not(:first-child),
  1429. & > image:not(:first-child) {
  1430. margin-top: 3.44rem;
  1431. }
  1432. }
  1433. }
  1434. .report_analysis {
  1435. padding-top: 0.63rem;
  1436. .font_4 {
  1437. font-size: 1.13rem;
  1438. font-family: PingFangSC;
  1439. line-height: 0.81rem;
  1440. color: #ffffff;
  1441. }
  1442. .text_8 {
  1443. margin-left: 1.25rem;
  1444. line-height: 1.06rem;
  1445. }
  1446. .section_easy {
  1447. margin: 0 1.25rem;
  1448. padding: 0 0.88rem;
  1449. height: 52px;
  1450. opacity: 0.8;
  1451. border-radius: 8px;
  1452. background: linear-gradient(180deg, rgba(22, 125, 242, 1) 0%, rgba(52, 26, 75, 1) 100%);
  1453. .image_7 {
  1454. width: 32px;
  1455. height: 32px;
  1456. }
  1457. .font_3 {
  1458. font-size: 16px;
  1459. color: #ffffff;
  1460. font-weight: 400;
  1461. margin-left: 9px;
  1462. }
  1463. .font_7 {
  1464. color: rgba(255, 255, 255, 0.6);
  1465. font-size: 16px;
  1466. margin-right: 10px;
  1467. }
  1468. .font_4 {
  1469. font-size: 18px;
  1470. color: #ffffff;
  1471. font-weight: 500;
  1472. }
  1473. }
  1474. .section_efficiency {
  1475. margin: 0 1.25rem;
  1476. padding: 0 0.88rem;
  1477. height: 52px;
  1478. opacity: 0.8;
  1479. border-radius: 8px;
  1480. background: linear-gradient(180deg, rgba(22, 125, 242, 1) 0%, rgba(52, 26, 75, 1) 100%);
  1481. .image_7 {
  1482. width: 32px;
  1483. height: 32px;
  1484. }
  1485. .font_3 {
  1486. font-size: 16px;
  1487. color: #ffffff;
  1488. font-weight: 400;
  1489. margin-left: 9px;
  1490. }
  1491. .font_4 {
  1492. font-size: 18px;
  1493. color: #ffffff;
  1494. font-weight: 500;
  1495. }
  1496. }
  1497. .report_analysis_data {
  1498. padding-top: 22.5rem;
  1499. .space-x-26 {
  1500. & > view:not(:first-child),
  1501. & > text:not(:first-child),
  1502. & > image:not(:first-child) {
  1503. margin-left: 1.63rem;
  1504. }
  1505. .text_10 {
  1506. line-height: 1.5rem;
  1507. width: 8.5rem;
  1508. }
  1509. .section_9 {
  1510. margin-top: 1.75rem;
  1511. padding: 1.19rem 0.5rem 0.5rem 0.81rem;
  1512. background-color: #1751e6cc;
  1513. border-radius: 0.5rem 0.5rem 0 0;
  1514. height: 2.63rem;
  1515. }
  1516. .space-x-34 {
  1517. & > view:not(:first-child),
  1518. & > text:not(:first-child),
  1519. & > image:not(:first-child) {
  1520. margin-left: 2.13rem;
  1521. }
  1522. }
  1523. }
  1524. .equal-division {
  1525. padding: 0 0.88rem;
  1526. .equal-division-item {
  1527. padding: 0.25rem 0.38rem 0;
  1528. flex: 1 1 10.81rem;
  1529. .section_6 {
  1530. padding: 0.63rem 0.63rem 0.75rem;
  1531. background-color: #1751e6cc;
  1532. border-radius: 0.5rem;
  1533. .text_9 {
  1534. margin-left: 1.5rem;
  1535. }
  1536. .space-x-12 {
  1537. & > view:not(:first-child),
  1538. & > text:not(:first-child),
  1539. & > image:not(:first-child) {
  1540. margin-left: 0.75rem;
  1541. }
  1542. }
  1543. }
  1544. .view {
  1545. margin-top: 0.63rem;
  1546. }
  1547. .group_7 {
  1548. margin-top: 0.63rem;
  1549. padding: 1.25rem 0.63rem 2rem;
  1550. background: url("http://wdklmall.oss-cn-shenzhen.aliyuncs.com/mallgoods/goods/BC26FBFE91F4495EAE8E403C73DCFBA7.png");
  1551. background-repeat: no-repeat;
  1552. background-size: cover;
  1553. border-radius: 0.5rem;
  1554. .text_10 {
  1555. line-height: 1.4rem;
  1556. margin-top: 0.2rem;
  1557. }
  1558. }
  1559. }
  1560. .equal-division-item_2 {
  1561. padding: 0.25rem 0.38rem;
  1562. flex: 1 1 10.81rem;
  1563. .section_7 {
  1564. padding: 0.63rem 0.75rem 0.75rem;
  1565. background-color: #1751e6cc;
  1566. border-radius: 0.5rem;
  1567. .group_5 {
  1568. padding: 0 1.5rem;
  1569. }
  1570. .space-x-4 {
  1571. & > view:not(:first-child),
  1572. & > text:not(:first-child),
  1573. & > image:not(:first-child) {
  1574. margin-left: 0.25rem;
  1575. }
  1576. }
  1577. }
  1578. .section_8 {
  1579. padding: 0.55rem 0.5rem 0.55rem 0.75rem;
  1580. background-color: #1751e6cc;
  1581. border-radius: 0.5rem;
  1582. }
  1583. }
  1584. .space-y-10 {
  1585. & > view:not(:first-child),
  1586. & > text:not(:first-child),
  1587. & > image:not(:first-child) {
  1588. margin-top: 0.63rem;
  1589. }
  1590. }
  1591. .space-y-12 {
  1592. & > view:not(:first-child),
  1593. & > text:not(:first-child),
  1594. & > image:not(:first-child) {
  1595. margin-top: 0.75rem;
  1596. }
  1597. }
  1598. .group_6 {
  1599. padding: 0 1.63rem;
  1600. }
  1601. }
  1602. .space-x-29 {
  1603. & > view:not(:first-child),
  1604. & > text:not(:first-child),
  1605. & > image:not(:first-child) {
  1606. margin-left: 0.1rem;
  1607. }
  1608. }
  1609. .pos {
  1610. position: absolute;
  1611. left: 0;
  1612. right: 0;
  1613. top: 0;
  1614. }
  1615. .space-x-6 {
  1616. & > view:not(:first-child),
  1617. & > text:not(:first-child),
  1618. & > image:not(:first-child) {
  1619. margin-left: 0.38rem;
  1620. }
  1621. }
  1622. .font_5 {
  1623. font-size: 0.75rem;
  1624. font-family: PingFangSC;
  1625. line-height: 0.69rem;
  1626. color: #ffffff;
  1627. }
  1628. }
  1629. }
  1630. .space-y-4 {
  1631. & > view:not(:first-child),
  1632. & > text:not(:first-child),
  1633. & > image:not(:first-child) {
  1634. margin-top: 0.5rem;
  1635. }
  1636. }
  1637. .font_2 {
  1638. font-size: 1rem;
  1639. font-family: PingFangSC;
  1640. line-height: 0.69rem;
  1641. color: #ffffff;
  1642. }
  1643. .space-x-8 {
  1644. & > view:not(:first-child),
  1645. & > text:not(:first-child),
  1646. & > image:not(:first-child) {
  1647. margin-left: 0.5rem;
  1648. }
  1649. }
  1650. .space-x-10 {
  1651. & > view:not(:first-child),
  1652. & > text:not(:first-child),
  1653. & > image:not(:first-child) {
  1654. margin-left: 0.63rem;
  1655. }
  1656. .section_3 {
  1657. padding: 0.5rem 0.63rem;
  1658. background-color: #7e5a9d4d;
  1659. border-radius: 1rem;
  1660. backdrop-filter: blur(0.31rem);
  1661. height: 2rem;
  1662. .space-x-24 {
  1663. & > view:not(:first-child),
  1664. & > text:not(:first-child),
  1665. & > image:not(:first-child) {
  1666. margin-left: 1.5rem;
  1667. }
  1668. .text_2 {
  1669. line-height: 0.72rem;
  1670. }
  1671. }
  1672. .image_4 {
  1673. width: 0.63rem;
  1674. height: 0.94rem;
  1675. }
  1676. }
  1677. .section_4 {
  1678. margin-right: 1.25rem;
  1679. padding: 0.75rem 0.63rem 0.5rem;
  1680. background-color: #7e5a9d4d;
  1681. border-radius: 1rem;
  1682. backdrop-filter: blur(0.31rem);
  1683. height: 2rem;
  1684. .text_3 {
  1685. line-height: 0.72rem;
  1686. }
  1687. .image_5 {
  1688. margin-right: 0.25rem;
  1689. width: 0.63rem;
  1690. height: 0.38rem;
  1691. }
  1692. }
  1693. }
  1694. .image_7 {
  1695. width: 0.88rem;
  1696. height: 0.88rem;
  1697. }
  1698. .font_3 {
  1699. font-size: 0.88rem;
  1700. font-family: PingFangSC;
  1701. line-height: 0.81rem;
  1702. color: white;
  1703. }
  1704. }
  1705. }
  1706. .page {
  1707. background-color: #000000;
  1708. width: 100%;
  1709. overflow-y: auto;
  1710. overflow-x: hidden;
  1711. height: 100%;
  1712. .image-wrapper_2 {
  1713. padding-bottom: 0.38rem;
  1714. overflow-y: auto;
  1715. .header {
  1716. padding: 1rem 0.88rem 0.75rem;
  1717. background-color: #ffffff4d;
  1718. .space-x-6-reverse {
  1719. & > view:not(:last-child),
  1720. & > text:not(:last-child),
  1721. & > image:not(:last-child) {
  1722. margin-right: 0.38rem;
  1723. }
  1724. .image {
  1725. width: 1.06rem;
  1726. height: 0.69rem;
  1727. }
  1728. .image_2 {
  1729. width: 0.94rem;
  1730. height: 0.69rem;
  1731. }
  1732. .image_3 {
  1733. width: 1.5rem;
  1734. height: 0.72rem;
  1735. }
  1736. }
  1737. .text {
  1738. margin-top: 2rem;
  1739. color: #ffffff;
  1740. font-size: 1.16rem;
  1741. font-family: PingFangSC;
  1742. line-height: 1.06rem;
  1743. }
  1744. .section {
  1745. padding: 0.38rem 0.75rem;
  1746. background-color: #ffffff99;
  1747. border-radius: 1rem;
  1748. width: 5.44rem;
  1749. border: solid 0.031rem #00000014;
  1750. .image-wrapper {
  1751. width: 1.19rem;
  1752. .image_5 {
  1753. width: 1.19rem;
  1754. height: 0.44rem;
  1755. }
  1756. .image_4 {
  1757. width: 1.13rem;
  1758. height: 1.06rem;
  1759. }
  1760. }
  1761. .section_2 {
  1762. background-color: #00000033;
  1763. width: 0.063rem;
  1764. height: 1.16rem;
  1765. }
  1766. }
  1767. .space-x-11 {
  1768. & > view:not(:first-child),
  1769. & > text:not(:first-child),
  1770. & > image:not(:first-child) {
  1771. margin-left: 0.69rem;
  1772. }
  1773. }
  1774. .pos {
  1775. position: absolute;
  1776. right: 0.44rem;
  1777. top: 3.06rem;
  1778. }
  1779. }
  1780. .image_6 {
  1781. width: 23.44rem;
  1782. height: 41.69rem;
  1783. }
  1784. }
  1785. }
  1786. .myFont {
  1787. font-size: 12px;
  1788. color: white;
  1789. }
  1790. @media screen and (max-width: 300px) {
  1791. .report-header-img {
  1792. top: -1.5rem;
  1793. }
  1794. }
  1795. </style>