|
@@ -5,89 +5,91 @@
|
|
|
<span class="logout-icon" @click="openWarmMessage(1)">
|
|
|
<svg-icon icon-class="logout" />
|
|
|
</span>
|
|
|
- <span class="test-title">课程名称:罗老师小课堂</span>
|
|
|
+ <span class="test-title">{{ $t('studentWeb.baseInfo.subjectName')}}罗老师小课堂</span>
|
|
|
</div>
|
|
|
- <div class="answer-content" v-if="practiceType != 2 && practiceType != 5">
|
|
|
- <vuescroll>
|
|
|
- <!-- <div :class="['quertion-area', `size-${queNum}`, 'question-know']"> -->
|
|
|
- <div :class="['quertion-area', `size-${queNum}`]">
|
|
|
- <div class="header" v-show="practiceType != 1">
|
|
|
- <span>【多选题】</span>
|
|
|
- <p @click="onCollection">
|
|
|
- <Icon custom="iconfont icon-shoucang1" size="21" color="#3B660C" v-show="!iscollection"></Icon>
|
|
|
- <Icon custom="iconfont icon-shoucang2" size="21" color="#EA8F3E" v-show="iscollection"></Icon>
|
|
|
- <span>收藏</span>
|
|
|
- </p>
|
|
|
+ <template v-if="quesInfo">
|
|
|
+ <div class="answer-content" v-if="practiceType != 2 && practiceType != 5">
|
|
|
+ <vuescroll>
|
|
|
+ <!-- <div :class="['quertion-area', `size-${queNum}`, 'question-know']"> -->
|
|
|
+ <div :class="['quertion-area', `size-${queNum}`]">
|
|
|
+ <div class="header" v-show="practiceType != 1">
|
|
|
+ <span>【{{ testType[quesInfo.type] }}】</span>
|
|
|
+ <p @click="onCollection">
|
|
|
+ <Icon custom="iconfont icon-shoucang1" size="21" color="#3B660C" v-show="!iscollection"></Icon>
|
|
|
+ <Icon custom="iconfont icon-shoucang2" size="21" color="#EA8F3E" v-show="iscollection"></Icon>
|
|
|
+ <span>{{ $t('syllabus.save')}}</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div v-html="quesInfo.question"></div>
|
|
|
</div>
|
|
|
- <div v-html="question"></div>
|
|
|
- </div>
|
|
|
- <template v-if="practiceType === 3 || practiceType === 4">
|
|
|
- <div class="code-box" v-if="false">
|
|
|
- <div v-for="(item, index) in codeList" :key="index">
|
|
|
- <div :class="['code-block', isChecked(item.code) ? 'code-block-active' : '']" :tabIndex="index"
|
|
|
- @click="onAnswerCheck(item, index)" :style="{'cursor': practiceType === 3 ? 'pointer' : 'no-drop'}"
|
|
|
- >
|
|
|
- <span class="code-label">{{ item.code }}</span>
|
|
|
- <span v-html="item.value"></span>
|
|
|
- <template v-if="practiceType === 4">
|
|
|
- <Icon custom="iconfont icon-choose" class="code-icon" color="#3B660C"></Icon>
|
|
|
- <Icon custom="iconfont icon-cuowu" class="code-icon" color="#DB5248"></Icon>
|
|
|
- </template>
|
|
|
+ <template v-if="practiceType === 3 || practiceType === 4">
|
|
|
+ <div class="code-box" v-if="quesInfo.type === 'judge' || quesInfo.type === 'single' || quesInfo.type === 'multiple'">
|
|
|
+ <div v-for="(item, index) in quesInfo.option" :key="index">
|
|
|
+ <div :class="['code-block', isChecked(item.code) ? 'code-block-active' : '']" :tabIndex="index"
|
|
|
+ @click="onAnswerCheck(item, index)" :style="{'cursor': practiceType === 3 ? 'pointer' : 'no-drop'}"
|
|
|
+ >
|
|
|
+ <span class="code-label">{{ item.code }}</span>
|
|
|
+ <span v-html="item.value"></span>
|
|
|
+ <template v-if="practiceType === 4">
|
|
|
+ <Icon custom="iconfont icon-choose" class="code-icon" color="#3B660C"
|
|
|
+ v-show="quesInfo.answer.includes(item.code)"
|
|
|
+ ></Icon>
|
|
|
+ <Icon custom="iconfont icon-cuowu" class="code-icon" color="#DB5248"
|
|
|
+ v-show="!quesInfo.answer.includes(item.code) && checkedAnswerList.includes(item.code)"
|
|
|
+ ></Icon>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="compose-content" v-else>
|
|
|
+ <Compose ref="compose" :itemInfo="itemInfo" :textData="checkedAnswerList"
|
|
|
+ :index="1" @dataGet="getComposeAns" :close="practiceType === 4"
|
|
|
+ ></Compose>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="answer-area" v-else>
|
|
|
+ <span class="answer-tip">我的答案:</span>
|
|
|
+ <p v-html="checkedAnswerList[0]"></p>
|
|
|
+ </div> -->
|
|
|
+ </template>
|
|
|
+ <div v-if="practiceType === 1 || practiceType === 4">
|
|
|
+ <div class="answer-area">
|
|
|
+ <span class="answer-tip">【{{ $t('evaluation.answer')}}】</span>
|
|
|
+ <p v-for="(answerC, indexCA) in quesInfo.answer" :key="indexCA" v-html="answerC"></p>
|
|
|
+ </div>
|
|
|
+ <div class="answer-area">
|
|
|
+ <span class="answer-tip">【{{ $t('evaluation.explain')}}】</span>
|
|
|
+ <p v-html="quesInfo.explain"></p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="compose-content" v-if="practiceType === 3">
|
|
|
- <Compose ref="compose" :itemInfo="itemInfo" :close="false" :textData="checkedAnswerList"
|
|
|
- :index="1" @dataGet="getComposeAns"
|
|
|
- ></Compose>
|
|
|
- </div>
|
|
|
- <div class="answer-area" v-else>
|
|
|
- <span class="answer-tip">我的答案:</span>
|
|
|
- <p v-html="checkedAnswerList[0]"></p>
|
|
|
- </div>
|
|
|
+ </vuescroll>
|
|
|
+ </div>
|
|
|
+ <div class="question-content quertion-area" v-if="practiceType === 2">
|
|
|
+ <Icon custom="iconfont icon-wenhao" class="quertion-icon"></Icon>
|
|
|
+ <vuescroll>
|
|
|
+ <div :class="[`size-${queNum}`]" v-html="quesInfo.question"></div>
|
|
|
+ </vuescroll>
|
|
|
+ </div>
|
|
|
+ <div class="rest-box" v-if="practiceType === 5">
|
|
|
+ <p>让脑袋冷静一下</p>
|
|
|
+ <p>休息一下再继续</p>
|
|
|
+ <Icon custom="iconfont icon-kafei"></Icon>
|
|
|
+ </div>
|
|
|
+ <div class="function-button">
|
|
|
+ <Button class="common-button only-button" style="background: #84ba48" v-if="practiceType === 1" @click="goTo(2)">了解了</Button>
|
|
|
+ <template v-if="practiceType === 2">
|
|
|
+ <Button class="common-button" style="background: #84ba48" @click="goTo(3, 1)">肯定会</Button>
|
|
|
+ <Button class="common-button" style="background: #b9c746" @click="goTo(3, 2)">应该会</Button>
|
|
|
+ <Button class="common-button" style="background: #da933b" @click="goTo(3, 3)">不太会</Button>
|
|
|
+ <Button class="common-button" style="background: #c2543f" @click="goTo(3, 4)">不会</Button>
|
|
|
</template>
|
|
|
- <div v-if="practiceType === 1 || practiceType === 4">
|
|
|
- <div class="answer-area">
|
|
|
- <span class="answer-tip">【答案】</span>
|
|
|
- <p>
|
|
|
- 这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟,如“安得广厦千万间,大庇天下寒士俱欢颜"这样的诗句,表现出作者在自己生活极度艰难的情景下,依然不忘忧国忧民,情真意切.感人至深。
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="answer-area">
|
|
|
- <span class="answer-tip">【解析】</span>
|
|
|
- <p>
|
|
|
- 这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </vuescroll>
|
|
|
- </div>
|
|
|
- <div class="question-content quertion-area" v-if="practiceType === 2">
|
|
|
- <Icon custom="iconfont icon-wenhao" class="quertion-icon"></Icon>
|
|
|
- <vuescroll>
|
|
|
- <div :class="[`size-${queNum}`]" v-html="question"></div>
|
|
|
- </vuescroll>
|
|
|
- </div>
|
|
|
- <div class="rest-box" v-if="practiceType === 5">
|
|
|
- <p>让脑袋冷静一下</p>
|
|
|
- <p>休息一下再继续</p>
|
|
|
- <Icon custom="iconfont icon-kafei"></Icon>
|
|
|
- </div>
|
|
|
- <div class="function-button">
|
|
|
- <Button class="common-button only-button" style="background: #84ba48" v-if="practiceType === 1" @click="goTo(2)">了解了</Button>
|
|
|
- <template v-if="practiceType === 2">
|
|
|
- <Button class="common-button" style="background: #84ba48" @click="goTo(3)">肯定会</Button>
|
|
|
- <Button class="common-button" style="background: #b9c746" @click="goTo(3)">应该会</Button>
|
|
|
- <Button class="common-button" style="background: #da933b" @click="goTo(3)">不太会</Button>
|
|
|
- <Button class="common-button" style="background: #c2543f" @click="goTo(3)">不会</Button>
|
|
|
- </template>
|
|
|
- <Button class="common-button only-button" style="background: #c0c0c0" v-if="practiceType === 3" @click="goTo(4)">提交</Button>
|
|
|
- <Button class="common-button only-button" style="background: #84ba48" v-if="practiceType === 4" @click="goTo(0)">继续</Button>
|
|
|
- <template v-if="practiceType === 5">
|
|
|
- <Button class="common-button rest-button" style="background: #84ba48" @click="goTo(1)">活力满满,继续</Button>
|
|
|
- <Button class="common-button rest-button" style="background: #c0c0c0" @click="openWarmMessage(1)">改天再练,先离开</Button>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+ <Button class="common-button only-button" style="background: #c0c0c0" v-if="practiceType === 3" @click="goTo(4)">{{ $t('studentWeb.classmatesComment.submitted') }}</Button>
|
|
|
+ <Button class="common-button only-button" style="background: #84ba48" v-if="practiceType === 4" @click="goTo(0)">继续</Button>
|
|
|
+ <template v-if="practiceType === 5">
|
|
|
+ <Button class="common-button rest-button" style="background: #84ba48" @click="goTo(mode === 'wrong' ? 2 : 1)">活力满满,继续</Button>
|
|
|
+ <Button class="common-button rest-button" style="background: #c0c0c0" @click="openWarmMessage(1)">改天再练,先离开</Button>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- <div class="analysis">解析</div> -->
|
|
|
</div>
|
|
|
</template>
|
|
@@ -104,18 +106,6 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
isLoading: false,
|
|
|
- question: `
|
|
|
- 这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。
|
|
|
- 这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。
|
|
|
- 这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。
|
|
|
- 这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟。
|
|
|
- <img src="./student-en-us.png" alt="">`,
|
|
|
- /* question: `I heard the echo, from the valleys and the heart
|
|
|
- Open to the lonely soul of sickle harvesting I heard the echo, from the valleys and the heart
|
|
|
- Repeat outrightly, but also repea also repeat the well-being of Eventualy soul of sickle harvesting I heard the echo, from the valleys and the heart
|
|
|
- Repeat outrightly, but also repeat the well-
|
|
|
- Open to the lonely soul of sickle harvesting I heard the echo, from the valleys and the heart
|
|
|
- Eventua<img src="./student-en-us.png" alt="">`, */
|
|
|
codeList: [
|
|
|
{code: "A", value: `这首诗之所以震撼人心,最重要的原因是诗人忘我的精神、博大的胸襟,如“安得广厦千万间,大庇天下寒士俱欢颜"这样的诗句,
|
|
|
表现出作者在自己生活极度艰难的情景下,依然不忘忧国忧民,情真意切.感人至深。`},
|
|
@@ -130,10 +120,23 @@ export default {
|
|
|
checkedAnswerList: [],
|
|
|
iscollection: false,
|
|
|
itemInfo: {},
|
|
|
- quesList: [],
|
|
|
- qsAll: [],
|
|
|
- nowIndex: 0,
|
|
|
+ exerciseInfo: [], //练习时选择的数据
|
|
|
+ qsAll: [], //需要练习的题目id和状态
|
|
|
+ quesContent: [], //所有题目信息
|
|
|
+ nowIndex: 0, //当前题目的序号
|
|
|
practiceType: 1, //1:学习,2:询问,3:作答,4:答案,5:休息
|
|
|
+ quesInfo: undefined,
|
|
|
+ testType: {
|
|
|
+ single: this.$t('studentWeb.exam.queType.single'),
|
|
|
+ multiple: this.$t('studentWeb.exam.queType.multiply'),
|
|
|
+ judge: this.$t('studentWeb.exam.queType.judge'),
|
|
|
+ complete: this.$t('studentWeb.exam.queType.complete'),
|
|
|
+ subjective: this.$t('studentWeb.exam.queType.subjective'),
|
|
|
+ compose: this.$t('studentWeb.exam.queType.compose'),
|
|
|
+ correct: this.$t('studentWeb.exam.queType.correct'),
|
|
|
+ connector: this.$t('studentWeb.exam.queType.connector'),
|
|
|
+ },
|
|
|
+ mode: 'wrong', //练习模式
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -143,8 +146,8 @@ export default {
|
|
|
queNum() {
|
|
|
// 计算字节数
|
|
|
let len = 0
|
|
|
- for (var i = 0; i < this.question.length; i++) {
|
|
|
- var c = this.question.charCodeAt(i)
|
|
|
+ for (var i = 0; i < this.quesInfo.question.length; i++) {
|
|
|
+ var c = this.quesInfo.question.charCodeAt(i)
|
|
|
//单字节加1
|
|
|
if (
|
|
|
(c >= 0x0001 && c <= 0x007e) ||
|
|
@@ -167,113 +170,71 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ watch: {
|
|
|
+ nowIndex: {
|
|
|
+ handler(n, o) {
|
|
|
+ this.quesInfo = this.quesContent[n]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created () {
|
|
|
this.qsAll = this.$route.params.qsList
|
|
|
- this.quesList = [
|
|
|
- {
|
|
|
- "q_id":"f5adefef-44fc-43a1-7de6-fa1f8afa5f2b",
|
|
|
- "index":0,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":null,
|
|
|
- "correctness":1,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":2
|
|
|
- },{
|
|
|
- "q_id":"baff9b62-7978-1ebb-8f36-af2bb78cd853",
|
|
|
- "index":1,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":6,
|
|
|
- "correctness":0,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":4
|
|
|
- },{
|
|
|
- "q_id":"6df25a81-41ac-1e1a-78bd-5377c8d2ce4f",
|
|
|
- "index":2,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":7,
|
|
|
- "correctness":0,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":1
|
|
|
- },{
|
|
|
- "q_id":"1d62b867-2923-3700-ca72-ed9bad257303",
|
|
|
- "index":3,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":null,
|
|
|
- "correctness":1,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":3
|
|
|
- },{
|
|
|
- "q_id":"d8e382a5-b713-0657-d197-4d7935ddf386",
|
|
|
- "index":4,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":null,
|
|
|
- "correctness":0,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":3
|
|
|
- },{
|
|
|
- "q_id":"b67bd57a-d19e-b6d0-5e03-b1c184362b2d",
|
|
|
- "index":5,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":1,
|
|
|
- "correctness":1,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":4
|
|
|
- },{
|
|
|
- "q_id":"c13d70a5-0952-bc4e-d7bf-a9bda829afe2",
|
|
|
- "index":6,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":null,
|
|
|
- "correctness":1,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":1
|
|
|
- },{
|
|
|
- "q_id":"b0dcda93-a191-ad1f-a3c7-58c373131c49",
|
|
|
- "index":7,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":2,
|
|
|
- "correctness":0,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":2
|
|
|
- },{
|
|
|
- "q_id":"5de46f22-cce9-f4b0-aeb8-b3e648671bbf",
|
|
|
- "index":8,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":null,
|
|
|
- "correctness":1,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":1
|
|
|
- },{
|
|
|
- "q_id":"a9cd68d1-7148-1bb4-9d91-5b63db7da1f3",
|
|
|
- "index":9,
|
|
|
- "unit_id":10,
|
|
|
- "skill_id":6101,
|
|
|
- "start_time":1665651534,
|
|
|
- "difficulty":5,
|
|
|
- "correctness":1,
|
|
|
- "end_time":1665651561,
|
|
|
- "confidence_level":4
|
|
|
- },
|
|
|
- ]
|
|
|
+ this.mode = this.$route.params.mode
|
|
|
+ this.practiceType = this.$route.params.mode === 'wrong' ? 2 : 1
|
|
|
+ this.getQuesContent()
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取题目详情
|
|
|
+ getQuesContent() {
|
|
|
+ this.isLoading = true
|
|
|
+ let param = {
|
|
|
+ "scope": "school",
|
|
|
+ "code": this.userInfo.scope === 'student' ? this.userInfo.azp : this.userInfo.sub,
|
|
|
+ "ids": []
|
|
|
+ }
|
|
|
+ param.ids = this.qsAll.map(item => {
|
|
|
+ return item.q_id
|
|
|
+ })
|
|
|
+ this.$api.studentWeb.getQuesInfo(param).then(async res => {
|
|
|
+ if(res.items.length) {
|
|
|
+ let sas = await this.getSas()
|
|
|
+ res.items.map(async (item, index) => {
|
|
|
+ this.exerciseInfo.push({
|
|
|
+ "q_id": item.id,
|
|
|
+ "index": index,
|
|
|
+ user_id: this.userInfo.sub,
|
|
|
+ "unit_id": 10, //单元id
|
|
|
+ "skill_id": item.knowledge, //只有知识点内容,没有id
|
|
|
+ "start_time": null,
|
|
|
+ "difficulty":null,
|
|
|
+ "correctness": null, //答题对错(0,1)
|
|
|
+ "end_time": null,
|
|
|
+ "confidence_level": null, //答题信心
|
|
|
+ })
|
|
|
+ let fullPath = sas.url + '/' + param.code + item.blob + "?" + sas.sas
|
|
|
+ let info = JSON.parse(await this.$tools.getFile(fullPath))
|
|
|
+ // 综合题有子题,还需要处理
|
|
|
+ let infoNeed = info.exercise
|
|
|
+ infoNeed.question = info.item[0].question
|
|
|
+ infoNeed.option = info.item[0].option
|
|
|
+ this.quesContent.push(infoNeed)
|
|
|
+ if(!index) {
|
|
|
+ this.quesInfo = infoNeed
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.isLoading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getSas() {
|
|
|
+ return new Promise(async (r, j) => {
|
|
|
+ let code = this.userInfo.scope === 'student' ? this.userInfo.azp : this.userInfo.sub
|
|
|
+ let sasInfo = await this.$tools.getBlobSas(code)
|
|
|
+ r(sasInfo)
|
|
|
+ })
|
|
|
+ },
|
|
|
// 选项点击事件
|
|
|
onAnswerCheck(item, index) {
|
|
|
if(this.practiceType === 4) {
|
|
@@ -284,7 +245,7 @@ export default {
|
|
|
if (isExistIndex > -1) {
|
|
|
this.checkedAnswerList.splice(isExistIndex, 1)
|
|
|
} else {
|
|
|
- if(true) { //单选
|
|
|
+ if(this.quesInfo.type != 'multiple') { //单选
|
|
|
this.checkedAnswerList.length = 0
|
|
|
}
|
|
|
this.checkedAnswerList.push(item.code)
|
|
@@ -305,7 +266,44 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 下一步该做什么
|
|
|
- goTo(type) {
|
|
|
+ goTo(type, confidence) {
|
|
|
+ let time = new Date().getTime()
|
|
|
+ if(type === 3) {
|
|
|
+ this.exerciseInfo[this.nowIndex].confidence_level = confidence
|
|
|
+ this.exerciseInfo[this.nowIndex].start_time = time
|
|
|
+ } else if(type === 4) {
|
|
|
+ let objectiveTypes = ["single", "multiple", "judge"]
|
|
|
+ let corre = null
|
|
|
+ if(objectiveTypes.includes(this.quesInfo.type)) {
|
|
|
+ if(this.quesInfo.type != "multiple") {
|
|
|
+ if(this.checkedAnswerList[0] == this.quesInfo.answer[0]) {
|
|
|
+ corre = 1
|
|
|
+ } else {
|
|
|
+ corre = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 多选
|
|
|
+ else {
|
|
|
+ let answer = this.quesInfo.answer
|
|
|
+ let q = 0
|
|
|
+ this.checkedAnswerList.map(item => {
|
|
|
+ for (let i = 0; i < answer.length; i++) {
|
|
|
+ if(item == answer[i]) {
|
|
|
+ q += 1
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(answer.length === q) {
|
|
|
+ corre = 1
|
|
|
+ } else {
|
|
|
+ corre = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.exerciseInfo[this.nowIndex].end_time = time
|
|
|
+ this.exerciseInfo[this.nowIndex].correctness = corre
|
|
|
+ }
|
|
|
if(type) {
|
|
|
// 没有作答点击提交
|
|
|
if(type === 4 && !this.checkedAnswerList.length) {
|
|
@@ -314,9 +312,22 @@ export default {
|
|
|
this.practiceType = type
|
|
|
}
|
|
|
} else {
|
|
|
- this.checkedAnswerList = []
|
|
|
// 根据做题进度进入(学习/休息)界面
|
|
|
- this.practiceType = 5
|
|
|
+ if(this.nowIndex === (this.quesContent.length - 1)) {
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '当前习题已全部完成练习',
|
|
|
+ okText: '离开',
|
|
|
+ cancelText: this.$t("studentWeb.exam.delCancel"),
|
|
|
+ onOk: () => {
|
|
|
+ this.quitTest()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.checkedAnswerList = []
|
|
|
+ this.nowIndex += 1
|
|
|
+ // 先做5题休息
|
|
|
+ this.practiceType = (this.nowIndex + 1) % 5 ? (this.mode === 'wrong' ? 2 : 1) : 5
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//打开提示信息
|
|
@@ -329,7 +340,7 @@ export default {
|
|
|
quitTest() {
|
|
|
let param = {
|
|
|
sid: this.userInfo.sub,
|
|
|
- record: this.quesList
|
|
|
+ record: this.exerciseInfo
|
|
|
}
|
|
|
this.isLoading = true
|
|
|
this.$router.go(-1)
|