|
@@ -23,7 +23,7 @@
|
|
<!-- 题目问题 -->
|
|
<!-- 题目问题 -->
|
|
<div style="margin:20px 0 40px 0">
|
|
<div style="margin:20px 0 40px 0">
|
|
<!-- <Progress :value="questionHEAD" :maxValue="questionaire.questions.length" /> -->
|
|
<!-- <Progress :value="questionHEAD" :maxValue="questionaire.questions.length" /> -->
|
|
-
|
|
|
|
|
|
+ <mt-progress :value="percent" :bar-height="5" style="margin-top: -30px;"></mt-progress>
|
|
<div>
|
|
<div>
|
|
<span class="h3">{{questionHEAD + 1}}、</span>
|
|
<span class="h3">{{questionHEAD + 1}}、</span>
|
|
<span class="h3" style="margin-left: 5;">[</span>
|
|
<span class="h3" style="margin-left: 5;">[</span>
|
|
@@ -184,6 +184,11 @@
|
|
currentQuestion() {
|
|
currentQuestion() {
|
|
return this.questionaire.questions[this.questionHEAD];
|
|
return this.questionaire.questions[this.questionHEAD];
|
|
},
|
|
},
|
|
|
|
+ percent(){
|
|
|
|
+ let perc = (this.questionHEAD + 1) / this.questionaire.questions.length * 100;
|
|
|
|
+ console.log('percent', perc)
|
|
|
|
+ return perc;
|
|
|
|
+ },
|
|
questionType() {
|
|
questionType() {
|
|
let type = this.currentQuestion.type;
|
|
let type = this.currentQuestion.type;
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
@@ -444,7 +449,7 @@
|
|
questionId: questionId,
|
|
questionId: questionId,
|
|
answer: selectionIds.join(',')
|
|
answer: selectionIds.join(',')
|
|
};
|
|
};
|
|
- debugger;
|
|
|
|
|
|
+
|
|
if (this.currentQuestion.maxOptions == 1 && this.answerNote[selectionIds[0]]) {
|
|
if (this.currentQuestion.maxOptions == 1 && this.answerNote[selectionIds[0]]) {
|
|
this.answers[questionId].answerNote = this.answerNote[selectionIds[0]]
|
|
this.answers[questionId].answerNote = this.answerNote[selectionIds[0]]
|
|
} else if (this.currentQuestion.maxOptions > 1) {
|
|
} else if (this.currentQuestion.maxOptions > 1) {
|
|
@@ -488,7 +493,8 @@
|
|
return;
|
|
return;
|
|
} else if (hopToQuestionId > 0) {
|
|
} else if (hopToQuestionId > 0) {
|
|
// 跳转到某道题
|
|
// 跳转到某道题
|
|
- for (let i in this.questionaire.questions) {
|
|
|
|
|
|
+ // for (let i in this.questionaire.questions) {
|
|
|
|
+ for (let i = 0; i < this.questionaire.questions.length; i++) {
|
|
if (this.questionaire.questions[i].id == hopToQuestionId) {
|
|
if (this.questionaire.questions[i].id == hopToQuestionId) {
|
|
this.questionHEAD = i;
|
|
this.questionHEAD = i;
|
|
this.onQuestionLoaded();
|
|
this.onQuestionLoaded();
|