|
@@ -39,7 +39,7 @@
|
|
<td :rowspan="item.countNum" v-if="item.countNum">{{item.section}}</td>
|
|
<td :rowspan="item.countNum" v-if="item.countNum">{{item.section}}</td>
|
|
<td>{{item.number}}</td>
|
|
<td>{{item.number}}</td>
|
|
<td>{{item.answer}}</td>
|
|
<td>{{item.answer}}</td>
|
|
- <td>{{item.wrongAnswer?item.wrongAnswer:item.answer}}</td>
|
|
|
|
|
|
+ <td :style="{'color':item.wrongAnswer?'red':'black'}">{{item.wrongAnswer?item.wrongAnswer:item.answer}}</td>
|
|
<!-- <td></td> -->
|
|
<!-- <td></td> -->
|
|
<td :style="{'color':item.wrongAnswer?'red':'black'}">{{item.wrongAnswer?'错误':'正确'}}</td>
|
|
<td :style="{'color':item.wrongAnswer?'red':'black'}">{{item.wrongAnswer?'错误':'正确'}}</td>
|
|
</tr>
|
|
</tr>
|
|
@@ -69,14 +69,16 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ console.log(this.$route.query.resultId);
|
|
getPaperById(this.$route.params.pid).then((result) => {
|
|
getPaperById(this.$route.params.pid).then((result) => {
|
|
this.paper = result;
|
|
this.paper = result;
|
|
this.setIndexStart(result.sectionNums).forEach((item) => {
|
|
this.setIndexStart(result.sectionNums).forEach((item) => {
|
|
this.paper.questions[item.index].countNum = item.num
|
|
this.paper.questions[item.index].countNum = item.num
|
|
})
|
|
})
|
|
getCommitPaperListSimple(this.$route.params.uid,this.$route.params.pid).then((result2) => {
|
|
getCommitPaperListSimple(this.$route.params.uid,this.$route.params.pid).then((result2) => {
|
|
- this.user.name = result2.t[0].uname;
|
|
|
|
- let wrongList = JSON.parse(result2.t[0].wrongAnswerContrast);
|
|
|
|
|
|
+ let index = result2.t.findIndex((value) => value.id == this.$route.query.resultId);
|
|
|
|
+ this.user.name = result2.t[index].uname;
|
|
|
|
+ let wrongList = JSON.parse(result2.t[index].wrongAnswerContrast);
|
|
wrongList.forEach((item) => {
|
|
wrongList.forEach((item) => {
|
|
this.paper.questions[item.number - 1].wrongAnswer = item.options == ''?'无':item.options;
|
|
this.paper.questions[item.number - 1].wrongAnswer = item.options == ''?'无':item.options;
|
|
this.paper.questions[item.number - 1].useTime = item.useTime;
|
|
this.paper.questions[item.number - 1].useTime = item.useTime;
|