|
@@ -9,8 +9,6 @@
|
|
: true
|
|
: true
|
|
"
|
|
"
|
|
>
|
|
>
|
|
- <AnswerTitle :judgeAnswer="judgeAnswer" />
|
|
|
|
-
|
|
|
|
<div class="main">
|
|
<div class="main">
|
|
<div style="text-align: center">{{ curQue.title }}</div>
|
|
<div style="text-align: center">{{ curQue.title }}</div>
|
|
<div :id="'container' + number" class="container">
|
|
<div :id="'container' + number" class="container">
|
|
@@ -35,14 +33,13 @@
|
|
alt=""
|
|
alt=""
|
|
@load="conImageload"
|
|
@load="conImageload"
|
|
/>
|
|
/>
|
|
|
|
+ <!--
|
|
|
|
+ judgeAnswer == 'standardAnswer' ? 'correct' : '',
|
|
|
|
+
|
|
|
|
+ -->
|
|
<div
|
|
<div
|
|
class="text"
|
|
class="text"
|
|
- :class="[
|
|
|
|
- 'left' + index,
|
|
|
|
-
|
|
|
|
- judgeAnswer == 'standardAnswer' ? 'correct' : '',
|
|
|
|
- YouranswerClass(item, 'left'),
|
|
|
|
- ]"
|
|
|
|
|
|
+ :class="['left' + index, YouranswerClass(item, 'left')]"
|
|
v-if="
|
|
v-if="
|
|
item.detail.wordsList.length > 0 || item.detail.sentence
|
|
item.detail.wordsList.length > 0 || item.detail.sentence
|
|
"
|
|
"
|
|
@@ -154,13 +151,13 @@
|
|
alt=""
|
|
alt=""
|
|
@load="conImageload"
|
|
@load="conImageload"
|
|
/>
|
|
/>
|
|
|
|
+ <!--
|
|
|
|
+ judgeAnswer == 'standardAnswer' ? 'correct' : '',
|
|
|
|
+
|
|
|
|
+ -->
|
|
<div
|
|
<div
|
|
class="text"
|
|
class="text"
|
|
- :class="[
|
|
|
|
- 'right' + index,
|
|
|
|
- judgeAnswer == 'standardAnswer' ? 'correct' : '',
|
|
|
|
- YouranswerClass(item, 'right'),
|
|
|
|
- ]"
|
|
|
|
|
|
+ :class="['right' + index, YouranswerClass(item, 'right')]"
|
|
v-if="
|
|
v-if="
|
|
item.detail.wordsList.length > 0 || item.detail.sentence
|
|
item.detail.wordsList.length > 0 || item.detail.sentence
|
|
"
|
|
"
|
|
@@ -269,23 +266,36 @@ export default {
|
|
YouranswerClass(item, type) {
|
|
YouranswerClass(item, type) {
|
|
if (
|
|
if (
|
|
this.judgeAnswer == "studentAnswer" ||
|
|
this.judgeAnswer == "studentAnswer" ||
|
|
- this.judgeAnswer == "userAnswer"
|
|
|
|
|
|
+ this.judgeAnswer == "userAnswer" ||
|
|
|
|
+ this.judgeAnswer == "standardAnswer"
|
|
) {
|
|
) {
|
|
let clss = "";
|
|
let clss = "";
|
|
this.data.data.forEach((items) => {
|
|
this.data.data.forEach((items) => {
|
|
if (type == "left") {
|
|
if (type == "left") {
|
|
- if (items.source == item.nodeId) {
|
|
|
|
- if (items.correct) {
|
|
|
|
- clss = "correct";
|
|
|
|
- } else if (items.error) {
|
|
|
|
|
|
+ if (items.source) {
|
|
|
|
+ if (items.source == item.nodeId) {
|
|
|
|
+ if (items.correct) {
|
|
|
|
+ clss = "correct";
|
|
|
|
+ } else if (items.error) {
|
|
|
|
+ clss = "error";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (items.error) {
|
|
clss = "error";
|
|
clss = "error";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (items.target == item.nodeId) {
|
|
|
|
- if (items.correct) {
|
|
|
|
- clss = "correct";
|
|
|
|
- } else if (items.error) {
|
|
|
|
|
|
+ if (items.target) {
|
|
|
|
+ if (items.target == item.nodeId) {
|
|
|
|
+ if (items.correct) {
|
|
|
|
+ clss = "correct";
|
|
|
|
+ } else if (items.error) {
|
|
|
|
+ clss = "error";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (items.error) {
|
|
clss = "error";
|
|
clss = "error";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -523,7 +533,20 @@ export default {
|
|
if (flag) {
|
|
if (flag) {
|
|
this.data.userAnswerJudge = "[JUDGE##T##JUDGE]";
|
|
this.data.userAnswerJudge = "[JUDGE##T##JUDGE]";
|
|
} else {
|
|
} else {
|
|
- this.data.userAnswerJudge = "[JUDGE##F##JUDGE]";
|
|
|
|
|
|
+ let isanswer = false;
|
|
|
|
+ this.curQue.con.forEach((con) => {
|
|
|
|
+ if (
|
|
|
|
+ Object.prototype.toString.call(con.AnswerList).indexOf("Number") !=
|
|
|
|
+ -1
|
|
|
|
+ ) {
|
|
|
|
+ isanswer = true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if (isanswer) {
|
|
|
|
+ this.data.userAnswerJudge = "[JUDGE##F##JUDGE]";
|
|
|
|
+ } else {
|
|
|
|
+ this.data.userAnswerJudge = "";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -644,6 +667,7 @@ export default {
|
|
this.data.data.push({
|
|
this.data.data.push({
|
|
source: item.nodeId,
|
|
source: item.nodeId,
|
|
target: this.curQue.option[item.AnswerList].nodeId,
|
|
target: this.curQue.option[item.AnswerList].nodeId,
|
|
|
|
+ correct: true,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -665,6 +689,16 @@ export default {
|
|
item.error = true;
|
|
item.error = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ if (
|
|
|
|
+ Object.prototype.toString
|
|
|
|
+ .call(con.AnswerList)
|
|
|
|
+ .indexOf("Number") != -1
|
|
|
|
+ ) {
|
|
|
|
+ if (item.correct != true) {
|
|
|
|
+ item.error = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|