report.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860
  1. <template>
  2. <view class="report-container">
  3. <cu-custom bgColor="#000000"><view slot="content" style="color: #FFFFFF">睡眠监测</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.params.reportTime = date.report_time
  562. this.selectDay = e.fulldate
  563. this.calendarShow = false
  564. this.getNewSleepReport()
  565. } else {
  566. if (this.todayStr === e.fulldate && this.selectYearMonth.month !== e.month) {
  567. this.params.reportTime = -1
  568. this.calendarShow = false
  569. this.getNewSleepReport()
  570. } else {
  571. uni.showToast({
  572. title: e.fulldate + '无睡眠报告',
  573. icon: 'none',
  574. duration: 5000
  575. })
  576. }
  577. }
  578. // this.selected[0].date = e.fulldate
  579. },
  580. // 月份切换
  581. monthSwitch(e) {
  582. console.log('monthSwitch===', e)
  583. //{year: 2020, month: 5}
  584. this.selectYearMonth = e
  585. this.getDaysTag()
  586. },
  587. // 获取日期点
  588. getDaysTag() {
  589. this.selectYearMonth.unionId = this.params.unionId
  590. API_SLEEP_REPORT.getSleepReportDaysTag(this.selectYearMonth).then(res => {
  591. this.selected = []
  592. res.forEach(p => {
  593. this.selected.push({
  594. date: this.selectYearMonth.year + '-' + this.selectYearMonth.month + '-' + p.flog_time,
  595. report_time: p.report_time
  596. })
  597. })
  598. })
  599. },
  600. // 时间选择
  601. PickerChange(e) {
  602. this.index = e.detail.value
  603. this.sleepReportFrom = Object.assign({}, this.sleepReportList[this.index])
  604. this.sleepReportFrom.report_content = JSON.parse(this.sleepReportFrom.report_content)
  605. this.qualifiedCount(this.sleepReportFrom.report_content)
  606. this.initAllChar(this.sleepReportFrom)
  607. },
  608. qualifiedCount(data) {
  609. let count = 0
  610. if (data.avg_hx.state === 1) {
  611. count ++
  612. } else if (data.sleep_eff.state === 1) {
  613. count ++
  614. } else if (data.avg_rh.state === 1) {
  615. count ++
  616. } else if (data.move_count.state === 1) {
  617. count ++
  618. } else if (data.outbed_count.state === 1) {
  619. count ++
  620. } else if (data.snoring_count.state === 1) {
  621. count ++
  622. }
  623. this.errCount = count
  624. },
  625. initAllChar(data) {
  626. const _this = this
  627. setTimeout(() => {
  628. _this.nowChart("refChart-1", 1, data.report_content.dt_arr, data.report_content.outbed_arr)
  629. _this.nowChart("refChart-2", 2, data.report_content.dt_arr, data.report_content.move_arr)
  630. _this.nowChart("refChart-3", 3, data.report_content.dt_arr, data.report_content.rh_arr)
  631. _this.nowChart("refChart-4", 4, data.report_content.dt_arr, data.report_content.hx_arr)
  632. _this.nowChart("refChart-5", 0, data.report_content.dt_arr, data.report_content.snoring_arr)
  633. _this.nowChart("refChart-6", 6, data.report_content.dt_arr, data.report_content.hxstop_arr)
  634. _this.nowChart("refChart-7", -1, data.report_content.dt_arr, data.report_content.sleep_arr)
  635. }, 800)
  636. },
  637. // 将分转化为时分
  638. formateSeconds(endTime, type) {
  639. let secondTime = endTime//将传入的秒的值转化为Number
  640. let hourStr, minuteStr
  641. if (type === 0) {
  642. hourStr = '小时'
  643. minuteStr = '分钟'
  644. } else {
  645. hourStr = '时'
  646. minuteStr = '分'
  647. }
  648. let h = 0// 初始化小时
  649. if (secondTime > 60) {//如果秒数大于60,将秒数转换成整数
  650. h = parseInt(secondTime / 60)//获取小时,获取分钟除以60,得到整数小时
  651. secondTime = parseInt(secondTime % 60) //获取小时后取佘的分,获取分钟除以60取佘的分
  652. return h + hourStr + secondTime + minuteStr
  653. } else {
  654. return secondTime + minuteStr
  655. }
  656. },
  657. onInit1(e) {
  658. this.chartObj = e
  659. },
  660. // 组装图表
  661. nowChart(refChar, type, xData, yData) {
  662. this.onInit1(this.chartObj)
  663. let canvas = this.$refs[refChar].canvas
  664. echarts.setCanvasCreator(() => canvas)
  665. let myChart = echarts.init(canvas, 'halloween', {
  666. width: this.chartObj.width + 10,
  667. height: this.chartObj.height - 10
  668. })
  669. let options = Object.assign(this.getOptions(xData, yData), {})
  670. if (type <=2) {
  671. options.yAxis = this.getOptionsY1(type)
  672. } else {
  673. options.yAxis = this.getOptionsY2()
  674. }
  675. if (type === -1) {
  676. options.series[0].areaStyle = {}
  677. }
  678. myChart.setOption(options)
  679. },
  680. getOptions(xData, yData) {
  681. return {
  682. visualMap: [
  683. {
  684. show: false,
  685. type: 'continuous',
  686. seriesIndex: 0,
  687. min: 0,
  688. max: 300,
  689. },
  690. ],
  691. color: '#FFFFFF',
  692. title: {
  693. left: 'left',
  694. // text: title,
  695. },
  696. tooltip: {
  697. trigger: 'axis',
  698. axisPointer: {
  699. animation: false,
  700. },
  701. },
  702. grid: {
  703. top: '15%',
  704. bottom: '10%',
  705. },
  706. xAxis: {
  707. type: 'category',
  708. boundaryGap: [0, '100%'],
  709. // show: false, // 不显示x轴
  710. splitLine: {
  711. show: false,
  712. },
  713. axisLine: {
  714. lineStyle:{
  715. color:'#FFFFFF',
  716. width:1, //x轴线的宽度
  717. }
  718. },
  719. triggerEvent: true,
  720. data: xData,
  721. },
  722. yAxis: {},
  723. series: [
  724. {
  725. type: 'line',
  726. lineStyle: {
  727. width: 0.8
  728. },
  729. showSymbol: false,
  730. hoverAnimation: false,
  731. data: yData,
  732. },
  733. ]
  734. }
  735. },
  736. getOptionsY1(type) {
  737. let min = 0, max = 1
  738. if (type === -1) {
  739. min = 0
  740. max = 'dataMax'
  741. }
  742. return {
  743. type: 'value',
  744. // boundaryGap: [0, '100%'],
  745. min: min,
  746. max: max, // dataMax取数据在该轴上的最大值作为最大刻度
  747. splitNumber: 4,
  748. minInterval: 1,
  749. splitLine: {
  750. show: false, // 是否显示分隔线
  751. },
  752. axisLine: {
  753. show: true, // 是否显示坐标轴轴线
  754. lineStyle:{
  755. color:'#FFFFFF',
  756. width:1, //x轴线的宽度
  757. }
  758. },
  759. // axisLine: {
  760. // show: false // 是否显示坐标轴轴线
  761. // },
  762. axisLabel: {
  763. formatter: function (value, index) {
  764. switch (type) {
  765. case -1:
  766. let str = ''
  767. console.log('value===', value)
  768. switch (value) {
  769. case 0:
  770. str = '清醒'
  771. break
  772. case 10:
  773. str = '浅睡'
  774. break
  775. case 20:
  776. str = '中睡'
  777. break
  778. case 30:
  779. str = '深睡'
  780. break
  781. default:
  782. break
  783. }
  784. return str
  785. case 0:
  786. return value === 0 ? '睡眠' : '打鼾'
  787. case 1:
  788. return value === 0 ? '离床' : '在床'
  789. case 2:
  790. return value === 0 ? '睡眠' : '体动'
  791. default:
  792. return value
  793. }
  794. }
  795. }
  796. }
  797. },
  798. getOptionsY2() {
  799. return {
  800. type: 'value',
  801. boundaryGap: [0, '100%'],
  802. min: 0,
  803. max: 'dataMax', // 取数据在该轴上的最大值作为最大刻度
  804. splitLine: {
  805. show: false, // 是否显示分隔线
  806. },
  807. axisLine: {
  808. show: false, // 是否显示坐标轴轴线
  809. lineStyle:{
  810. color:'#FFFFFF'
  811. }
  812. }
  813. }
  814. },
  815. // 扫描条码
  816. scan() {
  817. let _this = this
  818. uni.scanCode({
  819. success: function (res) {
  820. console.log(res, res.result.length)
  821. if (res.result.length > 20) {
  822. if (res.scanType === 'QR_CODE') {
  823. const urlStr = res.result
  824. const qs = Foundation.getQueryObject(urlStr)
  825. if (qs.mac && qs.type === 'MATTRESS') {
  826. _this.bindSn = qs.mac
  827. } else {
  828. uni.showToast({
  829. title: '请扫码正确的睡眠床垫二维码',
  830. icon: 'none',
  831. duration: 5000
  832. });
  833. }
  834. } else {
  835. _this.bindSn = res.result
  836. }
  837. } else {
  838. let str = res.result.split(':')
  839. if (str.length > 1) {
  840. _this.bindSn = str[1]
  841. } else {
  842. _this.bindSn = res.result
  843. }
  844. }
  845. },
  846. fail: (err) => {
  847. console.log(err)
  848. // #ifdef MP
  849. uni.getSetting({
  850. success: (res) => {
  851. let authStatus = res.authSetting['scope.camera'];
  852. if (!authStatus) {
  853. uni.showModal({
  854. title: '授权失败',
  855. content: 'app需要使用您的相机,请在设置界面打开相关权限',
  856. success: (res) => {
  857. if (res.confirm) {
  858. uni.openSetting()
  859. }
  860. }
  861. })
  862. }
  863. }
  864. })
  865. // #endif
  866. }
  867. })
  868. },
  869. bindDevice() {
  870. if (!this.bindSn) {
  871. uni.showToast({
  872. title: '请输入或绑定正确的二维码',
  873. icon: 'none',
  874. duration: 5000
  875. })
  876. return
  877. }
  878. const params = {
  879. imei: this.bindSn,
  880. memberId: this.memberId,
  881. dtype: deviceDtypeEnum.DEVICE_TYPE.SMCD
  882. }
  883. this.bindShow = false
  884. let _this = this
  885. API_deviceMemberBind.bindDeviceByDtype(params).then(res => {
  886. if (res.success) {
  887. _this.bindSn = ''
  888. uni.showToast({
  889. title: '绑定成功',
  890. })
  891. _this.API_getDeviceList()
  892. } else {
  893. uni.showToast({
  894. title: res.message,
  895. icon: 'none'
  896. })
  897. }
  898. })
  899. },
  900. API_getDeviceList() {
  901. const _this = this
  902. API_deviceMemberBind.getDeviceByDtypeAndMemberId({dtype: deviceDtypeEnum.DEVICE_TYPE.SMCD, memberId: this.memberId}).then(res => {
  903. if (res.length === 0) {
  904. Storage.removeItem("nowChangeDevice")
  905. Storage.removeItem("myBindDevices")
  906. } else {
  907. Storage.setItem("nowChangeDevice", res[0].imei)
  908. Storage.setItem("myBindDevices", res)
  909. }
  910. })
  911. },
  912. addBindDevice() {
  913. if (this.memberId) {
  914. this.bindShow = 'show'
  915. } else {
  916. uni.showModal({
  917. title: '提示',
  918. content: "您还没有登录,是否前往登录?",
  919. confirmText: "确定",
  920. showCancel: true,
  921. success: function(res) {
  922. if (res.confirm) {
  923. uni.reLaunch({
  924. url:'/pages/login/auth'
  925. })
  926. }
  927. }
  928. })
  929. }
  930. },
  931. hideModal(e) {
  932. this.calendarShow = null
  933. },
  934. handleClickBreath(index) {
  935. uni.navigateTo({
  936. url: '/pages/log/report/reportDetail?index=' + index + '&unionId=' + this.params.unionId + '&time=' + this.params.reportTime
  937. })
  938. }
  939. }
  940. }
  941. </script>
  942. <style lang="scss">
  943. .btns-report {
  944. color: #ffffff;
  945. position: absolute;
  946. top: 9rem;
  947. font-size: 15px;
  948. z-index: 101;
  949. }
  950. .btn-week-report, .btn-month-report {
  951. background-color: #7e5a9d4d;
  952. -webkit-backdrop-filter: blur(0.31rem);
  953. backdrop-filter: blur(0.31rem);
  954. padding: 0.3rem 1rem;
  955. border-radius: 0 1rem 1rem 0;
  956. margin-bottom: 0.5rem;
  957. }
  958. .report_heart {
  959. .section_25 {
  960. opacity: 0.8;
  961. //background: linear-gradient(90deg, rgba(86, 17, 247, 0.5) 0%, #4d9efa 100%);
  962. border-radius: 0.5rem;
  963. height: 11.19rem;
  964. }
  965. .space-x-9 {
  966. & > view:not(:first-child),
  967. & > text:not(:first-child),
  968. & > image:not(:first-child) {
  969. margin-left: 0.56rem;
  970. }
  971. }
  972. .pos_21 {
  973. position: absolute;
  974. left: 0.63rem;
  975. top: 0.63rem;
  976. }
  977. .group_12 {
  978. width: 17.88rem;
  979. .text_11 {
  980. color: #6b6b6b;
  981. }
  982. .space-x-48 {
  983. & > view:not(:first-child),
  984. & > text:not(:first-child),
  985. & > image:not(:first-child) {
  986. margin-left: 3rem;
  987. }
  988. }
  989. }
  990. .pos_22 {
  991. position: absolute;
  992. right: 0.59rem;
  993. top: 3.66rem;
  994. }
  995. }
  996. .report-easy {
  997. margin: 1rem 1.25rem 0 1.25rem;
  998. }
  999. .image_8 {
  1000. border-radius: 50%;
  1001. width: 2rem;
  1002. height: 2rem;
  1003. }
  1004. .font_3 {
  1005. font-size: 1rem;
  1006. font-family: PingFangSC;
  1007. line-height: 0.94rem;
  1008. color: #ffffff;
  1009. }
  1010. .image_11 {
  1011. width: 1rem;
  1012. height: 1rem;
  1013. }
  1014. .report_breath {
  1015. padding: 0.63rem;
  1016. background-image: linear-gradient(180deg, #341a4b 0%, #167df2 100%);
  1017. border-radius: 0.5rem;
  1018. .report_breath_chart {
  1019. position: relative;
  1020. height: 7rem;
  1021. }
  1022. .pos_33 {
  1023. }
  1024. .pos_34 {
  1025. .group_15 {
  1026. padding: 1rem 0;
  1027. .font_10 {
  1028. font-size: 0.88rem;
  1029. font-family: PingFangSC;
  1030. line-height: 0.81rem;
  1031. color: #ffffff;
  1032. }
  1033. .font_5 {
  1034. font-size: 1.13rem;
  1035. font-family: PingFangSC;
  1036. line-height: 0.81rem;
  1037. color: #ffffff;
  1038. }
  1039. .font_6 {
  1040. font-size: 0.75rem;
  1041. font-family: PingFangSC;
  1042. line-height: 0.69rem;
  1043. color: #ffffff;
  1044. }
  1045. .group_2 {
  1046. padding-left: 1.25rem;
  1047. .text_12 {
  1048. color: #ffffff;
  1049. }
  1050. .space-x-30 {
  1051. & > view:not(:first-child),
  1052. & > text:not(:first-child),
  1053. & > image:not(:first-child) {
  1054. margin-left: 1.88rem;
  1055. }
  1056. }
  1057. }
  1058. .group_16 {
  1059. margin-top: 0.63rem;
  1060. .section_32 {
  1061. width: 2.28rem;
  1062. height: 5.53rem;
  1063. border: solid 0.031rem #4a315e;
  1064. }
  1065. .section_34 {
  1066. width: 2.22rem;
  1067. height: 5.53rem;
  1068. border: solid 0.031rem #4a315e;
  1069. }
  1070. .view_7 {
  1071. margin-left: 2.13rem;
  1072. }
  1073. .section_36 {
  1074. margin-left: 2.31rem;
  1075. width: 2.34rem;
  1076. height: 5.53rem;
  1077. border: solid 0.031rem #4a315e;
  1078. }
  1079. .view_8 {
  1080. margin-left: 2.13rem;
  1081. }
  1082. .pos_36 {
  1083. position: absolute;
  1084. left: 2.25rem;
  1085. top: 0;
  1086. }
  1087. .pos_38 {
  1088. position: absolute;
  1089. right: 4.47rem;
  1090. top: 0;
  1091. }
  1092. .section_35 {
  1093. width: 2.41rem;
  1094. height: 5.53rem;
  1095. border: solid 0.031rem #4a315e;
  1096. }
  1097. .pos_37 {
  1098. position: absolute;
  1099. left: 6.63rem;
  1100. top: 0;
  1101. }
  1102. .pos_39 {
  1103. position: absolute;
  1104. right: 0;
  1105. top: 0;
  1106. }
  1107. .section_33 {
  1108. width: 17.97rem;
  1109. height: 1.41rem;
  1110. border: solid 0.031rem #4a315e;
  1111. }
  1112. .pos_41 {
  1113. position: absolute;
  1114. left: 0;
  1115. right: 0;
  1116. top: 2.75rem;
  1117. }
  1118. .pos_40 {
  1119. position: absolute;
  1120. left: 0;
  1121. right: 0;
  1122. top: 1.38rem;
  1123. }
  1124. .pos_35 {
  1125. position: absolute;
  1126. left: 0;
  1127. right: 0;
  1128. top: 0;
  1129. }
  1130. .pos_43 {
  1131. position: absolute;
  1132. left: 0;
  1133. right: 0;
  1134. top: 2.88rem;
  1135. }
  1136. .pos_42 {
  1137. position: absolute;
  1138. left: 0;
  1139. right: 0.13rem;
  1140. top: 50%;
  1141. transform: translateY(-50%);
  1142. }
  1143. }
  1144. .group_17 {
  1145. padding: 0.38rem 0 1rem 0.5rem;
  1146. }
  1147. }
  1148. .list-divider {
  1149. margin: 0 0.63rem;
  1150. background-color: #523c65;
  1151. height: 0.063rem;
  1152. }
  1153. }
  1154. }
  1155. .echarts-wrap {
  1156. width: 100%;
  1157. height: 7rem;
  1158. margin-bottom: 0.3rem;
  1159. position: absolute;
  1160. bottom: 0
  1161. }
  1162. .report-sleep {
  1163. //position: absolute;
  1164. top: 3rem;
  1165. width: 100%;
  1166. padding: 0.3rem;
  1167. .item-sleep {
  1168. .item-sleep-title {
  1169. font-size: 14px;
  1170. font-weight: 400;
  1171. letter-spacing: 0px;
  1172. line-height: 14px;
  1173. color: rgba(155, 151, 188, 1);
  1174. text-align: left;
  1175. vertical-align: top;
  1176. }
  1177. .item-sleep-desc {
  1178. font-size: 12px;
  1179. font-weight: 400;
  1180. letter-spacing: 0px;
  1181. line-height: 12px;
  1182. color: rgba(255, 255, 255, 1);
  1183. text-align: left;
  1184. vertical-align: top;
  1185. margin-top: 5px;
  1186. }
  1187. }
  1188. }
  1189. .report-charts {
  1190. margin-top: 0.5rem;
  1191. }
  1192. .bottom-btns {
  1193. position: absolute;
  1194. bottom: 10px;
  1195. .bottom-btn {
  1196. font-size: 16px;
  1197. font-weight: 500;
  1198. letter-spacing: 0px;
  1199. line-height: 30px;
  1200. color: #ffffff;
  1201. text-align: center;
  1202. width: 98px;
  1203. height: 30px;
  1204. border-radius: 14.5px;
  1205. margin: 10px;
  1206. }
  1207. .btn_1 {
  1208. background: linear-gradient(90deg, rgba(44, 37, 247, 0.6) 0%, rgba(6, 21, 153, 1) 100%);
  1209. }
  1210. .btn_2 {
  1211. background: linear-gradient(90deg, rgba(5, 96, 232, 1) 0%, rgba(100, 158, 245, 1) 100%);
  1212. }
  1213. }
  1214. .report-container {
  1215. background-color: #000000;
  1216. padding-bottom: 50px;
  1217. height: -webkit-fill-available;
  1218. .image-wrapper_2 {
  1219. background: url("http://wdklmall.oss-cn-shenzhen.aliyuncs.com/mallgoods/goods/560AFD2D700A40F19029F9FA2FD4612E.png");
  1220. background-repeat: no-repeat;
  1221. background-size: cover;
  1222. height: 100%;
  1223. width: 100%;
  1224. }
  1225. }
  1226. .report-data-sum {
  1227. margin: 1rem;
  1228. padding-top: 2.5rem;
  1229. color: #ffffff;
  1230. .icon-data-sum {
  1231. width: 40px;
  1232. height: 40px;
  1233. }
  1234. .text-data-sum {
  1235. margin-left: 6px;
  1236. text-align: left;
  1237. .title-data-sum {
  1238. width: 100%;
  1239. font-size: 12px;
  1240. line-height: 12px;
  1241. font-weight: 400;
  1242. margin-bottom: 2px;
  1243. }
  1244. .font_4 {
  1245. font-size: 24px;
  1246. line-height: 24px;
  1247. height: 24px;
  1248. }
  1249. .font_5 {
  1250. font-size: 14px;
  1251. line-height: 24px;
  1252. }
  1253. }
  1254. }
  1255. .no-device-page {
  1256. background-color: #000000;
  1257. width: 100%;
  1258. overflow-y: auto;
  1259. overflow-x: hidden;
  1260. height: 100%;
  1261. height: -webkit-fill-available;
  1262. }
  1263. .page {
  1264. background-color: #000000;
  1265. width: 100%;
  1266. overflow-y: auto;
  1267. overflow-x: hidden;
  1268. height: auto!important;
  1269. .group {
  1270. overflow-y: auto;
  1271. .group_3 {
  1272. padding: 0rem 0 0.25rem;
  1273. .group_8 {
  1274. padding: 0 1.25rem;
  1275. .space-x-6 {
  1276. & > view:not(:first-child),
  1277. & > text:not(:first-child),
  1278. & > image:not(:first-child) {
  1279. margin-left: 0.38rem;
  1280. }
  1281. .font_5 {
  1282. font-size: 1.13rem;
  1283. font-family: PingFangSC;
  1284. line-height: 0.81rem;
  1285. color: #ffffff;
  1286. }
  1287. }
  1288. .space-y-12 {
  1289. & > view:not(:first-child),
  1290. & > text:not(:first-child),
  1291. & > image:not(:first-child) {
  1292. margin-top: 0.75rem;
  1293. }
  1294. }
  1295. .font_7 {
  1296. font-size: 0.75rem;
  1297. font-family: PingFangSC;
  1298. line-height: 0.69rem;
  1299. color: #9b97bc;
  1300. }
  1301. .space-x-4 {
  1302. & > view:not(:first-child),
  1303. & > text:not(:first-child),
  1304. & > image:not(:first-child) {
  1305. margin-left: 0.25rem;
  1306. }
  1307. }
  1308. .group_11 {
  1309. width: 8.25rem;
  1310. }
  1311. .space-x-10 {
  1312. & > view:not(:first-child),
  1313. & > text:not(:first-child),
  1314. & > image:not(:first-child) {
  1315. margin-left: 0.63rem;
  1316. }
  1317. }
  1318. .font_10 {
  1319. font-size: 0.88rem;
  1320. font-family: PingFangSC;
  1321. line-height: 0.81rem;
  1322. color: #ffffff;
  1323. }
  1324. .divider {
  1325. background-image: repeating-linear-gradient(
  1326. 90deg,
  1327. #e02020,
  1328. #e02020 0.35%,
  1329. transparent 0.35%,
  1330. transparent 1.047%
  1331. );
  1332. background-position: -0.031rem 0px;
  1333. height: 0.063rem;
  1334. }
  1335. .font_9 {
  1336. font-size: 0.56rem;
  1337. font-family: PingFangSC;
  1338. line-height: 0.41rem;
  1339. color: #9b97bc;
  1340. }
  1341. }
  1342. .space-y-10 {
  1343. & > view:not(:first-child),
  1344. & > text:not(:first-child),
  1345. & > image:not(:first-child) {
  1346. margin-top: 0.63rem;
  1347. }
  1348. }
  1349. }
  1350. }
  1351. .font_6 {
  1352. font-size: 0.75rem;
  1353. font-family: PingFangSC;
  1354. line-height: 0.69rem;
  1355. color: #ffffff;
  1356. }
  1357. }
  1358. .page {
  1359. background-color: #000000;
  1360. width: 100%;
  1361. overflow-y: auto;
  1362. overflow-x: hidden;
  1363. height: 100%;
  1364. margin-bottom: 1rem;
  1365. .report {
  1366. overflow-y: auto;
  1367. .report_header {
  1368. .report-header-img {
  1369. position: absolute;
  1370. top: -5rem;
  1371. left: 50%;
  1372. width: 22.5rem;
  1373. height: 28.5em;
  1374. margin-left: -11.25rem;
  1375. }
  1376. .report_score {
  1377. padding-top: 1rem;
  1378. z-index: 100;
  1379. .report_period {
  1380. margin-left: 1.2rem;
  1381. }
  1382. .report_score_data {
  1383. .section_5 {
  1384. padding: 0.38rem 0.88rem;
  1385. background-color: #7e5a9d4d;
  1386. border-radius: 1rem 0px 0px 1rem;
  1387. backdrop-filter: blur(0.31rem);
  1388. width: 5.25rem;
  1389. height: 2rem;
  1390. .image_6 {
  1391. width: 1.5rem;
  1392. height: 1.31rem;
  1393. }
  1394. .text_5 {
  1395. line-height: 0.72rem;
  1396. }
  1397. }
  1398. .space-x-76-reverse {
  1399. & > view:not(:last-child),
  1400. & > text:not(:last-child),
  1401. & > image:not(:last-child) {
  1402. margin-right: 4.75rem;
  1403. }
  1404. .text_4 {
  1405. color: #ffffff;
  1406. font-size: 1.5rem;
  1407. font-family: PingFangSC;
  1408. line-height: 1.38rem;
  1409. }
  1410. }
  1411. .text_6 {
  1412. margin-top: 1rem;
  1413. //color: #ffffff;
  1414. font-size: 3.38rem;
  1415. font-family: PingFangSC;
  1416. line-height: 2.47rem;
  1417. }
  1418. .text_7 {
  1419. margin-top: 1.38rem;
  1420. line-height: 0.94rem;
  1421. }
  1422. }
  1423. }
  1424. .space-y-55 {
  1425. & > view:not(:first-child),
  1426. & > text:not(:first-child),
  1427. & > image:not(:first-child) {
  1428. margin-top: 3.44rem;
  1429. }
  1430. }
  1431. }
  1432. .report_analysis {
  1433. padding-top: 0.63rem;
  1434. .font_4 {
  1435. font-size: 1.13rem;
  1436. font-family: PingFangSC;
  1437. line-height: 0.81rem;
  1438. color: #ffffff;
  1439. }
  1440. .text_8 {
  1441. margin-left: 1.25rem;
  1442. line-height: 1.06rem;
  1443. }
  1444. .section_easy {
  1445. margin: 0 1.25rem;
  1446. padding: 0 0.88rem;
  1447. height: 52px;
  1448. opacity: 0.8;
  1449. border-radius: 8px;
  1450. background: linear-gradient(180deg, rgba(22, 125, 242, 1) 0%, rgba(52, 26, 75, 1) 100%);
  1451. .image_7 {
  1452. width: 32px;
  1453. height: 32px;
  1454. }
  1455. .font_3 {
  1456. font-size: 16px;
  1457. color: #ffffff;
  1458. font-weight: 400;
  1459. margin-left: 9px;
  1460. }
  1461. .font_7 {
  1462. color: rgba(255, 255, 255, 0.6);
  1463. font-size: 16px;
  1464. margin-right: 10px;
  1465. }
  1466. .font_4 {
  1467. font-size: 18px;
  1468. color: #ffffff;
  1469. font-weight: 500;
  1470. }
  1471. }
  1472. .section_efficiency {
  1473. margin: 0 1.25rem;
  1474. padding: 0 0.88rem;
  1475. height: 52px;
  1476. opacity: 0.8;
  1477. border-radius: 8px;
  1478. background: linear-gradient(180deg, rgba(22, 125, 242, 1) 0%, rgba(52, 26, 75, 1) 100%);
  1479. .image_7 {
  1480. width: 32px;
  1481. height: 32px;
  1482. }
  1483. .font_3 {
  1484. font-size: 16px;
  1485. color: #ffffff;
  1486. font-weight: 400;
  1487. margin-left: 9px;
  1488. }
  1489. .font_4 {
  1490. font-size: 18px;
  1491. color: #ffffff;
  1492. font-weight: 500;
  1493. }
  1494. }
  1495. .report_analysis_data {
  1496. padding-top: 22.5rem;
  1497. .space-x-26 {
  1498. & > view:not(:first-child),
  1499. & > text:not(:first-child),
  1500. & > image:not(:first-child) {
  1501. margin-left: 1.63rem;
  1502. }
  1503. .text_10 {
  1504. line-height: 1.5rem;
  1505. width: 8.5rem;
  1506. }
  1507. .section_9 {
  1508. margin-top: 1.75rem;
  1509. padding: 1.19rem 0.5rem 0.5rem 0.81rem;
  1510. background-color: #1751e6cc;
  1511. border-radius: 0.5rem 0.5rem 0 0;
  1512. height: 2.63rem;
  1513. }
  1514. .space-x-34 {
  1515. & > view:not(:first-child),
  1516. & > text:not(:first-child),
  1517. & > image:not(:first-child) {
  1518. margin-left: 2.13rem;
  1519. }
  1520. }
  1521. }
  1522. .equal-division {
  1523. padding: 0 0.88rem;
  1524. .equal-division-item {
  1525. padding: 0.25rem 0.38rem 0;
  1526. flex: 1 1 10.81rem;
  1527. .section_6 {
  1528. padding: 0.63rem 0.63rem 0.75rem;
  1529. background-color: #1751e6cc;
  1530. border-radius: 0.5rem;
  1531. .text_9 {
  1532. margin-left: 1.5rem;
  1533. }
  1534. .space-x-12 {
  1535. & > view:not(:first-child),
  1536. & > text:not(:first-child),
  1537. & > image:not(:first-child) {
  1538. margin-left: 0.75rem;
  1539. }
  1540. }
  1541. }
  1542. .view {
  1543. margin-top: 0.63rem;
  1544. }
  1545. .group_7 {
  1546. margin-top: 0.63rem;
  1547. padding: 1.25rem 0.63rem 2rem;
  1548. background: url("http://wdklmall.oss-cn-shenzhen.aliyuncs.com/mallgoods/goods/BC26FBFE91F4495EAE8E403C73DCFBA7.png");
  1549. background-repeat: no-repeat;
  1550. background-size: cover;
  1551. border-radius: 0.5rem;
  1552. .text_10 {
  1553. line-height: 1.4rem;
  1554. margin-top: 0.2rem;
  1555. }
  1556. }
  1557. }
  1558. .equal-division-item_2 {
  1559. padding: 0.25rem 0.38rem;
  1560. flex: 1 1 10.81rem;
  1561. .section_7 {
  1562. padding: 0.63rem 0.75rem 0.75rem;
  1563. background-color: #1751e6cc;
  1564. border-radius: 0.5rem;
  1565. .group_5 {
  1566. padding: 0 1.5rem;
  1567. }
  1568. .space-x-4 {
  1569. & > view:not(:first-child),
  1570. & > text:not(:first-child),
  1571. & > image:not(:first-child) {
  1572. margin-left: 0.25rem;
  1573. }
  1574. }
  1575. }
  1576. .section_8 {
  1577. padding: 0.55rem 0.5rem 0.55rem 0.75rem;
  1578. background-color: #1751e6cc;
  1579. border-radius: 0.5rem;
  1580. }
  1581. }
  1582. .space-y-10 {
  1583. & > view:not(:first-child),
  1584. & > text:not(:first-child),
  1585. & > image:not(:first-child) {
  1586. margin-top: 0.63rem;
  1587. }
  1588. }
  1589. .space-y-12 {
  1590. & > view:not(:first-child),
  1591. & > text:not(:first-child),
  1592. & > image:not(:first-child) {
  1593. margin-top: 0.75rem;
  1594. }
  1595. }
  1596. .group_6 {
  1597. padding: 0 1.63rem;
  1598. }
  1599. }
  1600. .space-x-29 {
  1601. & > view:not(:first-child),
  1602. & > text:not(:first-child),
  1603. & > image:not(:first-child) {
  1604. margin-left: 0.1rem;
  1605. }
  1606. }
  1607. .pos {
  1608. position: absolute;
  1609. left: 0;
  1610. right: 0;
  1611. top: 0;
  1612. }
  1613. .space-x-6 {
  1614. & > view:not(:first-child),
  1615. & > text:not(:first-child),
  1616. & > image:not(:first-child) {
  1617. margin-left: 0.38rem;
  1618. }
  1619. }
  1620. .font_5 {
  1621. font-size: 0.75rem;
  1622. font-family: PingFangSC;
  1623. line-height: 0.69rem;
  1624. color: #ffffff;
  1625. }
  1626. }
  1627. }
  1628. .space-y-4 {
  1629. & > view:not(:first-child),
  1630. & > text:not(:first-child),
  1631. & > image:not(:first-child) {
  1632. margin-top: 0.5rem;
  1633. }
  1634. }
  1635. .font_2 {
  1636. font-size: 1rem;
  1637. font-family: PingFangSC;
  1638. line-height: 0.69rem;
  1639. color: #ffffff;
  1640. }
  1641. .space-x-8 {
  1642. & > view:not(:first-child),
  1643. & > text:not(:first-child),
  1644. & > image:not(:first-child) {
  1645. margin-left: 0.5rem;
  1646. }
  1647. }
  1648. .space-x-10 {
  1649. & > view:not(:first-child),
  1650. & > text:not(:first-child),
  1651. & > image:not(:first-child) {
  1652. margin-left: 0.63rem;
  1653. }
  1654. .section_3 {
  1655. padding: 0.5rem 0.63rem;
  1656. background-color: #7e5a9d4d;
  1657. border-radius: 1rem;
  1658. backdrop-filter: blur(0.31rem);
  1659. height: 2rem;
  1660. .space-x-24 {
  1661. & > view:not(:first-child),
  1662. & > text:not(:first-child),
  1663. & > image:not(:first-child) {
  1664. margin-left: 1.5rem;
  1665. }
  1666. .text_2 {
  1667. line-height: 0.72rem;
  1668. }
  1669. }
  1670. .image_4 {
  1671. width: 0.63rem;
  1672. height: 0.94rem;
  1673. }
  1674. }
  1675. .section_4 {
  1676. margin-right: 1.25rem;
  1677. padding: 0.75rem 0.63rem 0.5rem;
  1678. background-color: #7e5a9d4d;
  1679. border-radius: 1rem;
  1680. backdrop-filter: blur(0.31rem);
  1681. height: 2rem;
  1682. .text_3 {
  1683. line-height: 0.72rem;
  1684. }
  1685. .image_5 {
  1686. margin-right: 0.25rem;
  1687. width: 0.63rem;
  1688. height: 0.38rem;
  1689. }
  1690. }
  1691. }
  1692. .image_7 {
  1693. width: 0.88rem;
  1694. height: 0.88rem;
  1695. }
  1696. .font_3 {
  1697. font-size: 0.88rem;
  1698. font-family: PingFangSC;
  1699. line-height: 0.81rem;
  1700. color: white;
  1701. }
  1702. }
  1703. }
  1704. .page {
  1705. background-color: #000000;
  1706. width: 100%;
  1707. overflow-y: auto;
  1708. overflow-x: hidden;
  1709. height: 100%;
  1710. .image-wrapper_2 {
  1711. padding-bottom: 0.38rem;
  1712. overflow-y: auto;
  1713. .header {
  1714. padding: 1rem 0.88rem 0.75rem;
  1715. background-color: #ffffff4d;
  1716. .space-x-6-reverse {
  1717. & > view:not(:last-child),
  1718. & > text:not(:last-child),
  1719. & > image:not(:last-child) {
  1720. margin-right: 0.38rem;
  1721. }
  1722. .image {
  1723. width: 1.06rem;
  1724. height: 0.69rem;
  1725. }
  1726. .image_2 {
  1727. width: 0.94rem;
  1728. height: 0.69rem;
  1729. }
  1730. .image_3 {
  1731. width: 1.5rem;
  1732. height: 0.72rem;
  1733. }
  1734. }
  1735. .text {
  1736. margin-top: 2rem;
  1737. color: #ffffff;
  1738. font-size: 1.16rem;
  1739. font-family: PingFangSC;
  1740. line-height: 1.06rem;
  1741. }
  1742. .section {
  1743. padding: 0.38rem 0.75rem;
  1744. background-color: #ffffff99;
  1745. border-radius: 1rem;
  1746. width: 5.44rem;
  1747. border: solid 0.031rem #00000014;
  1748. .image-wrapper {
  1749. width: 1.19rem;
  1750. .image_5 {
  1751. width: 1.19rem;
  1752. height: 0.44rem;
  1753. }
  1754. .image_4 {
  1755. width: 1.13rem;
  1756. height: 1.06rem;
  1757. }
  1758. }
  1759. .section_2 {
  1760. background-color: #00000033;
  1761. width: 0.063rem;
  1762. height: 1.16rem;
  1763. }
  1764. }
  1765. .space-x-11 {
  1766. & > view:not(:first-child),
  1767. & > text:not(:first-child),
  1768. & > image:not(:first-child) {
  1769. margin-left: 0.69rem;
  1770. }
  1771. }
  1772. .pos {
  1773. position: absolute;
  1774. right: 0.44rem;
  1775. top: 3.06rem;
  1776. }
  1777. }
  1778. .image_6 {
  1779. width: 23.44rem;
  1780. height: 41.69rem;
  1781. }
  1782. }
  1783. }
  1784. .myFont {
  1785. font-size: 12px;
  1786. color: white;
  1787. }
  1788. @media screen and (max-width: 300px) {
  1789. .report-header-img {
  1790. top: -1.5rem;
  1791. }
  1792. }
  1793. </style>