Sfoglia il codice sorgente

修改体质调查问卷和睡眠调查问卷不能提交bug
修改体制报告数值为nan和null bug
修改体制报告列表数值为nan和null bug
体质调查问卷增加点击 以上没有 js特效

lkg 10 mesi fa
parent
commit
71ac46ea12

+ 35 - 7
pages/index/index.js

@@ -231,13 +231,40 @@ Page({
         // need Login
         if (hasAuth) {
           if (index == 0) {
-            var hasHotelAuth = wx.getStorageSync("hasHotelAuth");
-            if (!hasHotelAuth) {
-              this.setData({
-                showTipsB: true
-              })
-              return
-            }
+            let that=this
+            // 判断扫码控制权限
+            wx.request({
+              url: `${homeApi_empower}/wxstatus`,
+              data: {
+                unionid: wx.getStorageSync('unionid'),
+                openid: wx.getStorageSync('openid'),
+                token: wx.getStorageSync('token'),
+              },
+              method: 'POST',
+              success: function (intervalRes) {
+                //empower.js? [sm]:152 intervalRes.data={"st":"success","status":"0"}
+                if (intervalRes.data && intervalRes.data.st && intervalRes.data.status && intervalRes.data.st == 'success' && intervalRes.data.status == '1') {
+                  wx.setStorageSync('hasHotelAuth', true);
+                  wx.setStorageSync('hotelEmpower', intervalRes.data.hotel);
+                  wx.setStorageSync('roomEmpower', intervalRes.data.room);
+                  wx.setStorageSync('hname', intervalRes.data.hname);
+                  wx.setStorageSync('rname', intervalRes.data.rname);
+                } else {
+                  wx.setStorageSync('hasHotelAuth', false);
+                }
+                var hasHotelAuth = wx.getStorageSync("hasHotelAuth");
+                if (!hasHotelAuth) {
+                  that.setData({
+                    showTipsB: true
+                  })
+                  return
+                }
+                that.toCardPage(index);
+              },
+              fail: function (error) {
+              }
+            });
+            return;
           }
           if (index == 2) {
             var hasReportAuth = wx.getStorageSync("hasReportAuth");
@@ -267,6 +294,7 @@ Page({
         break;
     }
   },
+
   toCardPage(index) {
     const type = this.data.menuCardList[index].type;
     const url = this.data.menuCardList[index].url;

+ 1 - 1
project.private.config.json

@@ -1,5 +1,5 @@
 {
-  "projectname": "xiaobaiWeapp_Native",
+  "projectname": "miniProgram",
   "setting": {
     "compileHotReLoad": true,
     "skylineRenderEnable": false,

+ 70 - 18
subpages/constitutionDiagnosis/constitutionDiagnosis.js

@@ -186,69 +186,121 @@ Page({
 		intervalId2: null,//授权解除定时任务
 		intervalId3: null,//导出excel
 	},
+	verifyAll: function (dataset, detail) {
+		let flag = false
+		if (dataset ) {
+			detail.forEach((item, index) => {
+				if (dataset[item].label == "以上都没有"){
+					flag = item
+				}
+				return flag
+			})
+		}
+		return flag
+	},
 
 
 	// 一、身体综合
 	bindBodySynthesis: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			bodySynthesis: e.detail
+			bodySynthesis: detail
 		});
 	},
 
 	// 二、面部五官
 	bindFacialFeatures: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			facialFeatures: e.detail
+			facialFeatures: detail
 		});
 	},
 
 	// 三、皮肤毛发
 	bindSkinHair: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			skinHair: e.detail
+			skinHair: detail
 		});
 	},
 
 	// 四、情绪方面
 	bindEmotion: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			emotion: e.detail
+			emotion: detail
 		});
 	},
 
 	// 五、月经方面
 	bindMenstruation: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			menstruation: e.detail
+			menstruation:detail
 		});
 	},
 
 	// 六、性格方面
 	bindCharacter: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			character: e.detail
+			character: detail
 		});
 	},
 
 	// 七、睡眠
 	bindSleep: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			sleep: e.detail
+			sleep:detail
 		});
 	},
 
 	// 八、舌头状态
 	bindTongueState: function (e) {
-		console.log(e)
+		var detail = e.detail;
+		var dataset = e.currentTarget.dataset.item;
+		var b = this.verifyAll(dataset, detail);
+		if (b) {
+			detail = detail[detail.length-1]==b ?[b]:[detail[detail.length-1]]
+		}
 		this.setData({
-			tongueState: e.detail
+			tongueState: detail
 		});
 	},
 
@@ -508,7 +560,7 @@ Page({
 			//value2 保存A、B、C、D、E、F 每个的个数
 			value2: JSON.stringify(countABCDEF),
 			comScoreStatus: _comScoreStatus ? _comScoreStatus : '健康型',
-			comScoreIndex: comScoreIndex,
+			comScoreIndex: comScoreIndex.join(),
 			comScoreDesc: _comScoreDesc,
 		};
 
@@ -918,4 +970,4 @@ Page({
 
 		return result;
 	}
-});
+});

+ 8 - 8
subpages/constitutionDiagnosis/constitutionDiagnosis.wxml

@@ -14,7 +14,7 @@
 
 			<view class='title_1'>一、身体综合(多选)</view>
 			<view class="section" id="bodySynthesis">
-				<van-checkbox-group value="{{ bodySynthesis }}" bind:change="bindBodySynthesis">
+				<van-checkbox-group value="{{ bodySynthesis }}" data-item="{{bodySynthesisOptions}}"  bind:change="bindBodySynthesis">
 					<van-checkbox wx:for="{{bodySynthesisOptions}}" wx:key="index" shape="square"
 						checked-color="#0ABCA4" name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -29,7 +29,7 @@
 
 			<view class='title_1'>二、面部五官(多选)</view>
 			<view class="section" id="facialFeatures">
-				<van-checkbox-group value="{{ facialFeatures }}" bind:change="bindFacialFeatures">
+				<van-checkbox-group value="{{ facialFeatures }}" bind:change="bindFacialFeatures" data-item="{{facialFeaturesOptions}}" >
 					<van-checkbox wx:for="{{facialFeaturesOptions}}" wx:key="index" shape="square"
 						checked-color="#0ABCA4" name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -44,7 +44,7 @@
 
 			<view class='title_1'>三、皮肤毛发(多选)</view>
 			<view class="section" id="skinHair">
-				<van-checkbox-group value="{{ skinHair }}" bind:change="bindSkinHair">
+				<van-checkbox-group value="{{ skinHair }}" bind:change="bindSkinHair" data-item="{{skinHairOptions}}">
 					<van-checkbox wx:for="{{skinHairOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
 						name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -59,7 +59,7 @@
 
 			<view class='title_1'>四、情绪方面(多选)</view>
 			<view class="section" id="emotion">
-				<van-checkbox-group value="{{ emotion }}" bind:change="bindEmotion">
+				<van-checkbox-group value="{{ emotion }}" bind:change="bindEmotion" data-item="{{emotionOptions}}">
 					<van-checkbox wx:for="{{emotionOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
 						name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -74,7 +74,7 @@
 
 			<view class='title_1'>五、月经方面(多选)</view>
 			<view class="section" id="menstruation">
-				<van-checkbox-group value="{{ menstruation }}" bind:change="bindMenstruation">
+				<van-checkbox-group value="{{ menstruation }}" bind:change="bindMenstruation"  data-item="{{menstruationOptions}}">
 					<van-checkbox wx:for="{{menstruationOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
 						name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -89,7 +89,7 @@
 
 			<view class='title_1'>六、性格方面(多选)</view>
 			<view class="section" id="character">
-				<van-checkbox-group value="{{ character }}" bind:change="bindCharacter">
+				<van-checkbox-group value="{{ character }}" bind:change="bindCharacter" data-item="{{characterOptions}}">
 					<van-checkbox wx:for="{{characterOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
 						name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -104,7 +104,7 @@
 
 			<view class='title_1'>七、睡眠(多选)</view>
 			<view class="section" id="sleep">
-				<van-checkbox-group value="{{ sleep }}" bind:change="bindSleep">
+				<van-checkbox-group value="{{ sleep }}" bind:change="bindSleep"  data-item="{{sleepOptions}}">
 					<van-checkbox wx:for="{{sleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
 						name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">
@@ -119,7 +119,7 @@
 
 			<view class='title_1'>八、舌头状态(多选)</view>
 			<view class="section" id="tongueState">
-				<van-checkbox-group value="{{ tongueState }}" bind:change="bindTongueState">
+				<van-checkbox-group value="{{ tongueState }}" bind:change="bindTongueState"  data-item="{{tongueStateOptions}}">
 					<van-checkbox wx:for="{{tongueStateOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
 						name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
 						<view class="radio-view">

+ 109 - 110
subpages/data/data.js

@@ -53,107 +53,108 @@ function setChartCircularProgressBarOption(chart, data = {}) {
 		checkData = checkList[3];
 	}
 
+	// 定义仪表盘配置项
 	var option = {
-		series: [
-			{
-				type: 'gauge',
-				startAngle: -270,
-				endAngle: 90,
-				legendHoverLink: true,
-				min: 0,
-				max: 100,
-				itemStyle: {
-					color: '#58D9F9',
-					shadowColor: 'rgba(0,138,255,0.45)',
-					shadowBlur: 5,
-					shadowOffsetX: 1,
-					shadowOffsetY: 1
-				},
-				progress: {
-					show: true,
-					roundCap: true,
-					width: 10,
-					itemStyle: {
-						// 进度条样式
-						color: {
-							// 自定义渐变色
-							type: 'linear',
-							x: 0.75,
-							y: 0.75,
-							x2: 0,
-							y2: 0.75,
-							colorStops: [
-								{
-									offset: 0,
-									color: checkData.startColor // 0% 处的颜色
-								},
-
-								{
-									offset: 0.5,
-									color: checkData.centerColor // 100% 处的颜色
-								},
-								{
-									offset: 1,
-									color: checkData.endColor // 100% 处的颜色
-								}
-							],
-							global: false // 缺省为 false
-						}
-					}
-				},
-				pointer: {
-					show: false,
-				},
-				axisLine: {
-					roundCap: true,
-					lineStyle: {
-						width: 10,
-					}
-				},
-				axisTick: {
-					show: false // 是否显示分隔线
-				},
-				splitLine: {
-					show: false // 是否显示分隔线
-				},
-				axisLabel: {
-					show: false,
-				},
-				title: {
-					color: checkData.titleColor,
-					offsetCenter: [0, '-36%'],
-					lineHeight: 15,
-					fontSize: 15,
-				},
-				detail: {
-					backgroundColor: '#fff',
-					width: '60%',
-					lineHeight: 40,
-					height: 40,
-					color: '#333333',
-					offsetCenter: [0, "24%"],
-					valueAnimation: true,
-					formatter: function (value) {
-						return '{value|' + value.toFixed(0) + '}';
-					},
-					rich: {
-						value: {
-							fontSize: 30,
-							fontWeight: 'bolder',
-							color: checkData.titleColor
-						},
-					}
-				},
-				data: [
-					{
-						name: data?.rscore_desc || checkData.title || '无',
-						value: data?.rscore_value || 0
-					}
-				]
-			}
-		]
+	    series: [
+	        {
+	            type: 'gauge', // 仪表盘类型
+	            startAngle: -270, // 仪表盘起始角度
+	            endAngle: 90, // 仪表盘结束角度
+	            legendHoverLink: true, // 是否启用图例悬浮联动
+	            min: 0, // 仪表盘最小值
+	            max: 100, // 仪表盘最大值
+	            itemStyle: {
+	                color: '#58D9F9', // 仪表盘背景色
+	                shadowColor: 'rgba(0,138,255,0.45)', // 阴影颜色
+	                shadowBlur: 5, // 阴影模糊大小
+	                shadowOffsetX: 1, // 阴影水平偏移
+	                shadowOffsetY: 1 // 阴影垂直偏移
+	            },
+	            progress: {
+	                show: true, // 是否显示进度条
+	                roundCap: true, // 是否显示圆角
+	                width: 10, // 进度条宽度
+	                itemStyle: {
+	                    // 进度条样式
+	                    color: {
+	                        // 自定义渐变色
+	                        type: 'linear',
+	                        x: 0.75,
+	                        y: 0.75,
+	                        x2: 0,
+	                        y2: 0.75,
+	                        colorStops: [
+	                            {
+	                                offset: 0,
+	                                color: checkData.startColor // 0% 处的颜色
+	                            },
+
+	                            {
+	                                offset: 0.5,
+	                                color: checkData.centerColor // 100% 处的颜色
+	                            },
+	                            {
+	                                offset: 1,
+	                                color: checkData.endColor // 100% 处的颜色
+	                            }
+	                        ],
+	                        global: false // 缺省为 false
+	                    }
+	                }
+	            },
+	            pointer: {
+	                show: false, // 是否显示指针
+	            },
+	            axisLine: {
+	                roundCap: true, // 是否显示圆角
+	                lineStyle: {
+	                    width: 10, // 轴线宽度
+	                }
+	            },
+	            axisTick: {
+	                show: false // 是否显示分隔线
+	            },
+	            splitLine: {
+	                show: false // 是否显示分隔线
+	            },
+	            axisLabel: {
+	                show: false, // 是否显示标签
+	            },
+	            title: {
+	                color: checkData.titleColor, // 标题颜色
+	                offsetCenter: [0, '-36%'], // 标题位置
+	                lineHeight: 15, // 行高
+	                fontSize: 15, // 字体大小
+	            },
+	            detail: {
+	                backgroundColor: '#fff', // 背景颜色
+	                width: '60%', // 宽度
+	                lineHeight: 40, // 行高
+	                height: 40, // 高度
+	                color: '#333333', // 字体颜色
+	                offsetCenter: [0, "24%"], // 位置
+	                valueAnimation: true, // 是否启用值的动画效果
+	                formatter: function (value) {
+						value=(isNaN(value)||null||undefined)?"--":value.toFixed(0);
+	                    return '{value|' + value+ '}'; // 数据格式化
+	                },
+	                rich: {
+	                    value: {
+	                        fontSize: 30, // 字体大小
+	                        fontWeight: 'bolder', // 加粗
+	                        color: checkData.titleColor // 颜色
+	                    },
+	                }
+	            },
+	            data: [
+	                {
+	                    name: data?.rscore_desc || checkData.title || '无', // 数据名称
+	                    value: data?.rscore_value || 0 // 数据值
+	                }
+	            ]
+	        }
+	    ]
 	};
-
 	chart.setOption(option, true);
 }
 
@@ -1225,7 +1226,6 @@ Page({
 		routbed_time: 0,
 		rgobed_routbed: 0,
 		sleepHourSub: 0,
-		routbed_count_value: 0,
 		reportDate: '',
 		currentDate: '',
 		currentTime: '',
@@ -2163,12 +2163,12 @@ Page({
 			rlight_duration: ress.rlight_duration,
 			rin_duration: ress.rin_duration,
 			rawake_duration: ress.rawake_duration,
-			ravg_hx_value: ress.ravg_hx_value,
-			ravg_hx_desc: ress.ravg_hx_desc,
-			ravg_rh_value: ress.ravg_rh_value,
-			ravg_rh_desc: ress.ravg_rh_desc,
-			rscore_value: ress.rscore_value,
-			rscore_desc: ress.rscore_desc,
+			ravg_hx_value: ress.ravg_hx_value===null?"--":ress.ravg_hx_value,
+			ravg_hx_desc: ress.ravg_hx_desc===null?"--":ress.ravg_hx_desc,
+			ravg_rh_value: ress.ravg_rh_value===null?"--":ress.ravg_rh_value,
+			ravg_rh_desc: ress.ravg_rh_desc===null?"--":ress.ravg_rh_desc,
+			rscore_value: ress.rscore_value===null?"--":ress.rscore_value,
+			rscore_desc: ress.rscore_desc===null?"--":ress.rscore_desc,
 
 			rsn: ress.rsn,
 			rdate: ress.rdate,
@@ -2179,7 +2179,6 @@ Page({
 			routbed_time: ress.routbed_time,//离床时间
 			rgobed_routbed: ress.rgobed_time + '~' + ress.routbed_time,
 			sleepHourSub: that.getTimeDiffInHours(ress.rgobed_time, ress.routbed_time),
-			routbed_count_value: ress.routbed_count_value,//离床次数
 			zdPointT: zdPointTemp,
 			rdt_arrNew: rdt_arrTemp,
 			rrh_arrNew: rrh_arrTemp,
@@ -2199,9 +2198,9 @@ Page({
 			rawake_duration_efficiency: rawake_duration_efficiency_temp,
 			pushReportId: ress.rdid,
 			isNoReportToday: false,
-			rrs_duration: that.convertTimeToHoursAndMinutes(ress.rrs_duration ? ress.rrs_duration.toString() : '0'),
-			routbed_count_value: ress.routbed_count_value,
-			rsleep_eff_value: ress.rsleep_eff_value,
+			rrs_duration: that.convertTimeToHoursAndMinutes(ress.rrs_duration ? ress.rrs_duration.toString() : '0')===null?"--":that.convertTimeToHoursAndMinutes(ress.rrs_duration ? ress.rrs_duration.toString() : '0'),
+			routbed_count_value: ress.routbed_count_value===null?"--":ress.routbed_count_value ,
+			rsleep_eff_value: ress.rsleep_eff_value===null?"--":ress.rsleep_eff_value ,
 			hotelname: ress.hotelname,
 			roomname: ress.roomname,
 			bedname: ress.bedname,

+ 8 - 10
subpages/data/data.wxml

@@ -55,8 +55,6 @@
 					</view>
 				</view>
 			</view>
-
-
 			<view class="centered-text">
 				<text class="text-line text-line-3">香睡指数</text>
 			</view>
@@ -178,14 +176,14 @@
 								style="font-size: 24rpx;">次</text></text>
 					</view>
 				</view>
-				<view class="cell_c4">
-					<view class="blue-dot"></view>
-					<view class="cell-text_c4">
-						<text class="text-line_c4" style="float:left">打鼾次数</text>
-						<text class="text-line_c41" style="float:right;margin-right:5rpx">{{rsnoring_arrFrequency}}<text
-								style="font-size: 24rpx;">次</text></text>
-					</view>
-				</view>
+<!--				<view class="cell_c4">-->
+<!--					<view class="blue-dot"></view>-->
+<!--					<view class="cell-text_c4">-->
+<!--						<text class="text-line_c4" style="float:left">打鼾次数</text>-->
+<!--						<text class="text-line_c41" style="float:right;margin-right:5rpx">{{rsnoring_arrFrequency}}<text-->
+<!--								style="font-size: 24rpx;">次</text></text>-->
+<!--					</view>-->
+<!--				</view>-->
 			</view>
 		</view>
 

+ 6 - 1
subpages/data/data.wxss

@@ -685,7 +685,8 @@ ec-canvas {
   flex-direction: column;
   justify-content: space-between;
   /* 垂直分布三个cell */
-  height: 230rpx;
+  height: 180rpx;
+  padding: 25rpx 0;
   background: white;
   /* 与左边面板等高 */
   margin-left: 15rpx;
@@ -695,10 +696,14 @@ ec-canvas {
 
 .cell_c4 {
   display: flex;
+  /* 使容器成为弹性容器,支持灵活的布局方式 */
   flex: auto;
+  /* 自动填充容器,根据容器的大小自动调整项目的大小 */
   align-items: center;
+  /* 在交叉轴(通常是垂直方向)上居中对齐项目 */
   /* 顶端对齐 */
   justify-content: flex-start;
+  /* 在主轴(通常是水平方向)上从起点开始对齐项目 */
   /* 子元素靠右对齐 */
   /* 上下内边距 */
   /* margin-bottom: 10rpx; */

+ 5 - 0
subpages/evaluationIntroduction/evaluationIntroduction.js

@@ -8,6 +8,7 @@ Page({
     type: "physique",//报告类型
     testMin: 3,
     testSize: 9,
+    peopleNum:12,
     comScoreIndex: 6,
     testTitle: "睡眠质量指数评测",
     testDesc: "本测评系统依据山东睡眠质量指数量表(SDPSQI)开发。\nSDPSQI由山东省中医药大学医学中心精神科睡眠和生物节律研究中心睡眠专家组编制,专门用于评定被试者近一个月的主观睡眠质量。SDPSQI作为一种科学、系统的睡眠质量评估工具为了解个体睡眠状况、诊断睡眠障碍以及制定相应的干预措施提供了重要的工具和平台。",
@@ -22,6 +23,7 @@ Page({
 
     if (options.type) {
       var type = options.type;
+      var peopleNum = 12;
       var testTitle = "";
       var testDesc = "";
       var testMin = 3;
@@ -30,12 +32,14 @@ Page({
         // 体质
         testSize = 9;
         testMin = 3;
+        peopleNum = 12;
         testTitle = "体质诊断检测";
         testDesc = "本测试表由山东省中医药大学中医专家组(具有中医针灸师、中医芳香疗法指导师、医院临床检验科资质的主任医师们)提出。中医学依据气、血、水的平衡状态,将人分为六种体质。要改善身体的“不调”,最重要的就是先了解自己的体质。有人也可能是不同体质混合的“复合型”,而且人的体质日常是变化的,因此应根据每天变化的身体状态进行相应调理的养生疗法。我们根据人体部位分了八个方面,请从下面选项里选出和自己相符的项,提交后,系统会进行判断,并显示您的体质、分析和建议。";
         this.checkPhysiqueData()
       } else if (type == "sleep") {
         // 睡眠质量
         testSize = 25;
+        peopleNum = 13;
         testMin = 8;
         testTitle = "睡眠质量指数评测";
         testDesc = "本测评系统依据山东睡眠质量指数量表(SDPSQI)开发。\nSDPSQI由山东省中医药大学医学中心精神科睡眠和生物节律研究中心睡眠专家组编制,专门用于评定被试者近一个月的主观睡眠质量。SDPSQI作为一种科学、系统的睡眠质量评估工具为了解个体睡眠状况、诊断睡眠障碍以及制定相应的干预措施提供了重要的工具和平台。";
@@ -43,6 +47,7 @@ Page({
       this.setData({
         testMin,
         testSize,
+        peopleNum,
         testTitle,
         testDesc,
         type

+ 1 - 1
subpages/evaluationIntroduction/evaluationIntroduction.wxml

@@ -17,7 +17,7 @@
       </view>
       <view class="test-info-item flex-1">
         <image src="/subpages/images/testRes/ic_test_member.png"></image>
-        <text class="test-info-item-title">12万</text>
+        <text class="test-info-item-title">{{peopleNum}}万</text>
         <text class="test-info-item-desc">测评人数</text>
       </view>
     </view>

+ 1 - 4
subpages/sleepReport/sleepReport.wxml

@@ -10,13 +10,12 @@
                 <text class="name">{{subItem.hn}} | {{subItem.pos}}</text>
             </view>
             <view class="h-view" style="justify-content: space-around;">
-
                 <view class="v-item">
                     <text class="t1">{{subItem.durations}}</text>
                     <text class="desc">睡眠时间</text>
                 </view>
                 <view class="v-item">
-                    <text class="t3" style="color:{{subItem.color}};">{{subItem.rscore_value}}</text>
+                    <text class="t3" style="color:{{subItem.color}};">{{subItem.rscore_value|| "--"}}</text>
                     <text class="desc">香睡指数</text>
                 </view>
                 <view class="v-item">
@@ -24,12 +23,10 @@
                             class="t2">分</text></text>
                     <text class="desc">在床时间</text>
                 </view>
-
             </view>
         </view>
     </view>
     <text class="select_date_btn" bindtap="onDisplay">选择日期</text>
-
     <van-calendar show="{{ show }}" type="range" min-date="{{ minDate }}" defaultDate="{{defaultDate}}"
         max-date="{{ maxDate }}" allow-same-day="{{true}}" formatter="{{ formatter }}" color="#0ABCA4"
         bind:close="onClose" bind:confirm="onConfirm" />

+ 16 - 0
subpages/textStep/textStep.js

@@ -528,6 +528,10 @@ Page({
       } else {
         values.push(value);
       }
+      var b = this.verifyAll(list[index].options,values)
+      if (b) {
+        values = values[values.length-1]==b ?[b]:[values[values.length-1]]
+      }
       list[index].value = values;
       this.setData({
         physiqueData: list
@@ -536,6 +540,18 @@ Page({
       // 睡眠质量
     }
   },
+  verifyAll: function (dataset, values) {
+    let flag = false
+    if (dataset ) {
+      values.forEach((item, index) => {
+        if (dataset[item].label == "以上都没有"){
+          flag = item
+        }
+        return flag
+      })
+    }
+    return flag
+  },
   toPrevious() {
     if (this.data.step > 1) {
       this.setData({