|
@@ -23,7 +23,7 @@
|
|
<div class="message-wrapper message-wrapper-left">
|
|
<div class="message-wrapper message-wrapper-left">
|
|
<div class="message" v-if="content.isScale">
|
|
<div class="message" v-if="content.isScale">
|
|
<el-radio-group
|
|
<el-radio-group
|
|
- v-model="answerList[content.index].answer"
|
|
|
|
|
|
+ v-model="answerList[content.index].checkItems"
|
|
@input="nextHandle(content.index)"
|
|
@input="nextHandle(content.index)"
|
|
:disabled="content.disabled"
|
|
:disabled="content.disabled"
|
|
>
|
|
>
|
|
@@ -233,7 +233,7 @@ export default {
|
|
disabled: false,
|
|
disabled: false,
|
|
question: result,
|
|
question: result,
|
|
from1: HeadImg,
|
|
from1: HeadImg,
|
|
- radio: ''
|
|
|
|
|
|
+ radio: "",
|
|
});
|
|
});
|
|
let contant1 = document.getElementById("contant1");
|
|
let contant1 = document.getElementById("contant1");
|
|
this.sleep(101).then(() => {
|
|
this.sleep(101).then(() => {
|
|
@@ -251,7 +251,7 @@ export default {
|
|
for (var i = 0; i < data.length; i++) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
anwserListx.push({
|
|
anwserListx.push({
|
|
answer: data[i].answer,
|
|
answer: data[i].answer,
|
|
- checkItems: data[i].checkItems,
|
|
|
|
|
|
+ checkItems: "",
|
|
flag: data[i].flag,
|
|
flag: data[i].flag,
|
|
id: data[i].id,
|
|
id: data[i].id,
|
|
questionNo: data[i].questionNo,
|
|
questionNo: data[i].questionNo,
|
|
@@ -331,33 +331,34 @@ export default {
|
|
res.data.data.userRecordEntity.testResult
|
|
res.data.data.userRecordEntity.testResult
|
|
);
|
|
);
|
|
let score = Number(testResult[0].newTableContext.result[0].score);
|
|
let score = Number(testResult[0].newTableContext.result[0].score);
|
|
- // if (score < 10) {
|
|
|
|
- // this.chatContents.push({
|
|
|
|
- // index: 0,
|
|
|
|
- // from: 1,
|
|
|
|
- // isScale: false,
|
|
|
|
- // question: "根据测试,你很健康,无抑郁表现",
|
|
|
|
- // from1: HeadImg,
|
|
|
|
- // });
|
|
|
|
- // } else if (score < 19) {
|
|
|
|
- // this.getNext("轻度抑郁或有抑郁症状");
|
|
|
|
- // } else {
|
|
|
|
- // this.getNext("重度抑郁");
|
|
|
|
- // }
|
|
|
|
- this.getNext("轻度抑郁或有抑郁症状");
|
|
|
|
|
|
+ debugger;
|
|
|
|
+ if (score < 10) {
|
|
|
|
+ this.chatContents.push({
|
|
|
|
+ index: 0,
|
|
|
|
+ from: 1,
|
|
|
|
+ isScale: false,
|
|
|
|
+ question: "根据测试,你很健康,无抑郁表现",
|
|
|
|
+ from1: HeadImg,
|
|
|
|
+ });
|
|
|
|
+ } else if (score < 19) {
|
|
|
|
+ this.getNext("轻度抑郁或有抑郁症状");
|
|
|
|
+ } else {
|
|
|
|
+ this.getNext("重度抑郁");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
getNext(result) {
|
|
getNext(result) {
|
|
this.$http.get(
|
|
this.$http.get(
|
|
- `chat/getNextQuestionByScaleResult?label=2&result=${result}`,{},
|
|
|
|
|
|
+ `chat/getNextQuestionByScaleResult?label=2&result=${result}`,
|
|
|
|
+ {},
|
|
(res) => {
|
|
(res) => {
|
|
- if(res.code == 200) {
|
|
|
|
- if(res.data && res.data.nextQuestionNo) {
|
|
|
|
- this.getQuestion(res.data.nextQuestionNo);
|
|
|
|
- }
|
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ if (res.data && res.data.nextQuestionNo) {
|
|
|
|
+ this.getQuestion(res.data.nextQuestionNo);
|
|
}
|
|
}
|
|
|
|
+ }
|
|
}
|
|
}
|
|
);
|
|
);
|
|
},
|
|
},
|