From ac6bd1e29f88bc6f3e90db443d26756b5f507b26 Mon Sep 17 00:00:00 2001 From: qsj <731458905@qq.com> Date: Mon, 18 Mar 2024 15:47:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Echart_face/index.less | 1654 ----------------- .../components/Echart_face/index.tsx | 10 +- .../face_report_one/face_report_one.less | 3 + src/pages/recording/recording.less | 4 + 4 files changed, 13 insertions(+), 1658 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.less b/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.less index fbe4ead..e69de29 100644 --- a/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.less +++ b/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.less @@ -1,1654 +0,0 @@ -.box { - width: 690rpx; - height: 320rpx; - margin: 28rpx auto; - background-color: #fff; - border-radius: 30rpx; - padding: 35rpx 25rpx 25rpx 35rpx; - box-sizing: border-box; - position: relative; - z-index: 0; -} -.box_background { - position: absolute; - top: 0; - left: 0; - width: 690rpx; - height: 320rpx; - border-radius: 30rpx; - background-color: #fff; - .power { - margin: 34rpx 0 28rpx 28rpx; - font-family: PingFang-SC; - font-weight: 500; - font-size: 18rpx; - color: #cccccc; - } - .full { - width: 24rpx; - height: 24rpx; - position: absolute; - top: 32rpx; - right: 26rpx; - } - .line { - margin: 0 0 6rpx 35rpx; - font-family: PingFang-SC; - font-size: 14rpx; - color: #cccccc; - display: flex; - position: relative; - height: 18rpx; - .bottom_line { - border-bottom: 1rpx #ccc dashed; - width: 550rpx; - margin-left: 20rpx; - position: absolute; - bottom: -6rpx; - right: 74rpx; - height: 4rpx; - color: #fff; - } - } - - .time { - position: absolute; - bottom: 22rpx; - right: 24rpx; - font-family: PingFang-SC; - font-size: 18rpx; - color: #cccccc; - } - .Seconds{ - position: absolute; - font-size: 18rpx; - color: #cccccc; - margin: 0 0 6rpx 65rpx; - font-family: PingFang-SC; - font-size: 14rpx; - color: #cccccc; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - position: relative; - height: 18rpx; - width: 550rpx; - background-color: red; - .Seconds_item{ - background-color: #bf8e49; - flex: 1; - } - } -} - -page { - background: #f8f8f8; - background: #f3f3f3; -} -.titlemain { - position: fixed; - z-index: 99; - width: 100%; - top: 0; - .logoicon { - width: 223rpx; - } - .title { - position: relative; - display: flex; - align-items: center; - justify-content: center; - } -} -.infobox1 { - background: #fff; - border-radius: 30rpx; - margin: 27rpx 30rpx 22rpx; - position: relative; - box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); - .img { - width: 690rpx; - height: 690rpx; - box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); - position: relative; - border-radius: 20rpx; - margin: auto; - .imgz { - border-radius: 20rpx; - width: 100%; - height: 100%; - overflow: hidden; - .video_tip { - position: absolute; - z-index: 99; - background: rgba(0, 0, 0, 0.5); - color: #fff; - font-size: 28rpx; - top: 50%; - left: 50%; - margin-top: -25rpx; - padding: 11rpx 34rpx; - font-weight: 500; - border-radius: 30rpx; - width: 500rpx; - transform: translateX(-50%); - text-align: center; - word-break: break-word; - box-sizing: border-box; - .icon { - width: 30rpx; - height: 30rpx; - margin-right: 17rpx; - } - } - .music { - width: 54rpx; - height: 54rpx; - background: rgba(255, 255, 255, 0.6); - border-radius: 50%; - position: absolute; - right: 20rpx; - top: 20rpx; - image { - width: 100%; - height: 100%; - } - } - } - .tipbox2 { - position: absolute; - z-index: 999999; - width: 500rpx; - bottom: -290rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 16rpx 0; - .jicon { - width: 26rpx; - position: absolute; - top: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 34rpx 24rpx 0 24rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 16rpx; - position: relative; - left: calc(500rpx - 36rpx - 154rpx); - } - } - .dottedLine { - border: 4rpx dashed #e2c6a3; - height: 100%; - position: absolute; - z-index: 999999; - border-radius: 20rpx; - right: 0; - left: 0; - } - .tipbox1 { - position: absolute; - z-index: 999999; - width: 480rpx; - bottom: -330rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 16rpx 0; - margin-left: 8rpx; - .jicon { - width: 26rpx; - position: absolute; - top: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 34rpx 2rpx 0 24rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } - } - .info1 { - height: 92rpx; - background: #fff; - border-radius: 20rpx; - position: relative; - .dottedLine { - border: 4rpx dashed #e2c6a3; - height: 100%; - position: absolute; - z-index: 999999; - border-radius: 20rpx; - right: 0; - left: 0; - } - .block { - width: 33%; - text-align: center; - .num { - font-size: 30rpx; - font-weight: 800; - color: #000000; - } - .color { - font-size: 30rpx; - font-weight: 800; - color: #000000; - } - .icon { - position: relative; - margin-left: 10rpx; - .num { - position: absolute; - color: #e8d3b0; - font-size: 22rpx; - font-weight: bold; - left: 50%; - margin-left: -8rpx; - top: 50%; - margin-top: -18rpx; - } - } - .dianliang1 { - background: linear-gradient(0deg, #efdcc2, #fff2df); - width: 10rpx; - height: 24rpx; - border-radius: 5rpx; - margin: 0 12rpx 0 0; - } - .dianliang2 { - background: #f8f8f8; - width: 10rpx; - height: 24rpx; - border-radius: 5rpx; - margin: 0 12rpx 0 0; - } - } - .border { - background: #dddddd; - width: 1rpx; - height: 50rpx; - } - } - .border_img { - position: absolute; - width: 700rpx; - z-index: 9999999; - bottom: -6rpx; - border: 6rpx dashed #e2c6a3; - border-radius: 20rpx; - padding: 4rpx; - left: -4rpx; - } - .tipbox4 { - position: absolute; - z-index: 999999; - width: 460rpx; - bottom: -260rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 16rpx 0; - .jicon { - width: 26rpx; - position: absolute; - top: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 34rpx 0 0 24rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } -} -.infobox1 .info1 .block .tip1, -.infobox1 .info1 .block .dang { - font-size: 26rpx; - font-weight: 500; - color: #000000; -} -.infobox2 { - position: relative; - border-radius: 20rpx; - height: 74rpx; - margin: 60rpx 20rpx 0; - .block { - width: 50%; - .icon { - width: 46rpx; - } - .name { - margin-left: 14rpx; - color: #202020; - font-size: 22rpx; - } - } - .border { - background: #696460; - width: 2rpx; - height: 16rpx; - } - .border_img4 { - height: 94rpx; - border: 6rpx dashed #e2c6a3; - position: absolute; - z-index: 99999; - left: -8rpx; - width: calc(100% + 8rpx); - border-radius: 20rpx; - } - .tipbox5 { - position: fixed; - z-index: 999999; - width: 460rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 24rpx 0; - left: 60rpx; - .jicon { - width: 26rpx; - position: absolute; - bottom: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 26rpx 0 0 34rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } -} -.action_box { - position: fixed; - bottom: 0; - width: 100%; - height: 138rpx; - background: #ffffff; - box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); - border-bottom: 15rpx solid #ffffff; - .line { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 2rpx; - height: 70rpx; - background: #dddddd; - } - .items { - flex: 1; - } - .start_img { - width: 36rpx; - height: 36rpx; - } - .disabled { - opacity: 0.5 !important; - } - .end_img { - width: 36rpx; - height: 36rpx; - } - .text { - font-size: 32rpx; - font-weight: bold; - color: #000000; - margin-left: 18rpx; - } - .start_test { - width: 100%; - padding: 0 30rpx; - .txt { - width: 100%; - height: 90rpx; - line-height: 90rpx; - background: #000000; - border-radius: 45rpx; - text-align: center; - font-size: 32rpx; - font-weight: bold; - color: #ffffff; - } - } -} -.infobox3 { - margin: 4rpx 0 0 0; - height: 162rpx; - position: relative; - border-radius: 20rpx; - .tipbox4 { - position: absolute; - z-index: 999999; - width: 460rpx; - bottom: -260rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 16rpx 0; - .jicon { - width: 26rpx; - position: absolute; - top: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 34rpx 0 0 24rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } - .dottedLine { - border: 4rpx dashed #e2c6a3; - height: 100%; - position: absolute; - z-index: 999999; - border-radius: 20rpx; - right: 0; - left: 0; - } - .left { - display: inline-block; - width: 134rpx; - background: #fff; - border-radius: 0 18rpx 18rpx 0; - margin: 0 22rpx 0 0; - overflow: hidden; - .img { - width: 78rpx; - height: 78rpx; - margin-top: 10rpx; - margin: 4rpx auto 0; - } - .tip { - color: #000; - font-size: 22rpx; - padding: 4rpx 0; - text-align: center; - } - .checked { - text-align: center; - } - } - .info1 { - display: inline-block; - white-space: nowrap; - background: #fff; - flex-direction: column; - height: 100%; - border-radius: 20rpx; - overflow: hidden; - box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); - .block1 { - .block1_1 { - height: 100%; - padding: 0 20rpx; - flex-direction: column; - .tip1 { - font-size: 26rpx; - font-weight: bold; - color: #000000; - } - .tip2 { - font-size: 24rpx; - font-weight: 500; - color: #666666; - padding-top: 3rpx; - } - } - } - .block2 { - display: inline-block; - height: 100%; - width: 0; - transition: all 0.3s; - .block2_info { - width: 140rpx; - text-align: center; - box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); - height: calc(140rpx - 10rpx); - border-radius: 20rpx; - align-items: flex-end; - padding: 0 0 10rpx 0; - display: inline-block; - position: relative; - overflow: hidden; - .block2_img { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - } - .block3_img { - -webkit-filter: grayscale(100%); - -moz-filter: grayscale(100%); - -ms-filter: grayscale(100%); - -o-filter: grayscale(100%); - filter: grayscale(100%); - filter: gray; - opacity: 0.5; - } - .block2_bg { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - opacity: 0.5; - } - .block2_info1 { - height: 100%; - position: relative; - z-index: 99; - background: transparent; - .block2_info1_tip1 { - color: #202020; - font-weight: bold; - font-size: 22rpx; - position: absolute; - bottom: 20rpx; - width: 100%; - text-align: center; - } - .block2_info1_tip2 { - color: #202020; - font-size: 16rpx; - position: absolute; - bottom: 0; - text-align: center; - width: 100%; - } - } - } - } - .icon { - width: 28rpx; - margin-top: 20rpx; - } - } - .info2 { - width: calc(100% - 130rpx - 20rpx); - background: #fff; - height: 162rpx; - border-radius: 20rpx; - box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); - .block1 { - padding: 0 16rpx; - } - } - .border_img2 { - width: calc(100% + 8rpx); - position: absolute; - z-index: 999999; - left: -8rpx; - } - .tipbox3 { - position: absolute; - z-index: 999999; - width: 460rpx; - bottom: -290rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 16rpx 0; - margin-left: 8rpx; - .jicon { - width: 26rpx; - position: absolute; - top: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 34rpx 0 0 24rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } -} -.infobox3 .info1 .block1, -.infobox3 .info2 .block1 { - flex-direction: column; - display: inline-block; - height: 100%; - text-align: center; -} -.infobox3 .info1 .tip1, -.infobox3 .info2 .tip1 { - color: #202020; - font-size: 22rpx; - font-weight: bold; -} -.infobox3 .info1 .tip2, -.infobox3 .info2 .tip2 { - color: #202020; - font-size: 22rpx; -} -.infobox3 .info1 .quan1, -.infobox3 .info2 .quan1 { - border-radius: 50%; - width: 30rpx; - height: 30rpx; - position: relative; - margin: 18rpx auto 0; - background: #fff; - box-sizing: border-box; - border: 4rpx solid #f1f1f1; -} -.infobox3 .info1 .quan1 .quan2, -.infobox3 .info2 .quan1 .quan2 { - position: absolute; - border-radius: 50%; - background: #000000; - width: 14rpx; - height: 14rpx; -} -.tipbox { - position: absolute; - z-index: 999999; - width: 100%; - bottom: 50rpx; - .tip1 { - color: #fefeff; - font-size: 36rpx; - text-align: center; - } - .tip_btn { - background: #e2c6a3; - border-radius: 32rpx; - width: 212rpx; - height: 66rpx; - line-height: 66rpx; - text-align: center; - margin: auto; - font-size: 30rpx; - font-weight: bold; - color: #ffffff; - margin-top: 54rpx; - } -} -.infobox4 { - height: 300rpx; - border-radius: 20rpx; - box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); - margin: 22rpx 20rpx; - background: #fff; - position: relative; - .dottedLine { - border: 4rpx dashed #e2c6a3; - height: 100%; - position: absolute; - z-index: 999999; - border-radius: 20rpx; - right: 0; - left: 0; - } - .border_img3 { - width: calc(100% + 16rpx); - position: absolute; - z-index: 999999; - top: -15rpx; - left: -8rpx; - } - .tipbox5 { - position: absolute; - z-index: 999999; - width: 460rpx; - top: -280rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 24rpx 0; - margin-left: 60rpx; - .jicon { - width: 26rpx; - position: absolute; - bottom: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 26rpx 0 0 34rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } -} -ec-canvas { - width: 100%; - height: 100%; -} -.popbox2 { - width: 670rpx; - height: 1102rpx; - background: #ffffff; - border-radius: 30rpx; - & > .title { - text-align: center; - padding: 49rpx 0 61rpx; - font-size: 36rpx; - font-weight: bold; - color: #030000; - line-height: 1; - } - & > .tipimg { - margin: 20rpx 28rpx 0; - } - & > .tipvideo { - margin: 0 auto; - width: 600rpx; - height: 600rpx; - } - & > .tiptext { - margin: 65rpx 0 63rpx; - padding: 0 48rpx 0 36rpx; - font-size: 28rpx; - font-weight: 500; - color: #000000; - min-height: 76rpx; - } - & > .popbox2btn { - & > .nextbtn { - text-align: center; - color: #fff; - width: 270rpx; - height: 90rpx; - line-height: 90rpx; - background: #000000; - border-radius: 45rpx; - font-size: 32rpx; - font-weight: bold; - margin: 0 auto; - box-sizing: border-box; - } - & > .prebtn { - text-align: center; - width: 270rpx; - height: 90rpx; - line-height: 90rpx; - border-radius: 45rpx; - font-weight: bold; - font-size: 32rpx; - color: #000000; - border: 2rpx solid #000000; - background: #ffffff; - margin: 0 auto; - box-sizing: border-box; - } - } - & > .icon { - position: absolute; - top: 0; - right: 0; - width: 90rpx; - height: 90rpx; - display: flex; - justify-content: center; - align-items: center; - & > image { - width: 24rpx; - height: 24rpx; - } - } -} -.popbox2btn { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 25rpx; -} -.quantityTipShow { - position: absolute; - top: -50rpx; - right: 0; - background: rgba(0, 0, 0, 0.3); - font-size: 22rpx; - color: #fff; - border-radius: 30rpx; - padding: 8rpx 0rpx; - width: 260rpx; - .sanjiao { - position: absolute; - left: 50%; - margin-left: -15rpx; - width: 30rpx; - height: 30rpx; - transform: rotate(45deg); - bottom: -15rpx; - background: rgba(0, 0, 0, 0.3); - } -} -.async_box { - padding: 0 50rpx; - .title { - font-weight: bold; - text-align: center; - font-size: 32rpx; - padding: 30rpx 0; - } - .jindubox { - background: #dddddd; - height: 30rpx; - border-radius: 30rpx; - overflow: hidden; - position: relative; - .jindu { - width: 80%; - background: #dfc3a2; - height: 100%; - border-radius: 30rpx; - } - .baifenbi { - position: absolute; - font-size: 22rpx; - right: 20rpx; - color: #999; - top: 0; - } - } - .tip1 { - font-size: 26rpx; - padding: 30rpx 0 40rpx; - } -} -.infobox5 { - margin: 24rpx 20rpx 0; - border-radius: 18rpx; - background: #fff; - height: 260rpx; - padding: 20rpx; - position: relative; - .icon { - position: absolute; - width: 24rpx; - height: 24rpx; - right: 26rpx; - top: 32rpx; - } - .title { - color: #ccc; - font-size: 18rpx; - height: 42rpx; - line-height: 42rpx; - } - .info1 { - font-size: 14rpx; - color: #ccc; - display: flex; - margin-top: 10rpx; - .left { - border-right: 1px solid #e3e3e3; - padding: 0 8rpx; - width: 16rpx; - height: 180rpx; - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - .numblock { - padding: 0rpx 0; - } - } - .right { - width: calc(100% - 20rpx - 100rpx); - height: 180rpx; - border-bottom: 1px solid #e3e3e3; - padding: 0 10rpx 4rpx 20rpx; - position: relative; - .block { - flex-direction: column; - justify-content: flex-end; - position: relative; - .num { - position: absolute; - bottom: -30rpx; - } - .block_b0 { - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b1 { - background: #ffcf55; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b2 { - background: #febb22; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b3 { - background: #ffad28; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b4 { - background: #ff8510; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b5 { - background: #f85803; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b6 { - background: #e02e13; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b7 { - background: #b40016; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - .block_b8 { - background: #750010; - border-radius: 10rpx; - width: 38rpx; - height: 18rpx; - margin: 4rpx 0 0; - } - } - .timetip { - position: absolute; - right: -40rpx; - bottom: -25rpx; - } - } - } - .tipbox5 { - position: absolute; - z-index: 999999; - width: 460rpx; - top: -280rpx; - background: linear-gradient(#e2c6a3, #c7a274); - border-radius: 20rpx; - padding: 0 0 24rpx 0; - margin-left: 60rpx; - .jicon { - width: 26rpx; - position: absolute; - bottom: -20rpx; - left: 54rpx; - } - .tip1 { - color: #fefeff; - font-size: 36rpx; - padding: 26rpx 0 0 34rpx; - } - .tip_btn { - background: #ffffff; - border-radius: 26rpx; - width: 154rpx; - height: 52rpx; - line-height: 52rpx; - text-align: center; - font-size: 30rpx; - font-weight: bold; - color: #c69962; - margin-top: 14rpx; - position: relative; - left: calc(460rpx - 22rpx - 154rpx); - } - } -} -.water_test { - margin: 0 auto; - box-sizing: border-box; - padding: 42rpx 48rpx; - width: 690rpx; - height: 292rpx; - background: #ffffff; - border-radius: 30rpx; - .test_step { - .step_block { - flex-direction: column; - } - .step_top { - position: relative; - .line { - position: absolute; - top: 50%; - right: -117rpx; - width: 97rpx; - height: 0; - border-top: 2rpx dashed #f1f1f1; - } - .drop { - width: 10rpx; - height: 10rpx; - background: #999999; - border-radius: 50%; - } - .step_num { - font-size: 24rpx; - font-weight: 500; - color: #666666; - margin-left: 14rpx; - } - } - .step_name { - font-size: 26rpx; - font-weight: bold; - color: #000000; - margin-left: 14rpx; - padding-top: 12rpx; - letter-spacing: 2rpx; - } - } - .test_txt { - font-size: 24rpx; - font-weight: 500; - color: #999999; - padding-top: 48rpx; - line-height: 36rpx; - letter-spacing: 2rpx; - } -} -.testing { - .testing_header { - .items { - flex: 1; - border-radius: 30rpx 30rpx 0rpx 0rpx; - padding: 25rpx 0 21rpx; - justify-content: space-evenly; - .finish_img { - width: 24rpx; - height: 24rpx; - border-radius: 50%; - } - .value { - font-size: 24rpx; - font-weight: 500; - color: #666666; - line-height: 1; - } - .name { - font-size: 26rpx; - font-weight: bold; - color: #000000; - line-height: 1; - } - } - } - .testing_content { - width: 100%; - height: 228rpx; - background: #ffffff; - border-radius: 0rpx 0rpx 30rpx 30rpx; - padding: 51rpx 30rpx 0 36rpx; - box-sizing: border-box; - .progress_box { - width: 100%; - height: 36rpx; - line-height: 36rpx; - .title { - font-size: 28rpx; - font-weight: bold; - color: #000000; - min-width: 200rpx; - margin-right: 60rpx; - letter-spacing: 2rpx; - } - } - .tips { - font-size: 24rpx; - font-weight: 500; - color: #999999; - margin-top: 45rpx; - line-height: 36rpx; - letter-spacing: 2rpx; - } - .progress_block { - flex: 1; - } - .finish_img { - width: 36rpx; - height: 36rpx; - margin-left: 49rpx; - } - } -} -.isquanpingclass { - position: fixed; - width: calc(100% - 100rpx); - padding: 20rpx 50rpx; - margin: 0; - z-index: 999; - top: 0; - left: 0; - right: 0; - height: 100vh; -} -.canvas { - position: fixed; - top: -9999999px; -} -.popbox1 { - width: 600rpx; - height: 360rpx; - border-radius: 28rpx; - flex-direction: column; - .tip1 { - font-size: 40rpx; - color: #000000; - text-align: center; - font-weight: 400; - margin-top: 28rpx; - } - .tip2 { - font-size: 32rpx; - color: #000000; - text-align: center; - font-weight: 400; - margin-top: 36rpx; - height: 110rpx; - } - .btnbox { - .btn1 { - font-size: 30rpx; - color: #000000; - text-align: center; - font-weight: 400; - width: 240rpx; - height: 100rpx; - line-height: 100rpx; - border: 2rpx solid rgba(0, 0, 0, 0.3); - border-radius: 28rpx; - } - .btn2 { - font-size: 30rpx; - color: #000000; - text-align: center; - font-weight: 400; - width: 240rpx; - height: 100rpx; - line-height: 100rpx; - margin-left: 40rpx; - background: #e2c5a3; - border-radius: 28rpx; - } - } -} -.van-tabs__scroll--line { - background: transparent !important; -} -image { - width: 100%; - height: 100%; - display: flex; -} -/* .color{ - color: #F1AB15; - } */ -.ellipsis2 { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; -} -.nodata { - color: #666666; - text-align: center; - margin-top: 50rpx; - font-size: 28rpx; -} -.MT30 { - margin-top: 30rpx; -} -.submitbtn { - position: absolute; - bottom: 100rpx; - width: 400rpx; - left: 50%; - margin-left: -200rpx; - .btn { - position: absolute; - top: 20rpx; - color: #fff; - font-weight: bold; - font-size: 32rpx; - text-align: center; - width: 100%; - bottom: 0; - } -} -.avatar-wrapper { - position: absolute; - bottom: 0; - width: 100%; - height: 100%; - left: 0; - right: 0; - top: 0; - z-index: 99; - opacity: 0; -} -.permeate_model_box { - position: relative; - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - padding: 52rpx 30rpx 38rpx 30rpx; - box-sizing: border-box; - .my_moisture_box { - width: 600rpx; - height: 600rpx; - margin: 0 auto; - } - .permeate_title { - font-size: 36rpx; - font-weight: bold; - color: #030000; - line-height: 1; - padding-bottom: 54rpx; - box-sizing: border-box; - } - .permeate_tips { - font-size: 28rpx; - font-weight: 500; - color: #030000; - line-height: 60rpx; - padding: 37rpx 0; - box-sizing: border-box; - .txt { - font-size: 26rpx; - font-weight: 500; - color: #666666; - margin-left: 12rpx; - } - } - .permeate_btn { - height: 90rpx; - line-height: 90rpx; - background: #000000; - border-radius: 45rpx; - font-size: 32rpx; - font-weight: bold; - color: #ffffff; - padding: 0 72rpx; - } - .close_box { - position: absolute; - top: 34rpx; - right: 29rpx; - padding: 50rpx; - } - .close_img { - position: absolute; - top: 0; - right: 0; - width: 24rpx; - height: 24rpx; - } -} -.gear_adjust { - padding: 2rpx 10rpx 40rpx 18rpx; - .title { - font-size: 28rpx; - font-weight: bold; - color: #000000; - } - .gear_box { - margin-top: 14rpx; - .slider_class { - height: 12rpx; - box-sizing: border-box; - flex: 1; - border-radius: 6rpx; - } - .gear { - padding: 20rpx 0; - } - .pos { - font-size: 26rpx; - font-weight: 500; - color: #666666; - min-width: 76rpx; - margin-right: 32rpx; - } - } -} - -.gear_adjustment { - box-sizing: border-box; - width: 690rpx; - height: 300rpx; - background: #ffffff; - border-radius: 30rpx; - padding: 30rpx; - margin: 30rpx auto 200rpx; - .gear_box { - .gear { - margin-bottom: 30rpx; - .pos { - font-size: 26rpx; - font-weight: 500; - color: #666666; - min-width: 76rpx; - margin-right: 32rpx; - } - .gear_button { - width: 500rpx; - height: 60rpx; - background: #f8f8f8; - border-radius: 30rpx; - justify-content: space-between; - font-size: 20rpx; - - .button_minus { - width: 90rpx; - height: 60rpx; - background: #e5e5e5; - border-radius: 30rpx 0rpx 0rpx 30rpx; - display: flex; - justify-content: center; - align-items: center; - .image { - width: 28rpx; - height: 28rpx; - } - } - - .button_plus { - width: 90rpx; - height: 60rpx; - background: #e5e5e5; - border-radius: 0rpx 30rpx 30rpx 0rpx; - display: flex; - justify-content: center; - align-items: center; - .image { - width: 28rpx; - height: 28rpx; - } - } - - .button_value { - display: flex; - justify-content: center; - align-items: center; - font-size: 24rpx; - width: 320rpx; - height: 60rpx; - line-height: 60rpx; - color: #666; - .number { - font-family: PingFang SC; - font-weight: 800; - font-size: 30rpx; - color: #000000; - margin-right: 4rpx; - } - } - } - } - } -} - -.level_box { - padding-left: 109rpx; - .level_num { - font-size: 16rpx; - font-weight: 500; - color: #cccccc; - } -} -.custom-button { - position: relative; - width: 32rpx; - height: 32rpx; - background: linear-gradient(90deg, #ffe9c7, #eecda1); - border: 4rpx solid #ffffff; - border-radius: 50%; - box-sizing: border-box; - .circle { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 12rpx; - height: 12rpx; - background: #ffffff; - border-radius: 50%; - } - .level { - position: absolute; - top: -30rpx; - left: 0; - width: 44rpx; - font-size: 20rpx; - font-weight: 500; - color: #bf8e49; - height: 28rpx; - } -} -.current-button { - background: #cccc; - .level { - color: #cccc; - } -} -.success_popup { - width: calc(100% - 110rpx); - box-sizing: border-box; - .popup_content { - width: 100%; - padding: 52rpx 0 60rpx; - box-sizing: border-box; - display: flex; - flex-direction: column; - align-items: center; - color: #030000; - .title { - font-size: 36rpx; - font-weight: bold; - } - .success_icon { - width: 120rpx; - height: 120rpx; - margin: 52rpx 0; - } - .tips { - font-size: 30rpx; - } - } - & > .infobox1 { - padding: 0rpx 0 35rpx; - .tip { - font-size: 36rpx; - font-weight: bold; - color: #030000; - text-align: center; - } - .tip1 { - text-align: center; - margin-top: 71rpx; - font-size: 30rpx; - color: #030000; - } - .tip2 { - color: #202020; - font-size: 40rpx; - text-align: center; - } - .btnbox { - margin-top: 71rpx; - padding: 0 3rpx 10rpx 15rpx; - display: flex; - align-items: center; - justify-content: space-between; - .btn1 { - background: #fff; - width: 212rpx; - height: 66rpx; - line-height: 66rpx; - text-align: center; - font-size: 30rpx; - color: #e2c6a3; - border-radius: 32rpx; - border: 2rpx solid #e2c6a3; - font-style: normal; - width: 270rpx; - height: 90rpx; - line-height: 90rpx; - background: #ffffff; - text-align: center; - border: 2rpx solid #000000; - border-radius: 45rpx; - font-size: 32rpx; - font-weight: bold; - color: #000000; - } - .btn2 { - width: 270rpx; - height: 90rpx; - line-height: 90rpx; - text-align: center; - background: #000000; - border-radius: 45rpx; - font-size: 32rpx; - font-weight: bold; - color: #ffffff; - font-style: normal; - width: 270rpx; - height: 90rpx; - line-height: 90rpx; - background: #000000; - text-align: center; - border-radius: 45rpx; - font-size: 32rpx; - font-weight: bold; - color: #ffffff; - } - } - } -} -.flex { - display: flex; -} -.aitems { - align-items: center; -} -.jcenter { - justify-content: center; -} -.sb { - justify-content: space-between; -} -.sa { - justify-content: space-around; -} -.wrap { - flex-wrap: wrap; -} diff --git a/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx b/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx index 8ca270a..7420ae2 100644 --- a/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx +++ b/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx @@ -54,7 +54,7 @@ const steps = 80; // 80个颜色 const colors = generateColorArray(startColor, endColor, steps); -const xList = [...new Array(61).fill(0).map((item, key) => key)]; +const xList = [...new Array(37).fill(0).map((item, key) => key)]; const seriesData = [ ...xList.map((item) => { return Math.random() * 80; @@ -80,7 +80,7 @@ const seriesData = [ grid: { // 让图表占满容器 top: "10rpx", - left: "35rpx", + left: "45rpx", right: "28rpx", bottom: "17rpx", }, @@ -88,9 +88,11 @@ const seriesData = [ type: "category", data: [...xList], axisLabel: { - interval: 9, + interval: 5, formatter: function (value, index) { - return value * 6 + 's'; + console.log(value,'查看'); + + return value * 10 + 's'; }, textStyle: { color: '#999999', // 文字颜色 diff --git a/src/pages/face_report_one/face_report_one.less b/src/pages/face_report_one/face_report_one.less index f0ea911..00bdd63 100644 --- a/src/pages/face_report_one/face_report_one.less +++ b/src/pages/face_report_one/face_report_one.less @@ -73,15 +73,18 @@ page { font-size: 32rpx; font-weight: bold; color: #000; + padding-left: 16rpx; // margin: 48rpx 0 34rpx; } .eacharts{ // background-color: red; // margin-top: 14px; + margin: auto; margin-bottom: 45rpx; /* margin: 52rpx 0rpx; */ width: 100%; height: 247rpx; + // margin-left: 131rpx; } .van-popup { border-radius: 30rpx; diff --git a/src/pages/recording/recording.less b/src/pages/recording/recording.less index 84197bb..e74e3e5 100644 --- a/src/pages/recording/recording.less +++ b/src/pages/recording/recording.less @@ -704,6 +704,10 @@ page { height: 100% !important; border-radius: 20rpx; } + .showImg:last-child{ + width: 40rpx !important; + height: 40rpx !important; + } } .info4 { position: relative; From 80e901bf0a9f59753dd0832993f6ed9ff2282cfb Mon Sep 17 00:00:00 2001 From: qsj <731458905@qq.com> Date: Tue, 19 Mar 2024 12:00:13 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8A=A4=E7=90=86?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/moduleIOT/pages/iotCarePlan/FR200.tsx | 625 +++++++++++++++++++++- src/pages/index/index.tsx | 4 + 2 files changed, 613 insertions(+), 16 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index fb50e3c..2ae19d7 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -2,6 +2,7 @@ import Taro from "@tarojs/taro"; import dayjs from "dayjs"; import classnames from "classnames"; import { debounce } from "lodash"; + // eslint-disable-next-line import/no-named-as-default import React, { Component, @@ -66,7 +67,482 @@ import { import commandMap from "@/utils/commandMap"; import { Popup } from "@antmjs/vantui"; import { fr200BleCommand } from "@/components/bluetoot/connection/fr200"; - +let datajson = { + ActiveModeItem: { + beganVideo: null, + combineData: [], + id: 154, + instrumentModel: "FR200", + instrumentType: 2, + isCabinMode: null, + isNew: 0, + lock: false, + lockCompanyTag: null, + lockCompanyTagArray: [], + lockWechatTag: null, + lockWechatTagArray: [], + modeBanner: "https://flossom.yq-h5.cn/image//statics/2024/03/14/v2-3b7111f4ac41cf4a139fba4f0cc54f21_720w_20240314175626A632.jpg", + modeClass: 1, + modeDesc: "基础班脸部", + modeName: "基础班脸部", + modeTime: "00:02:00", + modeTimeStr: "02:00", + modeType: "face", + modeVideo: "https://flossom.yq-h5.cn/image//statics/2024/03/14/497728332_nb2-1-16_20240314175725A633.mp4", + openSourceData: [], + pauseVideo: null, + preparationVideo: null, + serviceData: null, + status: 0, + }, + currentServiceData: { + createBy: null, + createTime: "2024-03-15 14:15:14", + id: 169, + modeId: 154, + remark: null, + serviceEndTime: "00:02:00", + serviceEndTimeStr: "02:00", + serviceStartTime: "00:00:00", + serviceStartTimeStr: "00:00", + startSource: "https://flossom.yq-h5.cn/image//statics/2024/03/14/v2-5363f74dedf1bb14baf92e09744e49c9_720w_20240314180057A635.gif", + startTimeArray: null, + stopSource: "https://flossom.yq-h5.cn/image//statics/2024/03/14/v2-0584e53b800e6ed28b4a228fedb8cb8d_720w_20240314180040A634.gif", + updateBy: null, + updateTime: null, + currentTime: "00:00", + }, + dataArray: [ + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 5, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "standby", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 211, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "standby", + }, { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 21, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 21, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "standby", + }, { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 251, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 321, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 271, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 219, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 271, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 421, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 251, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 231, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 211, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 261, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 261, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 721, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 121, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 321, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 221, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 216, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 212, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 211, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 721, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 121, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "working", + }, + ], + id: "2024-03-18 15:50:39", + instrumentId: 92, + instrumentName: "lzw的FR200测试", + jsonStatus: { + battery: 4, + commandType: "DeviceStatusSync", + deviceSyncStatusType: "onlySyncStatusToDevice", + gear: 1, + impedance: 21, + isCharging: false, + joulePerSecond: 1, + matrixBattery: 0, + nasolabialOrMandibularOutput: false, + partition: 0, + pointOutChangeSide: false, + totalWorkingMinutes: 2, + totalWorkingSeconds: 1, + workMode: "face", + workStatus: "standby", + }, + modeId: 154, + modeName: "基础班脸部", + workMode: "face", +} const deviceToolKitInstanceFR200 = new DeviceToolKitWM("FR200"); let deviceToolKitInstance = deviceToolKitInstanceFR200; @@ -227,7 +703,7 @@ class IotCarePlanFR200 extends Component { pointOutChangeSide: false, // 交叉输出点 impedance: 107, // 阻抗/能量等级:1档<200 200<2档<280 280<3档<360 后面以此类推每加一档+80抗阻 }; - + // 1档 等于0<200,2档等于200<280,3档等于280<360 /** FR200模式类型:名称 */ ModeTypeArray: string[] = [ "all", @@ -247,9 +723,9 @@ class IotCarePlanFR200 extends Component { this.getInstrumentClockSummary(); this.getInstrumentClockDetail(); } - componentDidMount() {} + componentDidMount() { } - componentWillUnmount() {} + componentWillUnmount() { } componentDidShow() { console.log("页面显示了"); @@ -583,7 +1059,7 @@ class IotCarePlanFR200 extends Component { this.onNursingTap(); // 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗 let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3; - this.showCountdownFun(downNum, () => {}); + this.showCountdownFun(downNum, () => { }); }, 500); return; @@ -609,7 +1085,7 @@ class IotCarePlanFR200 extends Component { }; // 绘制能量图 - drawProwerPicture() {} + drawProwerPicture() { } /** 切换光照 */ onSwitchChange = async () => { @@ -1480,6 +1956,7 @@ class IotCarePlanFR200 extends Component { /** 获取小程序本地缓存的历史记录 */ getFR200NursingHistory() { this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); + console.log(this.FR200NursingHistory, '获取本地数据++++++++++++++++++++++++++++++++++++++++++'); // 是否同步历史记录 let isSyncHistory = Taro.getStorageSync("isSyncHistory"); @@ -1586,33 +2063,149 @@ class IotCarePlanFR200 extends Component { } }; - todoPromise = () => { - return new Promise((resolve, reject) => { - setTimeout(() => { - resolve(); + // todoPromise = () => { + // return new Promise((resolve, reject) => { + // setTimeout(() => { + // resolve(); + // }); + // }); + // }; + // 脸部one + todoPromise = async () => { + const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); + console.log(nowFR200NursingHistory,'nowFR200NursingHistory'); + + // 护理脸部 + if (nowFR200NursingHistory.workMode === 'face') { + // 把working=工作中的状态数据筛选出来 + let filtered = nowFR200NursingHistory.dataArray.filter(item => item.workStatus === 'working'); + console.log(filtered,'filtered'); + + // 能量发数 + filtered = filtered.slice(0, 360); + // 脸部能量 + let faceEnergy = 0 + filtered.forEach(item => { + faceEnergy += item.joulePerSecond + }) + // 计算平均数 + // let sum = filtered.reduce((accumulator, currentValue) => accumulator + currentValue.impedance, 0); + // let average = sum / filtered.length; + + // 最大 + let max: any = Math.max(...filtered.map(item => item.impedance)); + max = this.determineTier(max) + // 最小 + let min: any = Math.min(...filtered.map(item => item.impedance)); + min = this.determineTier(min) + // 平均数最大等级处于2 + let average: any = max / 2 + average = this.determineTier(average) + + // 能量图里面的图谱每10秒为一个数组 + // 创建一个空数组用于存储分组后的结果 + // 创建一个空数组用于存储分组后的结果 + let groupedAa: any[] = []; + // 使用循环遍历数组 aa + for (let i = 0; i < filtered.length; i += 10) { + // 提取每组的三个对象 + let group = filtered.slice(i, i + 10); + + // 找到组中最大的 name 值 + let maxName = Math.max(...group.map(obj => obj.impedance)); + + // 计算并存储每组的平均数 + let average = this.determineTier(maxName / 2); + // let average = maxName / 2; + + // 将包含该组对象和平均数的对象添加到 groupedAa 数组中 + groupedAa.push({ objects: group, average: average }); + } + // 转换时间 + // 将分钟转换为两位数字的字符串 + // let minuteString = filtered.jsonStatus.totalWorkingMinutes.toString().padStart(2, '0'); + + // // 将秒转换为两位数字的字符串 + // let secondString = filtered.jsonStatus.totalWorkingMinutes.toString().padStart(2, '0'); + + // 拼接分钟和秒的字符串 + // let result = `${minuteString}:${secondString}`; + let result = `02:01`; + // let GearData = this.state.GearData; + // // 水分报告 + // let Allnum=0 + // GearData.forEach(e => { + // Allnum =+e.forehead + // }); + // // 向下取整 + // Allnum = Math.floor(Allnum / 3); + + let nursingData = { + nursingTime:result, + nursingData:JSON.stringify({ + faceEnergy, max, min, average, groupedAa + }) + } + + return nursingData + } else { + let GearData = this.state.GearData; + // 肌肤报告 + let Allnum=0 + GearData.forEach(e => { + Allnum =+e.forehead }); - }); - }; + // 向下取整 + Allnum = Math.floor(Allnum / 3); + let nursingData = { + + nursingData:JSON.stringify({ + Allnum,GearData + }) + } + return nursingData + } + + + } + // 计算挡位 + determineTier = (sun) => { + // 定义每档的范围 + const tiers = [0, 200, 280, 360, 440, 520, 600, 680, 760, 840]; + + // 遍历每一档的范围,找到 sun 所属的档 + for (let i = 0; i < tiers.length; i++) { + if (sun < tiers[i + 1]) { + return i + 1; + } + } + // 如果 sun 不在任何一档范围内,返回默认档或处理错误 + return '10'; + } /** 提交护理记录:完成护理后自动调用,会跳转页面 */ PostNursingLogClock = async (data: any = null, isJump = true) => { // todo 建议写一个Promise异步函数,用 await 执行,在提交前处理好数据 - return; + // return; let { currentDevice, ActiveModeItem } = this.state; let params = {}; if (data) { params = data; } else { + params = { instrumentId: currentDevice.id, instrumentName: currentDevice.name, modeId: ActiveModeItem.id, modeName: ActiveModeItem.modeName, nursingTime: s_to_hms(this.elapsedTime), + }; } - + let res1: any = await this.todoPromise() + console.log(res1, '查看返回数据'); + params = { ...params, ...res1 } let res: any = await InstrumentInfo.apiNursingLog.addLog(params); console.log("PostNursingLogClock", res); if (res.data.code === 200) { @@ -2078,9 +2671,9 @@ class IotCarePlanFR200 extends Component { deviceInfo={currentDevice} close={this.connectionClose} isDisconnect={!isConnectionBlutoot} - offlineChange={() => {}} + offlineChange={() => { }} pairingChange={this.pairingChange} - upgradeFun={() => {}} + upgradeFun={() => { }} /> )} diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 88303c3..5beac18 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -844,6 +844,10 @@ class Index extends Component { // 仅开发者工具调试使用 const platform = Taro.getSystemInfoSync().platform; + setStorageSync("instrument_detail", item); + this.setState({ connectInstrument: item }); + setTimeout(() => this.goIot()); + return; if (platform === "devtools") { setStorageSync("instrument_detail", item); this.setState({ connectInstrument: item }); From 677deec92b31cf1710af2361b02b26f151747360 Mon Sep 17 00:00:00 2001 From: qsj <731458905@qq.com> Date: Tue, 19 Mar 2024 14:03:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/moduleIOT/pages/iotCarePlan/FR200.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index 2ae19d7..672d120 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -2141,7 +2141,7 @@ class IotCarePlanFR200 extends Component { // Allnum = Math.floor(Allnum / 3); let nursingData = { - nursingTime:result, + // nursingTime:result, nursingData:JSON.stringify({ faceEnergy, max, min, average, groupedAa }) @@ -2158,7 +2158,6 @@ class IotCarePlanFR200 extends Component { // 向下取整 Allnum = Math.floor(Allnum / 3); let nursingData = { - nursingData:JSON.stringify({ Allnum,GearData }) @@ -2168,6 +2167,7 @@ class IotCarePlanFR200 extends Component { } + // 计算挡位 determineTier = (sun) => { // 定义每档的范围 From 9dfed2e66db845aabfcac2fc3ae2bf8e32c0cf37 Mon Sep 17 00:00:00 2001 From: qsj <731458905@qq.com> Date: Wed, 20 Mar 2024 10:33:59 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=84=B8=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/moduleIOT/pages/iotCarePlan/FR200.tsx | 80 ++++++++++--------- .../components/Echart_face/index.tsx | 66 ++++++++------- src/pages/index/index.tsx | 8 +- .../face_report_one/face_report_one.less | 23 +++++- .../pages/face_report_one/face_report_one.tsx | 80 ++++++++++++++----- src/recoding/pages/recording/recording.tsx | 36 +++++---- 6 files changed, 183 insertions(+), 110 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index 8ba0614..224e35f 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -2078,14 +2078,10 @@ class IotCarePlanFR200 extends Component { // 脸部one todoPromise = async () => { const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); - console.log(nowFR200NursingHistory,'nowFR200NursingHistory'); - // 护理脸部 if (nowFR200NursingHistory.workMode === 'face') { // 把working=工作中的状态数据筛选出来 let filtered = nowFR200NursingHistory.dataArray.filter(item => item.workStatus === 'working'); - console.log(filtered,'filtered'); - // 能量发数 filtered = filtered.slice(0, 360); // 脸部能量 @@ -2120,51 +2116,36 @@ class IotCarePlanFR200 extends Component { let maxName = Math.max(...group.map(obj => obj.impedance)); // 计算并存储每组的平均数 - let average = this.determineTier(maxName / 2); + let average:any = this.determineTier(maxName / 2); // let average = maxName / 2; - + if(average >=1) { + average=average-1 + average=average *10 + } // 将包含该组对象和平均数的对象添加到 groupedAa 数组中 - groupedAa.push({ objects: group, average: average }); + groupedAa.push(average); } - // 转换时间 - // 将分钟转换为两位数字的字符串 - // let minuteString = filtered.jsonStatus.totalWorkingMinutes.toString().padStart(2, '0'); - - // // 将秒转换为两位数字的字符串 - // let secondString = filtered.jsonStatus.totalWorkingMinutes.toString().padStart(2, '0'); - - // 拼接分钟和秒的字符串 - // let result = `${minuteString}:${secondString}`; - let result = `02:01`; - // let GearData = this.state.GearData; - // // 水分报告 - // let Allnum=0 - // GearData.forEach(e => { - // Allnum =+e.forehead - // }); - // // 向下取整 - // Allnum = Math.floor(Allnum / 3); - + let nursingData = { // nursingTime:result, - nursingData:JSON.stringify({ - faceEnergy, max, min, average, groupedAa + nursingData: JSON.stringify({ + faceEnergy, max, min, average, groupedAa, filtered: filtered.length, workMode: nowFR200NursingHistory.workMode }) } - + return nursingData } else { - let GearData = this.state.GearData; + let GearData = this.state.GearData; // 肌肤报告 - let Allnum=0 + let Allnum = 0 GearData.forEach(e => { - Allnum =+e.forehead + Allnum = +e.forehead }); // 向下取整 Allnum = Math.floor(Allnum / 3); let nursingData = { - nursingData:JSON.stringify({ - Allnum,GearData + nursingData: JSON.stringify({ + Allnum, GearData }) } return nursingData @@ -2210,7 +2191,7 @@ class IotCarePlanFR200 extends Component { } let res1: any = await this.todoPromise() console.log(res1, '查看返回数据'); - params = { ...params, ...res1 } + params = { ...params, ...res1 } let res: any = await InstrumentInfo.apiNursingLog.addLog(params); console.log("PostNursingLogClock", res); if (res.data.code === 200) { @@ -2230,7 +2211,9 @@ class IotCarePlanFR200 extends Component { this.setState({ isShowNursingSuccess: false, }); - this.goFaceReport(); // 跳转 + + + this.goFaceReport(res1, ActiveModeItem.id); // 跳转 }, 2000); } } @@ -2386,10 +2369,31 @@ class IotCarePlanFR200 extends Component { }; /** 完成护理提交:跳转护理报告页 */ - goFaceReport = () => { + goFaceReport = (data, id) => { + let nursingData = JSON.parse(data.nursingData) // 跳转前置空定时器,防止重复提交 if (currentTimeTimer) clearInterval(currentTimeTimer); - go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); + if (['face', 'eyes', 'nasolabialFold', 'mandibularLine', 'headLiftingPro'].includes(nursingData.workMode)) { + let obj = { + modeName: nursingData.modeName, + data: nursingData + } + let report = true; + go( + "/recoding/pages/face_report_one/face_report_one?id=" + + id + + "&report=" + + report + "&obj=" + + JSON.stringify(obj) + ); + + } else if ('moistureTest' === nursingData.workMode) { + console.log('水分测试'); + + } else { + go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); + } + }; // 完成配对 diff --git a/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx b/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx index 145ea9b..189ff3a 100644 --- a/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx +++ b/src/moduleIOT/pages/iotCarePlan/components/Echart_face/index.tsx @@ -9,13 +9,32 @@ import echarts from "@/utils/echarts.min.js"; import "./index.less"; interface Props { - Electricity: any; - matrixElectricity: any; - facialMaskConnectStatus: any; + EchartsData:any } -function Index() { - +function Index({ + EchartsData + }:Props) { + let type =0 + switch(EchartsData.modeName) { + case '基础班脸部': + type=37 + break; + case '基础版眼部': + type=25 + break; + case '法令纹Pro': + type=25 + break; + case '下颌线Pro': + type=19 + break; + case '抬头纹Pro': + type=13 + break; + default: + + } const echartsRef = useRef(null); function generateColorArray(startColor, endColor, steps) { var startRGB = hexToRgb(startColor); @@ -50,31 +69,20 @@ function Index() { const startColor = "#FFFF00"; // 黄色 const endColor = "#FF0000"; // 红色 - const steps = 80; // 80个颜色 + const steps = 81; // 80个颜色 const colors = generateColorArray(startColor, endColor, steps); -const xList = [...new Array(37).fill(0).map((item, key) => key)]; -const seriesData = [ - ...xList.map((item) => { - return Math.random() * 80; - }), -]; - // let seriesData=[ - // 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3, - // 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3, - // 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,8,5,1,2,3, - // 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3 - // ] - // console.log(seriesData,'seriesData',xList); +const xList = [...new Array(type).fill(0).map((item, key) => key)]; +let seriesData:any =[] +seriesData = EchartsData?.data?.groupedAa +// const xList = [...new Array(37).fill(0).map((item, key) => key)]; +// const seriesData = [ +// ...xList.map((item) => { +// return Math.random() * 80; +// }), +// ]; + const option: EChartOption ={ grid: { @@ -90,8 +98,6 @@ const seriesData = [ axisLabel: { interval: 5, formatter: function (value, index) { - console.log(value,'查看'); - return value * 10 + 's'; }, textStyle: { @@ -170,7 +176,7 @@ const seriesData = [ // isPage={false} // style自定义设置echarts宽高 // style={{ width: "100%", height: "100%" }} - style={{ width: "630rpx", height: "260rpx" }} + style={{ width: "670rpx", height: "260rpx" }} /> {/* diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index e8a47d1..dc99f5e 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -842,10 +842,10 @@ class Index extends Component { goNursing = (item) => { // 仅开发者工具调试使用 const platform = Taro.getSystemInfoSync().platform; - setStorageSync("instrument_detail", item); - this.setState({ connectInstrument: item }); - setTimeout(() => this.goIot()); - return; + // setStorageSync("instrument_detail", item); + // this.setState({ connectInstrument: item }); + // setTimeout(() => this.goIot()); + // return; if (platform === "devtools") { setStorageSync("instrument_detail", item); this.setState({ connectInstrument: item }); diff --git a/src/recoding/pages/face_report_one/face_report_one.less b/src/recoding/pages/face_report_one/face_report_one.less index 00bdd63..a96cb79 100644 --- a/src/recoding/pages/face_report_one/face_report_one.less +++ b/src/recoding/pages/face_report_one/face_report_one.less @@ -23,7 +23,27 @@ page { margin-bottom: 20rpx; margin-top: 32rpx; } - +.itemStyel{ + display: inline-block; + font-size: 15rpx; + position: absolute; + top: 0rpx; + left: 94rpx; +} +.itemStyelone{ + display: inline-block; + font-size: 15rpx; + position: absolute; + top: 0rpx; + left: 142rpx; +} +.itemStyeltwo{ + display: inline-block; + font-size: 15rpx; + position: absolute; + top: 0rpx; + left: 278rpx; +} .statistic_item { flex: 1; border-right: 1rpx solid #dddddd; @@ -323,6 +343,7 @@ page { margin: 12rpx 0rpx; color: #181818; font-weight: 700; + position: relative; } // .desc:last-child { diff --git a/src/recoding/pages/face_report_one/face_report_one.tsx b/src/recoding/pages/face_report_one/face_report_one.tsx index 94c211c..6f41fa4 100644 --- a/src/recoding/pages/face_report_one/face_report_one.tsx +++ b/src/recoding/pages/face_report_one/face_report_one.tsx @@ -17,6 +17,7 @@ import { InstrumentInfo } from "@/utils/Interface"; // 引入ecahrts图表 // import EchartsForm from '@/moduleIOT/pages/iotCarePlan/components/Echart_face' import EchartsForm from '../../../moduleIOT/pages/iotCarePlan/components/Echart_face' +import Echarts1 from '../../../moduleIOT/pages/iotCarePlan/components/Echart' /** 自定义组件 **/ @@ -26,13 +27,19 @@ export default class Index extends Component { constructor(props) { super(props); this.state = { - face_Tyep: '基础脸部', + EchartsData:{}, reportShow: true, name: "template模板页", statistics: {}, recordList: [], + modeImage: require("@/img/face-report/face.png"), recordData: { - modeImage: require("@/img/face-report/face.png") + modeName: '基础班脸部', + filtered:111, + faceEnergy:222, + average:2222, + max:33, + min:7 }, year: new Date().getFullYear(), show: false, @@ -73,7 +80,7 @@ export default class Index extends Component { data["instrumentId"] = id; } let res = await InstrumentInfo.apiNursingLog.getStatistics(data); - + if (res.data.code === 200) { this.setState({ statistics: res.data.data }); } @@ -246,8 +253,8 @@ export default class Index extends Component { const id = searchParams.get("id"); const recordId = searchParams.get("recordId"); this.getStatistics(id); - this.getRecord(id, recordId); - console.log(recordId); + // this.getRecord(id, recordId); + // console.log(recordId); } getTime(time) { const hour = time.slice(0, 2); @@ -260,20 +267,52 @@ export default class Index extends Component { return minute + "分" + second + "秒"; } } - async onLoad(options) { - console.log(options, '查看传过来的参数'); - + onLoad(options) { + let Bool = JSON.parse(options?.report) if (!Bool) { this.setState({ reportShow: Bool }) } - + this.init(options) this.getRouteId(); - this.getClockStatistics() + // this.getClockStatistics() + } + init(options){ + let obj =JSON.parse(options.obj) + let recordData =this.state.recordData + let modeImage =this.state.modeImage + + switch(obj.modeName) { + case '基础班脸部': + modeImage =require("@/img/face-report/face.png") + break; + case '基础版眼部': + modeImage =require("@/img/face-report/eye.png") + break; + case '法令纹Pro': + modeImage =require("@/img/face-report/nasolabial_Pro.png") + break; + case '下颌线Pro': + modeImage =require("@/img/face-report/Mandibular_Pro.png") + break; + case '抬头纹Pro': + modeImage =require("@/img/face-report/Head_lift_Pro.png") + break; + default: + + } + recordData ={ + ...obj, + ...obj.data + } + this.setState({recordData,modeImage,EchartsData:{...obj}}) + + console.log(obj,'查看'); + + } - componentDidShow() { } componentDidHide() { } @@ -285,7 +324,7 @@ export default class Index extends Component { }; render() { - let { name, statistics, recordList, recordData, show, clockStatistics, punchInInfo, monthTime, reportShow, face_Tyep } = this.state; + let { name, statistics, modeImage, recordData, show, clockStatistics, punchInInfo, monthTime, reportShow,EchartsData } = this.state; return ( @@ -310,24 +349,24 @@ export default class Index extends Component { - {face_Tyep} + {recordData.modeName} - 能量发数:{recordData.modeName} + 能量发数{recordData.modeName === '下颌线Pro'?[1]:null}  :{recordData.filtered}发 - 脸部能量:≈{recordData.nursingTime} + 脸部能量{recordData.modeName === '下颌线Pro'?[2]:null}  :≈{recordData.faceEnergy}焦耳 - 平均能量等级:{recordData.nursingTime} + 平均能量等级  [3]:{recordData.average} - 最大等级:{recordData.nursingTime} + 最大等级  [4]:{recordData.max}级 最小等级  [5]:{recordData.min}级 @@ -335,9 +374,10 @@ export default class Index extends Component { - 能量等级图谱-{face_Tyep} + 能量等级图谱-{recordData.modeName} - + + {/* */} diff --git a/src/recoding/pages/recording/recording.tsx b/src/recoding/pages/recording/recording.tsx index 246bb8c..375d6fc 100644 --- a/src/recoding/pages/recording/recording.tsx +++ b/src/recoding/pages/recording/recording.tsx @@ -290,34 +290,36 @@ export default class Recording extends Component { // 跳转到护理报告 toReport(id, recordId, item) { console.log(item, "查看类型", item.jumpType); - item.jumpType = 1; - switch (item.jumpType) { - case 1: - this.One(item); - break; - case 2: - this.two(item); - break; - case 6: - this.three(item); - break; - default: - this.AllDevice(item); + if ([1,2,3,4,5].includes(item.jumpType)) { + this.One(item); + } else if (item.jumpType === 0) { + this.two(item); + } else if (item.jumpType === 6) { + this.three(item); + } else { + this.AllDevice(item); } + + // let report =false // go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId+ "&report=" + report ); } // 打开第一种类型 One = async (item) => { - console.log("打开第一种类型", item); + let report = false; + let nursingData=JSON.parse(item.nursingData) + let obj ={ + modeName:item.modeName, + data:nursingData + } + console.log("打开第一种类型", item,obj); go( "/recoding/pages/face_report_one/face_report_one?id=" + item.id + - "&recordId=" + - item.recordId + "&report=" + - report + report+ "&obj=" + + JSON.stringify(obj) ); }; // 打开第二种类型 From 07d684ff5f364d910a2b9bd7ed1035f9336c2d1a Mon Sep 17 00:00:00 2001 From: rongweikang <1174906669@qq.com> Date: Wed, 20 Mar 2024 10:37:51 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/moduleIOT/pages/iotCarePlan/FR200.tsx | 27 ++++++++++++++----- .../moisture_test_report.tsx | 17 ++++++------ src/recoding/pages/recording/recording.tsx | 10 ++++--- 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index 19c376d..4957d35 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -242,7 +242,7 @@ class IotCarePlanFR200 extends Component { /** 基础版:脸部/眼部 */ BaseModeType: string[] = ["face", "eyes"]; - async onLoad() { + async onLoad(option) { // 保持屏幕常亮 Taro.setKeepScreenOn({ keepScreenOn: true, @@ -250,10 +250,13 @@ class IotCarePlanFR200 extends Component { this.initData(); this.getInstrumentClockSummary(); this.getInstrumentClockDetail(); + if (option.modeId) { + this.setState({ activeModeID: option.modeId }) + } } - componentDidMount() {} + componentDidMount() { } - componentWillUnmount() {} + componentWillUnmount() { } componentDidShow() { console.log("页面显示了"); @@ -389,6 +392,16 @@ class IotCarePlanFR200 extends Component { ModeList: res.data.data, }); + if (this.state.activeModeID != '') { + this.state.ModeList.map(item => { + if (item.id === this.state.activeModeID) { + this.setState({ + ActiveModeItem: item + }); + } + }) + } + setTimeout(() => { this.modeCurrentFun(res.data.data[0]); }, 100); @@ -587,7 +600,7 @@ class IotCarePlanFR200 extends Component { this.onNursingTap(); // 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗 let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3; - this.showCountdownFun(downNum, () => {}); + this.showCountdownFun(downNum, () => { }); }, 500); return; @@ -613,7 +626,7 @@ class IotCarePlanFR200 extends Component { }; // 绘制能量图 - drawProwerPicture() {} + drawProwerPicture() { } /** 切换光照 */ onSwitchChange = async () => { @@ -2083,9 +2096,9 @@ class IotCarePlanFR200 extends Component { deviceInfo={currentDevice} close={this.connectionClose} isDisconnect={!isConnectionBlutoot} - offlineChange={() => {}} + offlineChange={() => { }} pairingChange={this.pairingChange} - upgradeFun={() => {}} + upgradeFun={() => { }} /> )} diff --git a/src/recoding/pages/moisture_test_report/moisture_test_report.tsx b/src/recoding/pages/moisture_test_report/moisture_test_report.tsx index c23639c..5203dd7 100644 --- a/src/recoding/pages/moisture_test_report/moisture_test_report.tsx +++ b/src/recoding/pages/moisture_test_report/moisture_test_report.tsx @@ -38,7 +38,8 @@ class MoistureTestReport extends Component { xinde: '', imglist: [], id: 0, - show: false + show: false, + modeId: 0 }; } @@ -71,20 +72,18 @@ class MoistureTestReport extends Component { reportData.shuifenGear.rightFace = gear } }) - this.setState({ reportData }); - setTimeout(() => { - console.log(this.state.reportData); - - }, 50); + this.setState({ reportData, modeId: option.modeId }); } async initData() { } toIndex() { Taro.reLaunch({ url: "/pages/index/index" }); } - + toNursing() { + go(`/moduleIOT/pages/iotCarePlan/FR200?modeId=${this.state.modeId}`) + } render() { - let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show } = this.state + let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show, modeId } = this.state const getStatusData = (level) => { var bgCssData = { @@ -288,7 +287,7 @@ class MoistureTestReport extends Component { - 继续护理 + 继续护理 主页 diff --git a/src/recoding/pages/recording/recording.tsx b/src/recoding/pages/recording/recording.tsx index 3da46f5..676d707 100644 --- a/src/recoding/pages/recording/recording.tsx +++ b/src/recoding/pages/recording/recording.tsx @@ -1,4 +1,4 @@ -import Taro from "@tarojs/taro"; +import Taro, { setStorageSync } from "@tarojs/taro"; import classnames from "classnames"; import { Component, PropsWithChildren, useEffect, useState } from "react"; @@ -289,7 +289,11 @@ export default class Recording extends Component { }; // 跳转到护理报告 toReport(id, recordId, item) { - console.log(item, "查看类型", item.jumpType); + this.state.bindingInstrumentList.map(instrument => { + if (instrument.id == id) { + setStorageSync("instrument_detail", instrument); + } + }) switch (item.jumpType) { case 1: this.One(item); @@ -325,7 +329,7 @@ export default class Recording extends Component { }; // 打开第三种类型 three = async (item) => { - go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}`); + go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}&modeId=${item.modeId}`); }; // 打开其他类型 AllDevice = async (item) => {