|
@@ -51,7 +51,7 @@
|
|
<span class="testTitleText">评量:{{ $store.getters.getItemTitle.name }}</span>
|
|
<span class="testTitleText">评量:{{ $store.getters.getItemTitle.name }}</span>
|
|
<div class="myProgressBar">
|
|
<div class="myProgressBar">
|
|
<span class="myTestProgresstitle">完成度</span>
|
|
<span class="myTestProgresstitle">完成度</span>
|
|
- <Progress style="margin-top:15px" :percent="Math.ceil(((examInfo.length - undo)/examLength)*100)" />
|
|
|
|
|
|
+ <Progress style="margin-top:15px" :percent="completeRate" />
|
|
</div>
|
|
</div>
|
|
<button v-if="closeTest" class="submitBtn" @click="openWarmMessage(2)" :class="{ hintClick: hintHandon() }">交卷</button>
|
|
<button v-if="closeTest" class="submitBtn" @click="openWarmMessage(2)" :class="{ hintClick: hintHandon() }">交卷</button>
|
|
<button v-if="!closeTest" class="submitBtn" :class="{ hintClick: hintHandon() }">已完成</button>
|
|
<button v-if="!closeTest" class="submitBtn" :class="{ hintClick: hintHandon() }">已完成</button>
|
|
@@ -61,7 +61,7 @@
|
|
:xs="24"
|
|
:xs="24"
|
|
:sm="24"
|
|
:sm="24"
|
|
:md="12"
|
|
:md="12"
|
|
- :lg="getQue(queNo).type != 'single'&& getQue(queNo).type != 'judge'&& getQue(queNo).type != 'multiple'? 24 : 17">
|
|
|
|
|
|
+ :lg="20">
|
|
<div class="questionContent">
|
|
<div class="questionContent">
|
|
<span class="hintwrap">
|
|
<span class="hintwrap">
|
|
<Tooltip :content="'提示'" theme="light" placement="left">
|
|
<Tooltip :content="'提示'" theme="light" placement="left">
|
|
@@ -95,7 +95,6 @@
|
|
<div v-html="getQue(queNo).parentInfo.question"></div>
|
|
<div v-html="getQue(queNo).parentInfo.question"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div style="display:flex;margin-top:20px;">
|
|
<div style="display:flex;margin-top:20px;">
|
|
<span style="width:40px">{{ getQue(queNo).paperIndex}}:</span>
|
|
<span style="width:40px">{{ getQue(queNo).paperIndex}}:</span>
|
|
<!--题目渲染-->
|
|
<!--题目渲染-->
|
|
@@ -108,109 +107,81 @@
|
|
<Compose ref="compose" :itemInfo="getQue(queNo)" :textData="checkers[queNo]" :index="queNo" @dataGet="getComposeAns"></Compose>
|
|
<Compose ref="compose" :itemInfo="getQue(queNo)" :textData="checkers[queNo]" :index="queNo" @dataGet="getComposeAns"></Compose>
|
|
</div>
|
|
</div>
|
|
<!--填空题-->
|
|
<!--填空题-->
|
|
- <!--<div v-if="getQue(queNo).type == 'complete'">
|
|
|
|
-
|
|
|
|
|
|
+ <!--<div v-if="getQue(queNo).type == 'complete'">
|
|
<div class="complete-content">
|
|
<div class="complete-content">
|
|
- <Complete ref="complete":num="getQue(queNo).answer" :textData="checkers[queNo]" :index="queNo" @dataChange="getComposeAns"></Complete>
|
|
|
|
|
|
+ <Complete ref="complete" :num="getQue(queNo).answer" :textData="checkers[queNo]" :index="queNo" @dataChange="getComposeAns"></Complete>
|
|
</div>
|
|
</div>
|
|
</div>-->
|
|
</div>-->
|
|
</div>
|
|
</div>
|
|
- <!--答案卡-->
|
|
|
|
- <div class="md-ansSheetGroup">
|
|
|
|
- <h4>{{ $t("studentWeb.exam.testpop.myAnswerSheet") }}</h4>
|
|
|
|
- <table class="ansSheet" >
|
|
|
|
- <tr>
|
|
|
|
- <th class="rightAnstitle">{{ $t("studentWeb.exam.testpop.qNo") }}</th>
|
|
|
|
- <th v-for="(item,index) in examInfo"
|
|
|
|
- :key="index"
|
|
|
|
- class="ansSheetQno"
|
|
|
|
- @click="gototheQues(index +1)">
|
|
|
|
- {{ item.parent == undefined ? index +1 : item.paperIndex }}
|
|
|
|
- </th>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td class="anstext">{{ $t("studentWeb.exam.testpop.myAns") }}</td>
|
|
|
|
- <td v-for="(item, index) in checkers" :key="index">
|
|
|
|
- <div v-show="item == ''">
|
|
|
|
- <br />
|
|
|
|
- </div>
|
|
|
|
- <div class="anstext" v-show="item.length >= 0 && getQue(index).type != 'subjective' && getQue(index).type != 'complete' && getQue(index).type != 'judge' ">
|
|
|
|
- <span v-for="(sub, indexs) in item" :key="indexs">
|
|
|
|
- {{ sub }}
|
|
|
|
- <span v-show="indexs + 1 != item.length">,</span>
|
|
|
|
- </span>
|
|
|
|
- </div>
|
|
|
|
- <div class="anstext" v-show="item.length >= 1">
|
|
|
|
- <span v-show="getQue(index).type == 'subjective' || getQue(index).type == 'complete'">已作答</span>
|
|
|
|
- <span v-show="getQue(index).type == 'judge'">{{checkers[index][0] == 'B' ? '对' : '错'}}</span>
|
|
|
|
- </div>
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- <!--切換頁-->
|
|
|
|
- <div class="pageCtl2" v-if="getQue(queNo).type != 'single'&& getQue(queNo).type != 'judge'&& getQue(queNo).type != 'multiple'">
|
|
|
|
- <button @click="preQ()" v-if="queNo != 0">
|
|
|
|
- <Icon type="ios-arrow-back" />上一题
|
|
|
|
- </button>
|
|
|
|
- <button @click="nextQ()"
|
|
|
|
- v-if="queNo != (examInfo.length-1)"
|
|
|
|
- :class="{ hintClick: queNo != (examInfo.length-1) && checkers[queNo] != '', }">
|
|
|
|
- 下一题
|
|
|
|
- <Icon type="ios-arrow-forward" />
|
|
|
|
- </button>
|
|
|
|
|
|
+ <div class="checkAnswers" v-if="getQue(queNo).type == 'single'|| getQue(queNo).type == 'judge'|| getQue(queNo).type == 'multiple'">
|
|
|
|
+ <div class="questionNo">第{{ queNo + 1 }}题 我的答案是:</div>
|
|
|
|
+ <!--判断题选项-->
|
|
|
|
+ <div v-if="getQue(queNo).type == 'judge'" align="center">
|
|
|
|
+ <label class="testBtn yesNoBtn">
|
|
|
|
+ <input type="radio" value="B" v-model="checkers[queNo][0]" />
|
|
|
|
+ <div class="testbg">
|
|
|
|
+ <Icon type="ios-radio-button-off" />
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ <label class="testBtn yesNoBtn">
|
|
|
|
+ <input type="radio" value="A" v-model="checkers[queNo][0]" />
|
|
|
|
+ <div class="testbg">
|
|
|
|
+ <Icon type="md-close" />
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <!--选择题选项-->
|
|
|
|
+ <div class="select-box" v-if=" getQue(queNo).type != 'judge' ">
|
|
|
|
+ <label class="testBtn"
|
|
|
|
+ v-for="(item, index) in getQue(queNo).option"
|
|
|
|
+ :key="index">
|
|
|
|
+ <input type="checkbox"
|
|
|
|
+ :value="getQue(queNo).option[index].code"
|
|
|
|
+ v-model="checkers[queNo]"
|
|
|
|
+ @click="getAns(queNo,index)" />
|
|
|
|
+ <div class="testbg">
|
|
|
|
+ <Row :gutter="10">
|
|
|
|
+ <i-col :xs="16" :sm="16" :md="16" :lg="16">
|
|
|
|
+ <p class="testtext">
|
|
|
|
+ <div style="display:flex">
|
|
|
|
+ <span>{{ getQue(queNo).option[index].code }}.</span>
|
|
|
|
+ <div v-html="item.value"></div>
|
|
|
|
+ </div>
|
|
|
|
+ </p>
|
|
|
|
+ </i-col>
|
|
|
|
+ </Row>
|
|
|
|
+ <div style="clear:both"></div>
|
|
|
|
+ </div>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</i-col>
|
|
</i-col>
|
|
<!--渲染選擇題 判斷題-->
|
|
<!--渲染選擇題 判斷題-->
|
|
<i-col class="ansArea"
|
|
<i-col class="ansArea"
|
|
- :xs="24"
|
|
|
|
- :sm="24"
|
|
|
|
- :md="12"
|
|
|
|
- :lg="7"
|
|
|
|
- v-if="getQue(queNo).type == 'single'|| getQue(queNo).type == 'judge'|| getQue(queNo).type == 'multiple'">
|
|
|
|
|
|
+ :xs="12"
|
|
|
|
+ :sm="12"
|
|
|
|
+ :md="6"
|
|
|
|
+ :lg="4"
|
|
|
|
+ >
|
|
<div class="checkAnswer">
|
|
<div class="checkAnswer">
|
|
- <div class="questionNo">第{{ queNo + 1 }}题 我的答案是:</div>
|
|
|
|
- <!--判断题选项-->
|
|
|
|
- <div v-if="getQue(queNo).type == 'judge'" align="center">
|
|
|
|
- <label class="testBtn yesNoBtn">
|
|
|
|
- <input type="radio" value="B" v-model="checkers[queNo][0]" />
|
|
|
|
- <div class="testbg">
|
|
|
|
- <Icon type="ios-radio-button-off" />
|
|
|
|
- </div>
|
|
|
|
- </label>
|
|
|
|
- <label class="testBtn yesNoBtn">
|
|
|
|
- <input type="radio" value="A" v-model="checkers[queNo][0]" />
|
|
|
|
- <div class="testbg">
|
|
|
|
- <Icon type="md-close" />
|
|
|
|
- </div>
|
|
|
|
- </label>
|
|
|
|
- </div>
|
|
|
|
- <!--选择题选项-->
|
|
|
|
- <div v-if=" getQue(queNo).type != 'judge' " >
|
|
|
|
- <label class="testBtn"
|
|
|
|
- v-for="(item, index) in getQue(queNo).option"
|
|
|
|
- :key="index">
|
|
|
|
- <input type="checkbox"
|
|
|
|
- :value="getQue(queNo).option[index].code"
|
|
|
|
- v-model="checkers[queNo]"
|
|
|
|
- @click="getAns(queNo,index)"
|
|
|
|
- />
|
|
|
|
- <div class="testbg">
|
|
|
|
- <Row :gutter="10">
|
|
|
|
- <i-col :xs="16" :sm="16" :md="16" :lg="16">
|
|
|
|
- <p class="testtext" >
|
|
|
|
- <div style="display:flex">
|
|
|
|
- <span>{{ getQue(queNo).option[index].code }}.</span>
|
|
|
|
- <div v-html="item.value"></div>
|
|
|
|
- </div>
|
|
|
|
- </p>
|
|
|
|
- </i-col>
|
|
|
|
- </Row>
|
|
|
|
-
|
|
|
|
- <div style="clear:both"></div>
|
|
|
|
- </div>
|
|
|
|
- </label>
|
|
|
|
|
|
+ <span style="margin-top:10px;font-weight:800">我的答题卡</span>
|
|
|
|
+ <br />
|
|
|
|
+ <!--<span style="margin-top:10px;font-weight:800">状态:</span>
|
|
|
|
+ <div style="display:inline-flex">
|
|
|
|
+ <div class="has-ans">
|
|
|
|
+ <span style="padding:5px 5px;cursor:pointer">已作答</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="ans-box">
|
|
|
|
+ <span style="padding:5px 5px;cursor:pointer">未作答</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>-->
|
|
|
|
+ <br />
|
|
|
|
+ <span style="margin-top:10px;font-weight:800">题号:</span>
|
|
|
|
+ <div class="que-box">
|
|
|
|
+ <div v-for="(item,index) in examInfo" :class="checkers[index].length > 0 ? 'has-ans':'ans-box'" @click="gototheQues(index +1)">
|
|
|
|
+ <span style="padding:5px 5px;cursor:pointer"> {{ item.parent == undefined ? index +1 : item.paperIndex }}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--切換頁-->
|
|
<!--切換頁-->
|
|
@@ -437,17 +408,31 @@
|
|
closetest: function () {
|
|
closetest: function () {
|
|
this.WarmMessageisOpen = false
|
|
this.WarmMessageisOpen = false
|
|
if (this.checkers.length) {
|
|
if (this.checkers.length) {
|
|
- let len = 0
|
|
|
|
- for (let i = 0; i < this.checkers.length;i++) {
|
|
|
|
- if (this.checkers[i].length !== 0) {
|
|
|
|
- len++
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this.summit()
|
|
|
|
- if (len == this.examInfo.length) {
|
|
|
|
- } else {
|
|
|
|
- this.$Message.warning('请完成作答再提交!')
|
|
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ let req = {
|
|
|
|
+ id: this.$store.getters.getItemTitle.id,
|
|
|
|
+ answer: this.checkers,
|
|
|
|
+ studentId: this.$store.state.userInfo.sub,
|
|
|
|
+ classId: this.$store.state.user.studentProfile.classinfo.id,
|
|
|
|
+ subjectId: this.$store.getters.getPaperInfo.subjectId,
|
|
|
|
+ multipleRule: this.$store.getters.getExamInfo.multipleRule,
|
|
|
|
+ paperId: this.$store.getters.getPaperInfo.id,
|
|
|
|
+ school: this.$store.getters.getItemTitle.school
|
|
}
|
|
}
|
|
|
|
+ this.$api.studentWeb.SaveStuExamPaper(req).then(res => {
|
|
|
|
+ if (res) {
|
|
|
|
+ this.$Message.success('作答信息提交成功!')
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$store.commit("ToggleLessonTestPopWithSubject", "")
|
|
|
|
+ this.isLoading = false
|
|
|
|
+ }, 2000)
|
|
|
|
+ }
|
|
|
|
+ }, err => {
|
|
|
|
+ this.$Message.warning('作答信息保存失败!')
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.isLoading = false
|
|
|
|
+ }, 1000)
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
quitTest() {
|
|
quitTest() {
|
|
@@ -455,34 +440,7 @@
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.$store.commit("ToggleLessonTestPopWithSubject", "")
|
|
this.$store.commit("ToggleLessonTestPopWithSubject", "")
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
- }, 1000)
|
|
|
|
- },
|
|
|
|
- summit() {
|
|
|
|
- this.isLoading = true;
|
|
|
|
- let req = {
|
|
|
|
- id: this.$store.getters.getItemTitle.id,
|
|
|
|
- answer: this.checkers,
|
|
|
|
- studentId: this.$store.state.userInfo.sub,
|
|
|
|
- classId: this.$store.state.user.studentProfile.classinfo.id,
|
|
|
|
- subjectId: this.$store.getters.getPaperInfo.subjectId,
|
|
|
|
- multipleRule: this.$store.getters.getExamInfo.multipleRule,
|
|
|
|
- paperId: this.$store.getters.getPaperInfo.id,
|
|
|
|
- school: this.$store.getters.getItemTitle.school
|
|
|
|
- }
|
|
|
|
- this.$api.studentWeb.SaveStuExamPaper(req).then(res => {
|
|
|
|
- if (res) {
|
|
|
|
- this.$Message.success('作答信息提交成功!')
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.$store.commit("ToggleLessonTestPopWithSubject", "")
|
|
|
|
- this.isLoading = false
|
|
|
|
- }, 2000)
|
|
|
|
- }
|
|
|
|
- }, err => {
|
|
|
|
- this.$Message.warning('作答信息保存失败!')
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.isLoading = false
|
|
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
|
|
+ }, 500)
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
|
|
@@ -507,11 +465,13 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- examLength() {
|
|
|
|
|
|
+ completeRate() {
|
|
if (this.examInfo.length) {
|
|
if (this.examInfo.length) {
|
|
- let i = 0
|
|
|
|
- i = this.examInfo.length
|
|
|
|
- return i
|
|
|
|
|
|
+ let data = 0
|
|
|
|
+ data = Math.ceil(((this.examInfo.length - this.undo) / this.examInfo.length) * 100)
|
|
|
|
+ return data
|
|
|
|
+ } else {
|
|
|
|
+ return 0
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -521,9 +481,4 @@
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
@import "~@/assets/student-web/component_styles/lesson-testpop.css";
|
|
@import "~@/assets/student-web/component_styles/lesson-testpop.css";
|
|
- .compose-content{
|
|
|
|
- width:65%;
|
|
|
|
- height:200px;
|
|
|
|
- z-index:0;
|
|
|
|
- }
|
|
|
|
</style>
|
|
</style>
|