|
@@ -47,6 +47,7 @@ Page({
|
|
|
{ value: '27', remark: 'F', label: '有时眩晕' },
|
|
{ value: '27', remark: 'F', label: '有时眩晕' },
|
|
|
{ value: '28', remark: 'F', label: '大便偏软' },
|
|
{ value: '28', remark: 'F', label: '大便偏软' },
|
|
|
{ value: '29', remark: 'F', label: '易恶心、呕吐、晕车' },
|
|
{ value: '29', remark: 'F', label: '易恶心、呕吐、晕车' },
|
|
|
|
|
+ { value: '30', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
bodySynthesis: [],// 一、身体综合
|
|
bodySynthesis: [],// 一、身体综合
|
|
@@ -60,6 +61,7 @@ Page({
|
|
|
{ value: '4', remark: 'E', label: '多呈现消极、羸弱的面孔' },
|
|
{ value: '4', remark: 'E', label: '多呈现消极、羸弱的面孔' },
|
|
|
{ value: '5', remark: 'F', label: '唾液和痰较多,中发黏' },
|
|
{ value: '5', remark: 'F', label: '唾液和痰较多,中发黏' },
|
|
|
{ value: '6', remark: 'F', label: '易犯花粉症和鼻炎,容易淌鼻涕' },
|
|
{ value: '6', remark: 'F', label: '易犯花粉症和鼻炎,容易淌鼻涕' },
|
|
|
|
|
+ { value: '7', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
facialFeatures: [],// 二、面部五官
|
|
facialFeatures: [],// 二、面部五官
|
|
@@ -73,6 +75,7 @@ Page({
|
|
|
{ value: '4', remark: 'D', label: '肤色暗淡' },
|
|
{ value: '4', remark: 'D', label: '肤色暗淡' },
|
|
|
{ value: '5', remark: 'E', label: '洗浴后皮肤很快干燥,易发痒' },
|
|
{ value: '5', remark: 'E', label: '洗浴后皮肤很快干燥,易发痒' },
|
|
|
{ value: '6', remark: 'E', label: '皮肤纹理粗糙、毛孔张开' },
|
|
{ value: '6', remark: 'E', label: '皮肤纹理粗糙、毛孔张开' },
|
|
|
|
|
+ { value: '7', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
skinHair: [],// 三、皮肤毛发
|
|
skinHair: [],// 三、皮肤毛发
|
|
@@ -82,6 +85,7 @@ Page({
|
|
|
{ value: '0', remark: 'A', label: '经常情绪低落,容易受伤害' },
|
|
{ value: '0', remark: 'A', label: '经常情绪低落,容易受伤害' },
|
|
|
{ value: '1', remark: 'B', label: '焦虑、易怒' },
|
|
{ value: '1', remark: 'B', label: '焦虑、易怒' },
|
|
|
{ value: '2', remark: 'B', label: '常长吁短叹、嗳气' },
|
|
{ value: '2', remark: 'B', label: '常长吁短叹、嗳气' },
|
|
|
|
|
+ { value: '3', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
emotion: [],// 四、情绪方面
|
|
emotion: [],// 四、情绪方面
|
|
@@ -91,6 +95,7 @@ Page({
|
|
|
{ value: '0', remark: 'B', label: '月经前身体不适' },
|
|
{ value: '0', remark: 'B', label: '月经前身体不适' },
|
|
|
{ value: '1', remark: 'C', label: '经血量少或月经周期过长' },
|
|
{ value: '1', remark: 'C', label: '经血量少或月经周期过长' },
|
|
|
{ value: '2', remark: 'D', label: '月经痛加重、经血中有动物肝脏血块' },
|
|
{ value: '2', remark: 'D', label: '月经痛加重、经血中有动物肝脏血块' },
|
|
|
|
|
+ { value: '3', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
menstruation: [],// 五、月经方面
|
|
menstruation: [],// 五、月经方面
|
|
@@ -105,6 +110,7 @@ Page({
|
|
|
{ value: '5', remark: 'D', label: '接人待物中规中矩,严守礼节' },
|
|
{ value: '5', remark: 'D', label: '接人待物中规中矩,严守礼节' },
|
|
|
{ value: '6', remark: 'F', label: '以自我为中心,争强好胜,嫉妒心强,爱慕虚荣' },
|
|
{ value: '6', remark: 'F', label: '以自我为中心,争强好胜,嫉妒心强,爱慕虚荣' },
|
|
|
{ value: '7', remark: 'F', label: '喜欢奢华、热闹的氛围' },
|
|
{ value: '7', remark: 'F', label: '喜欢奢华、热闹的氛围' },
|
|
|
|
|
+ { value: '8', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
character: [],// 六、性格方面
|
|
character: [],// 六、性格方面
|
|
@@ -113,6 +119,7 @@ Page({
|
|
|
sleepOptions: [
|
|
sleepOptions: [
|
|
|
{ value: '0', remark: 'B', label: '入睡闲困难' },
|
|
{ value: '0', remark: 'B', label: '入睡闲困难' },
|
|
|
{ value: '1', remark: 'C', label: '睡眠浅,易做梦' },
|
|
{ value: '1', remark: 'C', label: '睡眠浅,易做梦' },
|
|
|
|
|
+ { value: '2', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
sleep: [],// 七、睡眠
|
|
sleep: [],// 七、睡眠
|
|
@@ -125,6 +132,7 @@ Page({
|
|
|
{ value: '3', remark: 'D', label: '舌色暗、偏紫色;有黑色斑点;舌下两根静脉粗粗地浮现出来' },
|
|
{ value: '3', remark: 'D', label: '舌色暗、偏紫色;有黑色斑点;舌下两根静脉粗粗地浮现出来' },
|
|
|
{ value: '4', remark: 'E', label: '舌色整体发红;舌苔少、甚至没有;舌面有齿痕' },
|
|
{ value: '4', remark: 'E', label: '舌色整体发红;舌苔少、甚至没有;舌面有齿痕' },
|
|
|
{ value: '5', remark: 'F', label: '舌苔厚、黏黏糊糊;舌苔色黄或白;舌体肿胀' },
|
|
{ value: '5', remark: 'F', label: '舌苔厚、黏黏糊糊;舌苔色黄或白;舌体肿胀' },
|
|
|
|
|
+ { value: '6', remark: '', label: '无' },
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
tongueState: [],// 八、舌头状态
|
|
tongueState: [],// 八、舌头状态
|
|
@@ -289,12 +297,25 @@ Page({
|
|
|
updateCounts(arr6);
|
|
updateCounts(arr6);
|
|
|
updateCounts(arr7);
|
|
updateCounts(arr7);
|
|
|
updateCounts(arr8);
|
|
updateCounts(arr8);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ console.log('arr1=' + arr1);
|
|
|
|
|
+ console.log('arr2=' + arr2);
|
|
|
|
|
+ console.log('arr3=' + arr3);
|
|
|
|
|
+ console.log('arr4=' + arr4);
|
|
|
|
|
+ console.log('arr5=' + arr5);
|
|
|
|
|
+ console.log('arr6=' + arr6);
|
|
|
|
|
+ console.log('arr7=' + arr7);
|
|
|
|
|
+ console.log('arr8=' + arr8);
|
|
|
countABCDEF = letterCounts;
|
|
countABCDEF = letterCounts;
|
|
|
// 找出出现次数最多的字母及其计数
|
|
// 找出出现次数最多的字母及其计数
|
|
|
let maxCount = 0;
|
|
let maxCount = 0;
|
|
|
let mostFrequentLetters = [];
|
|
let mostFrequentLetters = [];
|
|
|
|
|
|
|
|
for (let letter in letterCounts) {
|
|
for (let letter in letterCounts) {
|
|
|
|
|
+ if (letterCounts[letter] == 0) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
if (letterCounts[letter] > maxCount) {
|
|
if (letterCounts[letter] > maxCount) {
|
|
|
maxCount = letterCounts[letter];
|
|
maxCount = letterCounts[letter];
|
|
|
mostFrequentLetters = [letter]; // 重置为当前最多的字母
|
|
mostFrequentLetters = [letter]; // 重置为当前最多的字母
|
|
@@ -303,6 +324,7 @@ Page({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ console.log('letterCounts=' + JSON.stringify(letterCounts) );
|
|
|
// 如果所有字母的计数都是0或数组为空,则返回空
|
|
// 如果所有字母的计数都是0或数组为空,则返回空
|
|
|
if (mostFrequentLetters.length === 0) {
|
|
if (mostFrequentLetters.length === 0) {
|
|
|
return '';
|
|
return '';
|
|
@@ -368,17 +390,20 @@ Page({
|
|
|
this.getRemarkValues(this.data.sleepOptions, this.data.sleep),
|
|
this.getRemarkValues(this.data.sleepOptions, this.data.sleep),
|
|
|
this.getRemarkValues(this.data.tongueStateOptions, this.data.tongueState)
|
|
this.getRemarkValues(this.data.tongueStateOptions, this.data.tongueState)
|
|
|
);
|
|
);
|
|
|
|
|
+ console.log('resultMostFrequentLetters==' + resultMostFrequentLetters);
|
|
|
let comScoreIndex = [];
|
|
let comScoreIndex = [];
|
|
|
let _comScoreStatus = "";
|
|
let _comScoreStatus = "";
|
|
|
let _comScoreDesc = ""
|
|
let _comScoreDesc = ""
|
|
|
- if (!resultMostFrequentLetters || !Array.isArray(resultMostFrequentLetters)) {
|
|
|
|
|
|
|
+ if (!resultMostFrequentLetters || !Array.isArray(resultMostFrequentLetters) || !resultMostFrequentLetters.length) {
|
|
|
comScoreIndex = [];
|
|
comScoreIndex = [];
|
|
|
_comScoreStatus = "";
|
|
_comScoreStatus = "";
|
|
|
_comScoreDesc = ""
|
|
_comScoreDesc = ""
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ comScoreIndex = [];
|
|
|
// 遍历输入数组
|
|
// 遍历输入数组
|
|
|
resultMostFrequentLetters.forEach(item => {
|
|
resultMostFrequentLetters.forEach(item => {
|
|
|
|
|
|
|
|
|
|
+ console.log('item=' + item);
|
|
|
if (item == 'A') {
|
|
if (item == 'A') {
|
|
|
if (_comScoreStatus) {
|
|
if (_comScoreStatus) {
|
|
|
_comScoreStatus += "\n气虚型";
|
|
_comScoreStatus += "\n气虚型";
|
|
@@ -482,11 +507,12 @@ Page({
|
|
|
value1: this.getFormattedString(this.data.tongueState, this.data.tongueStateOptions),
|
|
value1: this.getFormattedString(this.data.tongueState, this.data.tongueStateOptions),
|
|
|
//value2 保存A、B、C、D、E、F 每个的个数
|
|
//value2 保存A、B、C、D、E、F 每个的个数
|
|
|
value2: JSON.stringify(countABCDEF),
|
|
value2: JSON.stringify(countABCDEF),
|
|
|
- comScoreStatus: _comScoreStatus,
|
|
|
|
|
|
|
+ comScoreStatus: _comScoreStatus ? _comScoreStatus : '健康型',
|
|
|
comScoreIndex: comScoreIndex,
|
|
comScoreIndex: comScoreIndex,
|
|
|
comScoreDesc: _comScoreDesc,
|
|
comScoreDesc: _comScoreDesc,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ console.log('surveyData=' + JSON.stringify(surveyData));
|
|
|
var isFinish = true;
|
|
var isFinish = true;
|
|
|
var emptyKey = "";
|
|
var emptyKey = "";
|
|
|
let checkList = {
|
|
let checkList = {
|
|
@@ -543,7 +569,6 @@ Page({
|
|
|
})
|
|
})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 将surveyData发送到服务器
|
|
// 将surveyData发送到服务器
|
|
|
console.log('提交的问卷数据:', surveyData);
|
|
console.log('提交的问卷数据:', surveyData);
|
|
|
if (!that.data.intervalId1) {
|
|
if (!that.data.intervalId1) {
|