|
@@ -41,6 +41,7 @@
|
|
|
@input="nextHandle(content.index)"
|
|
|
>
|
|
|
<el-radio
|
|
|
+ style='width:100%'
|
|
|
v-for="(item, index) in content.question"
|
|
|
:key="index"
|
|
|
size="small"
|
|
@@ -82,6 +83,7 @@
|
|
|
@input="chooseAnswer"
|
|
|
>
|
|
|
<el-radio
|
|
|
+ style='width:100%'
|
|
|
v-for="item in content.question"
|
|
|
:key="item.id"
|
|
|
size="small"
|
|
@@ -264,8 +266,8 @@ export default {
|
|
|
this.answerList[this.chatContents[i].index].checkItems,
|
|
|
};
|
|
|
list.push(ob);
|
|
|
- }else if(this.chatContents[i].isType == 5){
|
|
|
- let ob = {
|
|
|
+ } else if (this.chatContents[i].isType == 5) {
|
|
|
+ let ob = {
|
|
|
from: 2,
|
|
|
question:
|
|
|
this.answerList[this.chatContents[i].index].checkItems,
|
|
@@ -526,7 +528,33 @@ export default {
|
|
|
chooseAnswer(id) {
|
|
|
console.log("下一题编号");
|
|
|
console.log(id);
|
|
|
- this.getQuestion(id);
|
|
|
+ if (id == "") {
|
|
|
+ this.chatContents.push({
|
|
|
+ //是问题还是答案
|
|
|
+ from: 1,
|
|
|
+ //是否是量表的信息
|
|
|
+ isScale: false,
|
|
|
+ //是单选还是文字 0单选 1填空 -1描述
|
|
|
+ isType: -1,
|
|
|
+ //可点击可不点击 0单选 1填空
|
|
|
+ disabled: false,
|
|
|
+ //问题
|
|
|
+ question: "对话结束",
|
|
|
+ //头像
|
|
|
+ from1: HeadImg,
|
|
|
+ });
|
|
|
+ this.saveChat();
|
|
|
+ let contant1 = document.getElementById("contant1");
|
|
|
+ this.sleep(101).then(() => {
|
|
|
+ contant1.scrollTop = contant1.scrollHeight;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.getQuestion(id);
|
|
|
+ }
|
|
|
+ //如果判断id为空
|
|
|
+ // if(){
|
|
|
+
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
// 量表选中切换下一题
|
|
@@ -673,6 +701,15 @@ export default {
|
|
|
from1: HeadImg,
|
|
|
});
|
|
|
this.getQuestion(44);
|
|
|
+ } else if (this.interveneId == 4) {
|
|
|
+ this.chatContents.push({
|
|
|
+ from: 1,
|
|
|
+ isScale: false,
|
|
|
+ isType: -1,
|
|
|
+ question: res.data.data.userRecordEntity.testResults,
|
|
|
+ from1: HeadImg,
|
|
|
+ });
|
|
|
+ this.getQuestion(46);
|
|
|
}
|
|
|
}
|
|
|
});
|