|
@@ -149,7 +149,11 @@
|
|
|
|
|
|
<!-- {{content}} -->
|
|
|
</div>
|
|
|
- <div class="message_form2" style="color: #000000" v-if="content.isType == -1">
|
|
|
+ <div
|
|
|
+ class="message_form2"
|
|
|
+ style="color: #000000"
|
|
|
+ v-if="content.isType == -1"
|
|
|
+ >
|
|
|
{{ content.question }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -735,7 +739,7 @@ export default {
|
|
|
if (result.question && result.question.includes("测评结果")) {
|
|
|
// let str = sessionStorage.getItem("testResults");
|
|
|
let str = sessionStorage.getItem("testResultsScore");
|
|
|
- if ( str <= 52) {
|
|
|
+ if (str <= 52) {
|
|
|
result.question =
|
|
|
"您的情绪状态在正常范围内。请继续保持积极心态,关注生活中的美好,预防抑郁情绪。如有需要,随时与我沟通,共同守护您的心理健康。";
|
|
|
} else if (str >= 53 && str <= 62) {
|
|
@@ -840,12 +844,12 @@ export default {
|
|
|
if (flag) {
|
|
|
that.buttonFlag = false;
|
|
|
//清除定时器
|
|
|
- // let contant1 = document.getElementById("contant1");
|
|
|
- // this.sleep(101).then(() => {
|
|
|
- // contant1.scrollTop = contant1.scrollHeight;
|
|
|
- // });
|
|
|
+ let contant1 = document.getElementById("contant1");
|
|
|
+ this.sleep(101).then(() => {
|
|
|
+ contant1.scrollTop = contant1.scrollHeight;
|
|
|
+ });
|
|
|
clearInterval(this.flagTime);
|
|
|
-
|
|
|
+
|
|
|
//在这判断负面情绪是否足够5个
|
|
|
if (this.interveneId != 5) {
|
|
|
// let paramsSave = {
|
|
@@ -1048,6 +1052,10 @@ export default {
|
|
|
from1: HeadImg,
|
|
|
});
|
|
|
}
|
|
|
+ let contant1 = document.getElementById("contant1");
|
|
|
+ this.sleep(101).then(() => {
|
|
|
+ contant1.scrollTop = contant1.scrollHeight;
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
|
|
@@ -1123,7 +1131,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
//上一次的id
|
|
|
-
|
|
|
+
|
|
|
this.chatContents[this.chatContents.length - 1] = {
|
|
|
from: 2,
|
|
|
isScale: false,
|
|
@@ -1258,63 +1266,6 @@ export default {
|
|
|
let score = Number(testResult[0].newTableContext.result[0].score);
|
|
|
sessionStorage.setItem("testResultsScore", score);
|
|
|
this.getNext(this.currentId);
|
|
|
- // if (score >= 26 && score <= 52) {
|
|
|
- // this.chatContents.push({
|
|
|
- // from: 1,
|
|
|
- // isScale: false,
|
|
|
- // isType: -1,
|
|
|
- // question:
|
|
|
- // "您的情绪状态在正常范围内。请继续保持积极心态,关注生活中的美好,预防抑郁情绪。如有需要,随时与我沟通,共同守护您的心理健康。",
|
|
|
- // from1: HeadImg,
|
|
|
- // });
|
|
|
- // let contant1 = document.getElementById("contant1");
|
|
|
- // this.sleep(101).then(() => {
|
|
|
- // contant1.scrollTop = contant1.scrollHeight;
|
|
|
- // });
|
|
|
- // this.getNext(this.currentId);
|
|
|
- // } else if (score >= 53 && score <= 62) {
|
|
|
- // this.chatContents.push({
|
|
|
- // from: 1,
|
|
|
- // isScale: false,
|
|
|
- // isType: -1,
|
|
|
- // question:
|
|
|
- // "您可能正经历轻度抑郁。请放心,我会为您提供专业的心理支持,帮助您学习情绪调节技巧,及时缓解抑郁情绪。我们一起努力,让心情重回明朗。",
|
|
|
- // from1: HeadImg,
|
|
|
- // });
|
|
|
- // let contant1 = document.getElementById("contant1");
|
|
|
- // this.sleep(101).then(() => {
|
|
|
- // contant1.scrollTop = contant1.scrollHeight;
|
|
|
- // });
|
|
|
- // this.getNext(this.currentId);
|
|
|
- // } else if (score >= 63 && score <= 72) {
|
|
|
- // this.chatContents.push({
|
|
|
- // from: 1,
|
|
|
- // isScale: false,
|
|
|
- // isType: -1,
|
|
|
- // question:
|
|
|
- // "您的抑郁症状已较为明显。我强烈建议您接受专业的心理治疗,如CBT等,以改善当前状况。我会与您并肩作战,共同应对这个挑战,助您早日走出阴霾。",
|
|
|
- // from1: HeadImg,
|
|
|
- // });
|
|
|
- // let contant1 = document.getElementById("contant1");
|
|
|
- // this.sleep(101).then(() => {
|
|
|
- // contant1.scrollTop = contant1.scrollHeight;
|
|
|
- // });
|
|
|
- // this.getNext(this.currentId);
|
|
|
- // } else if (score >= 73 && score <= 100) {
|
|
|
- // this.chatContents.push({
|
|
|
- // from: 1,
|
|
|
- // isScale: false,
|
|
|
- // isType: -1,
|
|
|
- // question:
|
|
|
- // "您可能正面临严重的抑郁症状。这是一个紧急状况,我强烈建议您立即寻求专业医疗帮助,包括药物治疗和精神评估。我会全力支持您,与您共度难关,直至您重拾生活的希望。",
|
|
|
- // from1: HeadImg,
|
|
|
- // });
|
|
|
- // let contant1 = document.getElementById("contant1");
|
|
|
- // this.sleep(101).then(() => {
|
|
|
- // contant1.scrollTop = contant1.scrollHeight;
|
|
|
- // });
|
|
|
- // this.getNext(this.currentId);
|
|
|
- // }
|
|
|
} else if (this.interveneId == 3) {
|
|
|
this.chatContents.push({
|
|
|
from: 1,
|