|
@@ -1,20 +1,30 @@
|
|
|
<template>
|
|
|
- <div class="lesson-test-report" v-if="renderComponent">
|
|
|
- <loading :active.sync="isLoading"
|
|
|
+ <div class="lesson-test-report">
|
|
|
+
|
|
|
+ <!--<loading :active.sync="isLoading"
|
|
|
:is-full-page="false"
|
|
|
- background-color="#fff"
|
|
|
- :opacity="0">
|
|
|
- </loading>
|
|
|
-
|
|
|
- <br />
|
|
|
- <div class="scoreboard" v-show='testState == 1'>
|
|
|
- <span @click="showTest" style="color: #03966a;width: 100%;cursor: pointer;font-size:18px;font-weight: 800;text-align: center">前往作答</span>
|
|
|
- </div>
|
|
|
- <div class="scoreboard" v-show='testState == 2'>
|
|
|
- <h4>成绩尚未结算</h4>
|
|
|
- </div>
|
|
|
- <div class="scoreboard" v-if='testState == 3'>
|
|
|
- <Row :gutter="20">
|
|
|
+ background-color="#000"
|
|
|
+ :opacity="opacity">
|
|
|
+ <template slot="default">
|
|
|
+ <svg-icon icon-class="loader" class="loader-icon" />-->
|
|
|
+ <!--<div class="aclassoneloading">Loading...</div>-->
|
|
|
+ <!--</template>
|
|
|
+ </loading>-->
|
|
|
+ <!--<div class="scoreboard" >
|
|
|
+
|
|
|
+ </div>-->
|
|
|
+ <div class="scoreboard">
|
|
|
+ <!--<loading :active.sync="isLoading"
|
|
|
+ :opacity="0"
|
|
|
+ :width="50"
|
|
|
+ :height="50">
|
|
|
+ <template slot="default">
|
|
|
+ <svg-icon icon-class="loader" class="loader-icon" />
|
|
|
+ </template>
|
|
|
+ </loading>-->
|
|
|
+ <span v-show='testState == 1' @click="showTest" style="color: #03966a;width: 100%;cursor: pointer;font-size:18px;font-weight: 800;text-align: center">前往作答</span>
|
|
|
+ <h4 v-show='testState == 2'>成绩尚未结算</h4>
|
|
|
+ <Row :gutter="20" v-if='testState == 3'>
|
|
|
<i-col :xs="24" :sm="24" :md="24" :lg="12">
|
|
|
<Row :gutter="20">
|
|
|
<i-col :xs="24" :sm="24" :md="12" :lg="12">
|
|
@@ -30,7 +40,7 @@
|
|
|
<p class="card-title">{{$t('studentWeb.exam.difficulty')}}</p>
|
|
|
<div class="difficulty-rate">
|
|
|
<Rate class allow-half disabled v-model="difficultyRate" />
|
|
|
- <span class="difficulty-rate-num">{{ this.difficultyRate }}</span>
|
|
|
+ <span class="difficulty-rate-num">{{difficultyRate }}</span>
|
|
|
</div>
|
|
|
</Card>
|
|
|
</i-col>
|
|
@@ -79,141 +89,141 @@
|
|
|
<br />
|
|
|
|
|
|
<!--<div class="QAsheet" v-if='!isLoading'>
|
|
|
- <div class="title-rect-group">
|
|
|
- <div class="title-rect" />
|
|
|
- <h2 class="title-rect-name">{{$t('studentWeb.exam.reviewAnswers')}}</h2>
|
|
|
- </div>-->
|
|
|
+ <div class="title-rect-group">
|
|
|
+ <div class="title-rect" />
|
|
|
+ <h2 class="title-rect-name">{{$t('studentWeb.exam.reviewAnswers')}}</h2>
|
|
|
+ </div>-->
|
|
|
<!--<div class="filterBtn">
|
|
|
- <br />
|
|
|
- <label class="checkAns">
|
|
|
- <input type="checkbox" value="答對" v-model="checkedAns" />
|
|
|
- <span>{{$t('studentWeb.exam.correctAnswer')}}:{{ ansRightSum()[0] }}</span>
|
|
|
- <div class="rightBtn"></div>
|
|
|
- </label>
|
|
|
- <label class="checkAns">
|
|
|
- <input type="checkbox" value="答錯" v-model="checkedAns" />
|
|
|
- <span>{{$t('studentWeb.exam.wrongAnswer')}}:{{ ansRightSum()[1] }}</span>
|
|
|
- <div class="wrongBtn"></div>
|
|
|
- </label>
|
|
|
- <label class="checkAns">
|
|
|
- <input type="checkbox" value="未答" v-model="checkedAns" />
|
|
|
- <span>{{$t('studentWeb.exam.unAnswered')}}:{{ ansRightSum()[2] }}</span>
|
|
|
- <div class="noAnsBtn"></div>
|
|
|
- </label>
|
|
|
- </div>-->
|
|
|
+ <br />
|
|
|
+ <label class="checkAns">
|
|
|
+ <input type="checkbox" value="答對" v-model="checkedAns" />
|
|
|
+ <span>{{$t('studentWeb.exam.correctAnswer')}}:{{ ansRightSum()[0] }}</span>
|
|
|
+ <div class="rightBtn"></div>
|
|
|
+ </label>
|
|
|
+ <label class="checkAns">
|
|
|
+ <input type="checkbox" value="答錯" v-model="checkedAns" />
|
|
|
+ <span>{{$t('studentWeb.exam.wrongAnswer')}}:{{ ansRightSum()[1] }}</span>
|
|
|
+ <div class="wrongBtn"></div>
|
|
|
+ </label>
|
|
|
+ <label class="checkAns">
|
|
|
+ <input type="checkbox" value="未答" v-model="checkedAns" />
|
|
|
+ <span>{{$t('studentWeb.exam.unAnswered')}}:{{ ansRightSum()[2] }}</span>
|
|
|
+ <div class="noAnsBtn"></div>
|
|
|
+ </label>
|
|
|
+ </div>-->
|
|
|
<!--<div @click="closeDetail()">
|
|
|
- <svg-icon
|
|
|
- icon-class="AnsWerDetail"
|
|
|
- :class="{
|
|
|
- ansDetail: !closeAnsDetail,
|
|
|
- closeAnsDetail: closeAnsDetail,
|
|
|
- }"
|
|
|
- />
|
|
|
- </div>-->
|
|
|
+ <svg-icon
|
|
|
+ icon-class="AnsWerDetail"
|
|
|
+ :class="{
|
|
|
+ ansDetail: !closeAnsDetail,
|
|
|
+ closeAnsDetail: closeAnsDetail,
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ </div>-->
|
|
|
<!--<br style="clear:both" />-->
|
|
|
<!--<div class="qcontent">
|
|
|
- <div
|
|
|
- class="qcol"
|
|
|
- v-for="(question, index) in mockQASheet"
|
|
|
- v-show=" index < 10 && checkedAnsFilter(checkedAns, question.rightAns, question.MyAns)"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <Row :gutter="10">
|
|
|
- <i-col :xs="1" :sm="1" :md="1" :lg="1">
|
|
|
- <div class="qAnsCondition">
|
|
|
- <svg-icon
|
|
|
- class="qIcon"
|
|
|
- v-show="question.rightAns == question.MyAns"
|
|
|
- icon-class="rightAns"
|
|
|
- />
|
|
|
- <svg-icon
|
|
|
- class="qIcon"
|
|
|
- v-show="
|
|
|
- question.rightAns != question.MyAns && question.MyAns != ''
|
|
|
- "
|
|
|
- icon-class="wrongAns"
|
|
|
- />
|
|
|
- <svg-icon class="qIcon" v-show="question.MyAns == ''" icon-class="noAns" />
|
|
|
- </div>
|
|
|
- </i-col>
|
|
|
- <i-col :xs="2" :sm="2" :md="2" :lg="1">
|
|
|
- <div class="qtype" :class="{'qtypeEn':getCurrentLang()=='en'}">{{ transQtypetoEn(question.qtype) }}</div>
|
|
|
-
|
|
|
- </i-col>
|
|
|
- <i-col :xs="18" :sm="18" :md="20" :lg="21">
|
|
|
- <div class="qdesc">{{ index + 1 }}. {{ question.questionDesc }}</div>
|
|
|
- </i-col>
|
|
|
- <i-col :xs="2" :sm="2" :md="1" :lg="1">
|
|
|
- <div class="qScore">
|
|
|
- <span
|
|
|
- v-show="
|
|
|
- question.MyAns == '' || question.rightAns != question.MyAns
|
|
|
- "
|
|
|
- >0</span>
|
|
|
- <span v-show="question.rightAns == question.MyAns">10</span>/10
|
|
|
- </div>
|
|
|
- </i-col>
|
|
|
- </Row>
|
|
|
- <div class="qAnaly" :class="{ hideqAnaly: closeAnsDetail }">
|
|
|
- <li class="rightAns">
|
|
|
- <div class="qAnserlist">
|
|
|
- <br />
|
|
|
- <div class="TitleRec1"></div>{{$t('studentWeb.exam.solution')}}:
|
|
|
- <br />
|
|
|
- <li
|
|
|
- :class="{
|
|
|
- rightAnsItem: question.rightAns == 'A',
|
|
|
- wrongAnsItem:
|
|
|
- question.rightAns != question.MyAns &&
|
|
|
- question.MyAns == 'A',
|
|
|
- }"
|
|
|
- >(A){{ question.ansDesc[0] }}</li>
|
|
|
- <li
|
|
|
- :class="{
|
|
|
- rightAnsItem: question.rightAns == 'B',
|
|
|
- wrongAnsItem:
|
|
|
- question.rightAns != question.MyAns &&
|
|
|
- question.MyAns == 'B',
|
|
|
- }"
|
|
|
- >(B){{ question.ansDesc[1] }}</li>
|
|
|
- <li
|
|
|
- :class="{
|
|
|
- rightAnsItem: question.rightAns == 'C',
|
|
|
- wrongAnsItem:
|
|
|
- question.rightAns != question.MyAns &&
|
|
|
- question.MyAns == 'C',
|
|
|
- }"
|
|
|
- >(C){{ question.ansDesc[2] }}</li>
|
|
|
- <li
|
|
|
- :class="{
|
|
|
- rightAnsItem: question.rightAns == 'D',
|
|
|
- wrongAnsItem:
|
|
|
- question.rightAns != question.MyAns &&
|
|
|
- question.MyAns == 'D',
|
|
|
- }"
|
|
|
- >(D){{ question.ansDesc[3] }}</li>
|
|
|
- </div>
|
|
|
- <br />
|
|
|
- </li>
|
|
|
- <li class="rightAnalys">
|
|
|
- <div class="TitleRec2"></div>
|
|
|
- {{$t('studentWeb.exam.analysis')}}: {{ question.questionDesc }}
|
|
|
- </li>
|
|
|
+ <div
|
|
|
+ class="qcol"
|
|
|
+ v-for="(question, index) in mockQASheet"
|
|
|
+ v-show=" index < 10 && checkedAnsFilter(checkedAns, question.rightAns, question.MyAns)"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <Row :gutter="10">
|
|
|
+ <i-col :xs="1" :sm="1" :md="1" :lg="1">
|
|
|
+ <div class="qAnsCondition">
|
|
|
+ <svg-icon
|
|
|
+ class="qIcon"
|
|
|
+ v-show="question.rightAns == question.MyAns"
|
|
|
+ icon-class="rightAns"
|
|
|
+ />
|
|
|
+ <svg-icon
|
|
|
+ class="qIcon"
|
|
|
+ v-show="
|
|
|
+ question.rightAns != question.MyAns && question.MyAns != ''
|
|
|
+ "
|
|
|
+ icon-class="wrongAns"
|
|
|
+ />
|
|
|
+ <svg-icon class="qIcon" v-show="question.MyAns == ''" icon-class="noAns" />
|
|
|
+ </div>
|
|
|
+ </i-col>
|
|
|
+ <i-col :xs="2" :sm="2" :md="2" :lg="1">
|
|
|
+ <div class="qtype" :class="{'qtypeEn':getCurrentLang()=='en'}">{{ transQtypetoEn(question.qtype) }}</div>
|
|
|
+
|
|
|
+ </i-col>
|
|
|
+ <i-col :xs="18" :sm="18" :md="20" :lg="21">
|
|
|
+ <div class="qdesc">{{ index + 1 }}. {{ question.questionDesc }}</div>
|
|
|
+ </i-col>
|
|
|
+ <i-col :xs="2" :sm="2" :md="1" :lg="1">
|
|
|
+ <div class="qScore">
|
|
|
+ <span
|
|
|
+ v-show="
|
|
|
+ question.MyAns == '' || question.rightAns != question.MyAns
|
|
|
+ "
|
|
|
+ >0</span>
|
|
|
+ <span v-show="question.rightAns == question.MyAns">10</span>/10
|
|
|
+ </div>
|
|
|
+ </i-col>
|
|
|
+ </Row>
|
|
|
+ <div class="qAnaly" :class="{ hideqAnaly: closeAnsDetail }">
|
|
|
+ <li class="rightAns">
|
|
|
+ <div class="qAnserlist">
|
|
|
<br />
|
|
|
- <li>
|
|
|
- <div class="TitleRec3"></div>
|
|
|
- {{$t('studentWeb.exam.correctRate')}}: {{ question.rightrate }}%
|
|
|
- </li>
|
|
|
+ <div class="TitleRec1"></div>{{$t('studentWeb.exam.solution')}}:
|
|
|
<br />
|
|
|
- <li>
|
|
|
- <div class="TitleRec3"></div>{{$t('studentWeb.exam.relatedAQues')}}:
|
|
|
- <ol class="related-question">
|
|
|
- <li>{{ question.relatedQ1 }}?</li>
|
|
|
- <li>{{ question.relatedQ2 }}?</li>
|
|
|
- </ol>
|
|
|
- </li>
|
|
|
+ <li
|
|
|
+ :class="{
|
|
|
+ rightAnsItem: question.rightAns == 'A',
|
|
|
+ wrongAnsItem:
|
|
|
+ question.rightAns != question.MyAns &&
|
|
|
+ question.MyAns == 'A',
|
|
|
+ }"
|
|
|
+ >(A){{ question.ansDesc[0] }}</li>
|
|
|
+ <li
|
|
|
+ :class="{
|
|
|
+ rightAnsItem: question.rightAns == 'B',
|
|
|
+ wrongAnsItem:
|
|
|
+ question.rightAns != question.MyAns &&
|
|
|
+ question.MyAns == 'B',
|
|
|
+ }"
|
|
|
+ >(B){{ question.ansDesc[1] }}</li>
|
|
|
+ <li
|
|
|
+ :class="{
|
|
|
+ rightAnsItem: question.rightAns == 'C',
|
|
|
+ wrongAnsItem:
|
|
|
+ question.rightAns != question.MyAns &&
|
|
|
+ question.MyAns == 'C',
|
|
|
+ }"
|
|
|
+ >(C){{ question.ansDesc[2] }}</li>
|
|
|
+ <li
|
|
|
+ :class="{
|
|
|
+ rightAnsItem: question.rightAns == 'D',
|
|
|
+ wrongAnsItem:
|
|
|
+ question.rightAns != question.MyAns &&
|
|
|
+ question.MyAns == 'D',
|
|
|
+ }"
|
|
|
+ >(D){{ question.ansDesc[3] }}</li>
|
|
|
</div>
|
|
|
- </div>-->
|
|
|
+ <br />
|
|
|
+ </li>
|
|
|
+ <li class="rightAnalys">
|
|
|
+ <div class="TitleRec2"></div>
|
|
|
+ {{$t('studentWeb.exam.analysis')}}: {{ question.questionDesc }}
|
|
|
+ </li>
|
|
|
+ <br />
|
|
|
+ <li>
|
|
|
+ <div class="TitleRec3"></div>
|
|
|
+ {{$t('studentWeb.exam.correctRate')}}: {{ question.rightrate }}%
|
|
|
+ </li>
|
|
|
+ <br />
|
|
|
+ <li>
|
|
|
+ <div class="TitleRec3"></div>{{$t('studentWeb.exam.relatedAQues')}}:
|
|
|
+ <ol class="related-question">
|
|
|
+ <li>{{ question.relatedQ1 }}?</li>
|
|
|
+ <li>{{ question.relatedQ2 }}?</li>
|
|
|
+ </ol>
|
|
|
+ </li>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -238,18 +248,24 @@
|
|
|
default: () => {
|
|
|
return {}
|
|
|
}
|
|
|
+ },
|
|
|
+ paperInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {}
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
renderComponent: true,
|
|
|
//loading畫面
|
|
|
- isLoading: false,
|
|
|
+ isLoading: true,
|
|
|
opacity: 0.6,
|
|
|
//loading畫面
|
|
|
currentReportSubject: "國文",
|
|
|
closeAnsDetail: false,
|
|
|
- difficultyRate: 3.5,
|
|
|
+ //difficultyRate: 3.5,
|
|
|
RandomComment: Random.paragraph(1, 2),
|
|
|
RandomKeypoint: Random.paragraph(1, 3),
|
|
|
mockQASheet: mockQASheet.mockQASheet,
|
|
@@ -258,8 +274,8 @@
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.testState = 0
|
|
|
- this.testJudge()
|
|
|
+ this.testState = 0
|
|
|
+ this.testJudge()
|
|
|
},
|
|
|
methods: {
|
|
|
showTest() {
|
|
@@ -269,8 +285,7 @@
|
|
|
},
|
|
|
testJudge() {
|
|
|
if (this.examInfo.subject !== undefined) {
|
|
|
- console.log(this.examInfo)
|
|
|
- this.testState = 0
|
|
|
+ this.testState = 0
|
|
|
let k = 0
|
|
|
for (let item of this.examInfo.stuScore) {
|
|
|
if (item == -1) { //有未打分
|
|
@@ -288,7 +303,6 @@
|
|
|
} else if (k !== 0 && this.testState == 1) {
|
|
|
this.testState = 2 //未评分
|
|
|
}
|
|
|
- console.log(this.testState)
|
|
|
}
|
|
|
},
|
|
|
getCurrentLang() {
|
|
@@ -395,23 +409,30 @@
|
|
|
right: 0
|
|
|
}
|
|
|
if (this.examInfo.subject !== undefined) {
|
|
|
- info = {
|
|
|
+ info = {
|
|
|
all: this.examInfo.stuScore.length,
|
|
|
right: 0
|
|
|
}
|
|
|
for (let item of this.examInfo.stuScore) {
|
|
|
- if(item !== 0 && item !== -1)
|
|
|
- info.right++
|
|
|
+ if (item !== 0 && item !== -1)
|
|
|
+ info.right++
|
|
|
}
|
|
|
}
|
|
|
return info
|
|
|
- }
|
|
|
+ },
|
|
|
+ difficultyRate() {
|
|
|
+ let level = 0
|
|
|
+ if (this.paperInfo.item.length) {
|
|
|
+ let levelArr = this.paperInfo.item.map(i => i.level)
|
|
|
+ level = this._.meanBy(levelArr).toFixed(1)
|
|
|
+ }
|
|
|
+ return Number(level)
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
$route: {
|
|
|
handler(val, oldval) {
|
|
|
if (this.examInfo.subject !== undefined) {
|
|
|
- console.log(this.examInfo)
|
|
|
this.testState = 0
|
|
|
this.testJudge()
|
|
|
}
|