柒零 hace 1 año
padre
commit
24b92a8583

BIN
static/images/report/hotel&room.png


BIN
static/images/report/left_background_c4_new.png


+ 17 - 5
subpages/data/data.js

@@ -251,7 +251,7 @@ function setChartOutOfBedOption(chart, data1 = [], data2 = [],) {
 			},
 		],
 		grid: {
-			top: '10rpx',
+			top: '40rpx',
 			left: 0,
 			right: '20rpx',
 			bottom: 0,
@@ -371,7 +371,7 @@ function setBodyMovementsOption(chart, data1 = [], data2 = [],) {
 			},
 		],
 		grid: {
-			top: '10rpx',
+			top: '40rpx',
 			left: 0,
 			right: '20rpx',
 			bottom: 0,
@@ -742,7 +742,7 @@ function setSnoringOption(chart, data1 = [], data2 = [],) {
 			},
 		],
 		grid: {
-			top: '10rpx',
+			top: '40rpx',
 			left: 0,
 			right: '20rpx',
 			bottom: 0,
@@ -858,7 +858,7 @@ function setApneaOption(chart, data1 = [], data2 = [],) {
 			},
 		],
 		grid: {
-			top: '10rpx',
+			top: '40rpx',
 			left: 0,
 			right: '20rpx',
 			bottom: 0,
@@ -2063,6 +2063,7 @@ Page({
 		status: "",
 
 		isShow: false,
+		isToDay:false,
 
 		year: addZero(new Date().getFullYear()),
 		month: addZero(new Date().getMonth()),
@@ -4428,7 +4429,18 @@ Page({
 		var that = this;
 		if (options.rpids) {
 			that.setData({
-				reportId: options.rpids
+				reportId: options.rpids,
+				isToDay: false
+			})
+			wx.setNavigationBarTitle({
+				title: "历史睡眠报告"
+			})
+		} else {
+			wx.setNavigationBarTitle({
+				title: "今日睡眠报告"
+			})
+			that.setData({
+				isToDay: true
 			})
 		}
 		// var that = this;

+ 58 - 37
subpages/data/data.wxml

@@ -5,11 +5,16 @@
 	  <text>{{reportDate}}</text>
 	  <text>用户号:12345| SN:{{rsn}}</text>
 	</view> -->
-
+	<!-- <picker mode="date" bindchange="bindDateChange" class="picker" style="width: 40%;">  
+		    <view class="picker-placeholder">{{reportDate}}</view>  
+		  </picker>  
+		  <picker mode="time" bindchange="bindTimeChange" class="picker" style="width: 40%; margin-left: 4%;">  
+		    <view class="picker-placeholder">{{rgobed_time}}~{{routbed_time}}</view>  
+		  </picker>  -->
 	<view wx:if="{{isLoading}}" class="loading-container">
 		<text class="loading-text">数据正在推送,请稍候...</text>
 	</view>
-	<view class="picker-row">
+	<!-- <view class="picker-row">
 
 		<view class="picker-row_view">
 			<picker mode="selector" range-key="pos" range="{{sns}}" value="{{selectedIndex}}"
@@ -23,12 +28,7 @@
 				</view>
 			</picker>
 		</view>
-		<!-- <picker mode="date" bindchange="bindDateChange" class="picker" style="width: 40%;">  
-	    <view class="picker-placeholder">{{reportDate}}</view>  
-	  </picker>  
-	  <picker mode="time" bindchange="bindTimeChange" class="picker" style="width: 40%; margin-left: 4%;">  
-	    <view class="picker-placeholder">{{rgobed_time}}~{{routbed_time}}</view>  
-	  </picker>  -->
+	
 		<view class="picker_out">
 			<picker style="margin-left:0;" range="{{arrayFourth}}" value="{{valueFourth}}" range-key="text"
 				mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange">
@@ -45,8 +45,18 @@
 				</view>
 			</picker>
 		</view>
-	</view>
+	</view> -->
 
+	<view class="top-bar-box">
+		<image class="data-image_c00_0" src="/subpages/images/ic_bg_room.png" mode="aspectFit"></image>
+		<text
+			class="data-text_c00_0">{{hotelname?(hotelname+'·'):''}}{{roomname?(roomname+'·'):''}}{{sns[selectedIndex].pos}}床</text>
+		<view class="top-bar-line"></view>
+		<image class="top-bar-icon" src="/subpages/images/ic_bg_date.png" mode="aspectFit"></image>
+		<text wx:if="{{!isToDay}}" class="top-bar-date">{{reportDate?reportDate:'无数据'}}</text>
+		<text class="top-bar-time">{{rgobed_time?rgobed_time:'无数据'}}~{{routbed_time?routbed_time:'无数据'}}</text>
+		<view wx:if="{{isToDay}}" style="flex: 0.45;"></view>
+	</view>
 
 
 
@@ -67,7 +77,7 @@
 				<text class="data-text_c00" bindtap="tvEntityIdChange" wx:else>推送电视 </text>
 			</view> -->
 		<!-- </view> -->
-		<view class="separator_c00"></view>
+		<!-- <view class="separator_c00"></view> -->
 
 		<view class="circle-container-yh">
 			<view class="text-container-yh left-text-yh">
@@ -212,7 +222,7 @@
 			<view class="text-container_c4_top_left">
 				<text class="text_c4_left_top">温馨提醒</text>
 			</view>
-			<image class="image_c4" src="/static/images/report/left_background_c4_new.png" />
+			<image class="image_c4" src="/subpages/images/left_background_c4_new.png" />
 			<view class="text-container_c4">
 				<text class="text_c4">本次睡眠,睡眠报告得分评比描述:<text class="text_c4_1">{{rscore_desc}}</text></text>
 			</view>
@@ -304,21 +314,7 @@
 			</view>
 		</view>
 
-		<view class="title-row_c6">
-			<view class="title-left_c6">
-				<image class="title-image_c6" src="/static/images/report/anwendu_new.png" mode="aspectFit"></image>
-				<text class="title-text_c6">安稳度</text>
-				<image class="header-image_comma" src="/static/images/report/comma_new.png" mode="aspectFit"
-					data-index="4" data-subIndex="1" bindtap="toWarmReminder"></image>
-			</view>
-			<view class="title-right_c6">
-				<!-- <text class="title-text-right_c6">右侧文本</text>  -->
-				<text class="title-text-right_c6_1">入睡时长</text>
-				<text class="title-text-right_c6">{{rrs_duration.formattedHours}}<text
-						class="text-line_c31-units">小时</text>{{rrs_duration.formattedMinutes}}<text
-						class="text-line_c31-units">分钟</text></text>
-			</view>
-		</view>
+
 
 		<!-- <view class="circle-container-yh">
 	 		  <view class="text-container-yh left-text-yh">  
@@ -363,18 +359,43 @@
 	<view class="container_6">
 		<view class="title-row_c6">
 			<view class="title-left_c6">
-				<image class="title-image_c6" src="/static/images/report/lichuang_cishu_new.png" mode="aspectFit">
-				</image>
-				<text class="title-text_c6">离床次数</text>
+				<image class="title-image_c6" src="/static/images/report/anwendu_new.png" mode="aspectFit"></image>
+				<text class="title-text_c6">安稳度</text>
 				<image class="header-image_comma" src="/static/images/report/comma_new.png" mode="aspectFit"
-					data-index="4" data-subIndex="2" bindtap="toWarmReminder"></image>
+					data-index="4" data-subIndex="1" bindtap="toWarmReminder"></image>
+			</view>
+			<!-- <view class="title-right_c6">
+				<text class="title-text-right_c6_1">入睡时长</text>
+				<text class="title-text-right_c6">{{rrs_duration.formattedHours}}<text
+						class="text-line_c31-units">小时</text>{{rrs_duration.formattedMinutes}}<text
+						class="text-line_c31-units">分钟</text></text>
+			</view> -->
+		</view>
+		<view class="separator_c00"></view>
+		<view class="title-row_c6">
+			<view class="title-left_c6">
+				<text class="title-text-right_c6_1" style="font-size: 28rpx;">入睡时长</text>
+			</view>
+			<view class="title-right_c6">
+				<text class="title-text-right_c6">{{rrs_duration.formattedHours}}<text
+						class="text-line_c31-units">小时</text>{{rrs_duration.formattedMinutes}}<text
+						class="text-line_c31-units">分钟</text></text>
+			</view>
+		</view>
+		<view class="title-row_c6">
+			<view class="title-left_c6">
+				<!-- <image class="title-image_c6" src="/static/images/report/lichuang_cishu_new.png" mode="aspectFit">
+				</image> -->
+				<text class="title-text_c6" style="font-size: 28rpx;">离床次数</text>
+				<!-- <image class="header-image_comma" src="/static/images/report/comma_new.png" mode="aspectFit"
+					data-index="4" data-subIndex="2" bindtap="toWarmReminder"></image> -->
 			</view>
 			<view class="title-right_c6">
 				<text class="title-text-right_c6">{{routbed_count_value}}<text
 						class="text-line_c31-units">次</text></text>
 			</view>
 		</view>
-		<text class="sub-title">睡眠状态</text>
+		<!-- <text class="sub-title">睡眠状态</text> -->
 
 		<view class="card-h">
 
@@ -396,17 +417,17 @@
 
 		<view class="title-row_c6">
 			<view class="title-left_c6">
-				<image class="title-image_c6" src="/static/images/report/tidong_cishu_new.png" mode="aspectFit"></image>
-				<text class="title-text_c6">体动次数</text>
-				<image class="header-image_comma" src="/static/images/report/comma_new.png" mode="aspectFit"
-					data-index="4" data-subIndex="3" bindtap="toWarmReminder"></image>
+				<!-- <image class="title-image_c6" src="/static/images/report/tidong_cishu_new.png" mode="aspectFit"></image> -->
+				<text class="title-text_c6" style="font-size: 28rpx;">体动次数</text>
+				<!-- <image class="header-image_comma" src="/static/images/report/comma_new.png" mode="aspectFit"
+					data-index="4" data-subIndex="3" bindtap="toWarmReminder"></image> -->
 			</view>
 			<view class="title-right_c6">
 				<text class="title-text-right_c6">{{rmove_arrFrequency}}<text
 						class="text-line_c31-units">次</text></text>
 			</view>
 		</view>
-		<text class="sub-title">睡眠状态</text>
+		<!-- <text class="sub-title">睡眠状态</text> -->
 		<view class="card-h">
 
 			<view class="chart-left-box">
@@ -624,7 +645,7 @@
 			</view> -->
 			<view style="position: absolute;top: 0;left: 30rpx;right: 30rpx;bottom: 60rpx;border: 1rpx solid #EEEEEE;">
 			</view>
-			<view class="echarts-container_c6" style="flex:1">
+			<view class="echarts-container_c6" style="flex:1;height: 390rpx;">
 				<ec-canvas id="chartTimeWaterfall-dom" canvas-id="mychart-time-waterfall"
 					ec="{{ ecTimeWaterfall }}"></ec-canvas>
 			</view>

+ 78 - 34
subpages/data/data.wxss

@@ -400,7 +400,7 @@ ec-canvas {
 
 .centered-text {
   position: absolute;
-  top: 570rpx;
+  top: 476rpx;
   /* 垂直居中 */
   left: 0;
   right: 0;
@@ -657,15 +657,8 @@ ec-canvas {
 .left-panel_c4 {
   position: relative;
   flex: 1;
-  /* 左边面板占据剩余空间的一半 */
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  /* 标题和内容垂直分布 */
-  align-items: center;
-  /* padding-right: 10px; */
-  background-color: rgba(255, 255, 255, 1);
-  height: 320rpx;
+  height: 230rpx;
+  background: linear-gradient(315deg, #CCC0F8 0%, #EDEAFF 100%);
   margin-left: 10rpx;
   border-radius: 5%;
 }
@@ -692,7 +685,7 @@ ec-canvas {
   flex-direction: column;
   justify-content: space-between;
   /* 垂直分布三个cell */
-  height: 320rpx;
+  height: 230rpx;
   background: white;
   /* 与左边面板等高 */
   margin-left: 15rpx;
@@ -707,7 +700,6 @@ ec-canvas {
   /* 顶端对齐 */
   justify-content: flex-start;
   /* 子元素靠右对齐 */
-  padding: 20rpx 5rpx;
   /* 上下内边距 */
   /* margin-bottom: 10rpx; */
   /* background-color: rgba(255, 255, 255, 1); */
@@ -750,9 +742,11 @@ ec-canvas {
 }
 
 .image_c4 {
-  width: 100%;
-  height: 100%;
-  object-fit: cover;
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  width: 156rpx;
+  height: 136rpx;
   /* 确保图片填充整个容器并保持其宽高比 */
 }
 
@@ -772,31 +766,33 @@ ec-canvas {
 
 .text-container_c4_top_left {
   position: absolute;
-  /* 绝对定位使得文字可以位于图片之上 */
-  top: 9%;
-  /* 垂直居中 */
-  left: 20%;
-  /* 水平居中 */
-  width: 40%;
-  transform: translate(-50%, -50%);
-  /* 调整位置以完全居中 */
+  top: 0;
+  left: 0;
+  width: 146rpx;
+  font-size: 24rpx;
   color: white;
-  /* 或者其他你需要的颜色 */
+  height: 44rpx;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  color: #FFFFFF;
   text-align: center;
-  /* 确保文字水平居中(尽管在绝对定位下这不是必需的)*/
+  border-radius: 16rpx 0rpx 16rpx 0rpx;
+  background: linear-gradient(315deg, #A89EFF 0%, #AB81FF 100%);
 }
 
 .text_c4 {
   color: #3C3796;
   font-size: 24rpx;
   text-align: start;
+  line-height: 40rpx;
   font-weight: 400;
 }
 
 .text_c4_left_top {
   color: #ffffff;
-  font-size: 28rpx;
-  font-weight: 600;
+  font-size: 24rpx;
 }
 
 .text_c4_1 {
@@ -853,9 +849,9 @@ ec-canvas {
 }
 
 .header-image_comma {
-  width: 32rpx;
+  width: 34rpx;
   /* 根据需要调整图片大小 */
-  height: 32rpx;
+  height: 34rpx;
   /* 根据需要调整图片大小 */
   margin-left: 10rpx;
 }
@@ -1154,7 +1150,7 @@ ec-canvas {
 .echarts-container_c6 {
   width: 100%;
   /* 可以根据需要调整 */
-  height: 400rpx;
+  height: 300rpx;
   /* 可以根据需要调整,或者设置为百分比 */
   display: flex;
   justify-content: center;
@@ -1451,14 +1447,16 @@ ec-canvas_c6 {
   width: 95%;
   margin-top: 20rpx;
   background-color: rgba(255, 255, 255, 1);
-  height: 500rpx;
+  height: 420rpx;
   box-shadow: 0rpx 32rpx 80rpx 0rpx #E8E8E8;
 }
 
 .separator_c00 {
-  width: 90%;
+  width: calc(100% - 60rpx);
   height: 1rpx;
-  background-color: #ebebeb;
+  margin-right: auto;
+  margin-left: auto;
+  background-color: #eeeeee;
   /* 分割线的颜色为白色 */
   margin-bottom: 15rpx;
 }
@@ -1538,9 +1536,13 @@ ec-canvas_c6 {
   height: 16rpx;
   /* 根据需要调整图片大小 */
   margin-left: 6rpx;
+
   margin-right: 6rpx
 }
 
+
+
+
 .data-text_c00_0 {
   color: #3E3D44;
   font-family: 'Microsoft YaHei', 'Heiti SC', 'Heiti TC', sans-serif;
@@ -1551,6 +1553,47 @@ ec-canvas_c6 {
   border-bottom-right-radius: 20rpx;
   background-color: rgba(255, 255, 255, 1);
   font-weight: 600;
+  flex: 1;
+}
+
+.top-bar-box {
+  width: calc(100% - 40rpx);
+  background: #FFFFFF;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-top: 28rpx;
+  height: 64rpx;
+  flex-wrap: nowrap;
+  border-radius: 20rpx;
+}
+
+.top-bar-line {
+  width: 1rpx;
+  margin: auto 20rpx;
+  height: 24rpx;
+  background: #EEEEEE;
+}
+
+.top-bar-icon {
+  display: block;
+  width: 28rpx;
+  height: 28rpx;
+  margin-right: 16rpx;
+}
+
+.top-bar-date {
+  color: #333333;
+  font-size: 24rpx;
+  white-space: nowrap;
+  margin-right: 24rpx;
+}
+
+.top-bar-time {
+  color: #333333;
+  white-space: nowrap;
+  margin-right: 20rpx;
+  font-size: 24rpx;
 }
 
 .data-text_c00 {
@@ -1646,6 +1689,7 @@ ec-canvas_c6 {
   flex-direction: row;
   align-items: center;
   flex-wrap: nowrap;
+  margin-top: 70rpx;
   justify-content: center;
 
 
@@ -1667,7 +1711,7 @@ ec-canvas_c6 {
 }
 
 .card-h .chart-left-box .chart-left-title-box:last-child {
-  margin-bottom: 30rpx;
+  margin-bottom: 50rpx;
 }
 
 .sub-title {

BIN
subpages/images/ic_bg_date.png


BIN
subpages/images/ic_bg_room.png


BIN
subpages/images/left_background_c4_new.png


+ 1 - 1
subpages/sleepReport/sleepReport.json

@@ -3,5 +3,5 @@
   },
   "navigationBarBackgroundColor": "#ffffff",
   "navigationBarTextStyle": "black",
-  "navigationBarTitleText": "睡眠报告"
+  "navigationBarTitleText": "历史睡眠报告"
 }