Commit ad1e5e07 authored by 黄奎's avatar 黄奎

页面修改

parent 25afe5ad
...@@ -168,6 +168,17 @@ export function queryPaperDetails(data) { ...@@ -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 @@ ...@@ -32,7 +32,7 @@
<thead> <thead>
<tr> <tr>
<th colspan="2" style="text-align:left;"> <th colspan="2" style="text-align:left;">
<div class="clozeTest_question_tit" @click="showNav(index)"> <div class="clozeTest_question_tit">
<div> <div>
{{index+1}}小题<span style="color:#A8A8B3;">({{item.QuestionName}})</span> {{index+1}}小题<span style="color:#A8A8B3;">({{item.QuestionName}})</span>
</div> </div>
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
<tr> <tr>
<td colspan="2">正确答案:{{data.Answer}}</td> <td colspan="2">正确答案:{{data.Answer}}</td>
</tr> </tr>
<tr v-if="data.StundetAnswer">
<td colspan="2">考生答案:{{data.StundetAnswer}}</td>
</tr>
<tr> <tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td> <td colspan="2">解析:<span v-html="data.AnswerParse"></span></td>
</tr> </tr>
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
.ExamPaper_Sysuser_Date .el-range-editor.el-input__inner { .ExamPaper_Sysuser_Date .el-range-editor.el-input__inner {
background-color: transparent; background-color: transparent;
} }
</style> </style>
<!--试卷库管理--> <!--试卷库管理-->
<template> <template>
...@@ -78,10 +79,11 @@ ...@@ -78,10 +79,11 @@
</div> </div>
</div> </div>
<div class="page-content examPaper"> <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> </exampaperlist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" :value="msg.pageIndex" color="primary" :max="pageCount" :input="true"
:input="true" @input="changePage" /> @input="changePage" />
</div> </div>
</div> </div>
</template> </template>
...@@ -159,8 +161,10 @@ ...@@ -159,8 +161,10 @@
methods: { methods: {
//翻页 //翻页
changePage(val) { changePage(val) {
this.msg.pageIndex = val; if (val != this.msg.pageIndex) {
this.getList() this.msg.pageIndex = val;
this.getList()
}
}, },
getPaperChild(Id) { getPaperChild(Id) {
this.msg.ParentId = Id; this.msg.ParentId = Id;
......
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
</div> </div>
</div> </div>
<div style="width:20%;text-align:right;"> <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="返回" /> <q-btn color="accent" size="sm" class="q-mr-md" @click="goBack()" label="返回" />
</div> </div>
</div> </div>
...@@ -273,13 +274,16 @@ ...@@ -273,13 +274,16 @@
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate"> :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-single> </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-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-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' <v-shortanswer v-if="dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
...@@ -291,14 +295,16 @@ ...@@ -291,14 +295,16 @@
:questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate"> :questionObj="dItem" :isShowAnswer="isShowAnswer" :isOperate="isOperate">
</v-entryproblem> </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-matching>
<!--排序题--> <!--排序题-->
<v-sortingproblem v-if="dItem.QuestionTypeKey=='sorting-problem'" :questionObj="dItem" <v-sortingproblem v-if="dItem.QuestionTypeKey=='sorting-problem'" :questionObj="dItem"
:isShowAnswer="isShowAnswer" :isOperate="isOperate"></v-sortingproblem> :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 <v-readingcomprehensio
...@@ -329,6 +335,7 @@ ...@@ -329,6 +335,7 @@
import vSharingchoose from '../../components/questiontype/v-sharingchoose' import vSharingchoose from '../../components/questiontype/v-sharingchoose'
import { import {
queryPaperDetails, queryPaperDetails,
stuSubmitExamPaper,
} from '../../api/teacher/index'; } from '../../api/teacher/index';
export default { export default {
components: { components: {
...@@ -361,11 +368,13 @@ ...@@ -361,11 +368,13 @@
DataObj: { DataObj: {
PaperId: 0, //试卷编号 PaperId: 0, //试卷编号
PaperName: '', //试卷名称 PaperName: '', //试卷名称
GuestId: 0, //学员编号
PublishId: 0, //考试编号
GroupList: [], //试卷答题分类 GroupList: [], //试卷答题分类
}, },
PaperConfig: {}, //试卷配置 PaperConfig: {}, //试卷配置
isShowAnswer: false, //是否显示答案 isShowAnswer: false, //是否显示答案
isOperate:true,//是否可操作 isOperate: true, //是否可操作
examScore: 0, //总分, examScore: 0, //总分,
examNum: 0, //总题量 examNum: 0, //总题量
} }
...@@ -410,10 +419,11 @@ ...@@ -410,10 +419,11 @@
GetPaperInfo() { GetPaperInfo() {
queryPaperDetails(this.msg).then(res => { queryPaperDetails(this.msg).then(res => {
var tempData = res.Data; var tempData = res.Data;
console.log("tempData", tempData);
if (res.Code == 1) { if (res.Code == 1) {
this.DataObj.PaperId = tempData.Paper.PaperId; this.DataObj.PaperId = tempData.Paper.PaperId;
this.DataObj.PaperName = tempData.Paper.PaperName; 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) { if (tempData.Paper.GroupList && tempData.Paper.GroupList.length > 0) {
this.DataObj.GroupList = tempData.Paper.GroupList; this.DataObj.GroupList = tempData.Paper.GroupList;
} }
...@@ -442,10 +452,24 @@ ...@@ -442,10 +452,24 @@
//返回 //返回
goBack() { goBack() {
this.$router.push({ 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