瀏覽代碼

修改版本号

plg 1 年之前
父節點
當前提交
33accba2ae
共有 2 個文件被更改,包括 18 次插入67 次删除
  1. 2 2
      src/renderer/components/TopPage.vue
  2. 16 65
      src/renderer/components/treatDepression.vue

+ 2 - 2
src/renderer/components/TopPage.vue

@@ -107,9 +107,9 @@
             本计算机程序受著作权法和国际公约的保护,未经授权擅自复制或传播本程序的部分或全部,
             可能受到严厉的民事及刑事制裁,并将在法律许可的范围内受到最大可能的起诉.
           </p>
-          <p><span>Version:</span> 1.2.7</p>
+          <p><span>Version:</span> 1.2.8</p>
           <p><span>Build:</span>#fdfd1a6073</p>
-          <p><span>Build on:</span>2024/04/10</p>
+          <p><span>Build on:</span>2024/04/11</p>
           <p><span>Windows:</span>{{ windowsVersion }}</p>
         </el-col>
       </el-row>

+ 16 - 65
src/renderer/components/treatDepression.vue

@@ -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,