Commit ad1e5e07 authored by 黄奎's avatar 黄奎

页面修改

parent 25afe5ad
......@@ -168,6 +168,17 @@ export function queryPaperDetails(data) {
})
}
/**
* 考试获取考试题目
* @param {JSON参数} data
*/
export function stuSubmitExamPaper(data) {
return request({
url: '/AppletIndex/StuSubmitExamPaper',
method: 'post',
data
})
}
/**
* 保存试卷信息
......
......@@ -32,7 +32,7 @@
<thead>
<tr>
<th colspan="2" style="text-align:left;">
<div class="clozeTest_question_tit" @click="showNav(index)">
<div class="clozeTest_question_tit">
<div>
{{index+1}}小题<span style="color:#A8A8B3;">({{item.QuestionName}})</span>
</div>
......
......@@ -32,6 +32,9 @@
<tr>
<td colspan="2">正确答案:{{data.Answer}}</td>
</tr>
<tr v-if="data.StundetAnswer">
<td colspan="2">考生答案:{{data.StundetAnswer}}</td>
</tr>
<tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td>
</tr>
......
......@@ -36,6 +36,7 @@
.ExamPaper_Sysuser_Date .el-range-editor.el-input__inner {
background-color: transparent;
}
</style>
<!--试卷库管理-->
<template>
......@@ -78,10 +79,11 @@
</div>
</div>
<div class="page-content examPaper">
<exampaperlist :dataList="dataList" ref="examPaper" :msg="msg" :navList="navList" :loading="loading" @success="refreshPage">
<exampaperlist :dataList="dataList" ref="examPaper" :msg="msg" :navList="navList" :loading="loading"
@success="refreshPage">
</exampaperlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
<q-pagination class="full-width justify-end" :value="msg.pageIndex" color="primary" :max="pageCount" :input="true"
@input="changePage" />
</div>
</div>
</template>
......@@ -159,8 +161,10 @@
methods: {
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList()
if (val != this.msg.pageIndex) {
this.msg.pageIndex = val;
this.getList()
}
},
getPaperChild(Id) {
this.msg.ParentId = Id;
......
......@@ -254,6 +254,7 @@
</div>
</div>
<div style="width:20%;text-align:right;">
<q-btn color="accent" size="sm" class="q-mr-md" @click="submitExamPaper()" label="提交考试" />
<q-btn color="accent" size="sm" class="q-mr-md" @click="goBack()" label="返回" />
</div>
</div>
......@@ -273,13 +274,16 @@
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-single>
<!--多选题-->
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
<v-multiple v-if="dItem.QuestionTypeKey=='multiple'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">
</v-multiple>
<!--填空题-->
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
<v-fillin v-if="dItem.QuestionTypeKey=='fill-in'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">
</v-fillin>
<!--判断题-->
<v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate"></v-judge>
<v-judge v-if="dItem.QuestionTypeKey=='judge'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate"></v-judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
......@@ -291,14 +295,16 @@
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-entryproblem>
<!--连线题-->
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
<v-matching v-if="dItem.QuestionTypeKey=='matching'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">
</v-matching>
<!--排序题-->
<v-sortingproblem v-if="dItem.QuestionTypeKey=='sorting-problem'" :questionObj="dItem"
:isShowAnswer="isShowAnswer" :isOperate="isOperate"></v-sortingproblem>
<!--完型填空-->
<v-cloze v-if="dItem.QuestionTypeKey=='cloze'" :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">></v-cloze>
<v-cloze v-if="dItem.QuestionTypeKey=='cloze'" :questionObj="dItem" :isShowAnswer="isShowAnswer"
:isOperate="isOperate">></v-cloze>
<!--阅读理解、听力题-->
<v-readingcomprehensio
......@@ -329,6 +335,7 @@
import vSharingchoose from '../../components/questiontype/v-sharingchoose'
import {
queryPaperDetails,
stuSubmitExamPaper,
} from '../../api/teacher/index';
export default {
components: {
......@@ -361,11 +368,13 @@
DataObj: {
PaperId: 0, //试卷编号
PaperName: '', //试卷名称
GuestId: 0, //学员编号
PublishId: 0, //考试编号
GroupList: [], //试卷答题分类
},
PaperConfig: {}, //试卷配置
isShowAnswer: false, //是否显示答案
isOperate:true,//是否可操作
isOperate: true, //是否可操作
examScore: 0, //总分,
examNum: 0, //总题量
}
......@@ -410,10 +419,11 @@
GetPaperInfo() {
queryPaperDetails(this.msg).then(res => {
var tempData = res.Data;
console.log("tempData", tempData);
if (res.Code == 1) {
this.DataObj.PaperId = tempData.Paper.PaperId;
this.DataObj.PaperName = tempData.Paper.PaperName;
this.DataObj.GuestId = tempData.Paper.GuestId;
this.DataObj.PublishId = tempData.Paper.PublishId;
if (tempData.Paper.GroupList && tempData.Paper.GroupList.length > 0) {
this.DataObj.GroupList = tempData.Paper.GroupList;
}
......@@ -442,10 +452,24 @@
//返回
goBack() {
this.$router.push({
path: '/exam/examPaper'
path: '/exam/examlist'
})
},
//学生提交考试
submitExamPaper() {
stuSubmitExamPaper(this.DataObj).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功!',
position: 'top'
})
this.GetPaperInfo();
}
})
}
}
}
</script>
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment