Commit 5a4b8a0a authored by 黄奎's avatar 黄奎

新增页面

parent 391b7868
...@@ -179,3 +179,14 @@ export function savePaperTemplate(data) { ...@@ -179,3 +179,14 @@ export function savePaperTemplate(data) {
}) })
} }
/**
* 发布考试
* @param {JSON参数} data
*/
export function savePublishExam(data) {
return request({
url: '/Exam/PublishExam',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
.Exam_PaperName { .Exam_PaperName {
width: 300px; width: 300px;
display:inline; display: inline;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -128,6 +128,15 @@ ...@@ -128,6 +128,15 @@
<template v-if="scope.row.PaperType==2"> <template v-if="scope.row.PaperType==2">
<q-btn flat size="xs" color="primary" style="font-weight:400" @click="goExameEdit(scope.row)" <q-btn flat size="xs" color="primary" style="font-weight:400" @click="goExameEdit(scope.row)"
label="编辑" /> label="编辑" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px">
<q-list>
<q-item clickable v-close-popup @click="publishExam(scope.row)">
<q-item-section>
<q-item-label>发布考试</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</template> </template>
</template> </template>
...@@ -206,7 +215,7 @@ ...@@ -206,7 +215,7 @@
//点击编辑 跳转 //点击编辑 跳转
goExameEdit(item) { goExameEdit(item) {
let PaperId = 0; let PaperId = 0;
if(item){ if (item) {
PaperId = item.PaperId PaperId = item.PaperId
} }
this.OpenNewUrl('/exam/examEdit', { this.OpenNewUrl('/exam/examEdit', {
...@@ -221,6 +230,16 @@ ...@@ -221,6 +230,16 @@
//关闭弹窗 //关闭弹窗
closeExamForm() { closeExamForm() {
this.isShowExamFolder = false; this.isShowExamFolder = false;
},
//发布考试
publishExam(item) {
let PaperId = 0;
if (item) {
PaperId = item.PaperId
}
this.OpenNewUrl('/exam/examPublish', {
PaperId: PaperId
})
} }
} }
} }
......
<!--组卷-->
<style>
.examCreat_Top {
width: 100%;
height: 30px;
line-height: 30px;
padding: 0 10px;
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
}
.examTi_List {
border: 1px solid #ddd;
margin-bottom: 20px;
}
.examCreat_Top i:hover {
color: red;
cursor: pointer;
}
</style>
<template>
<div class="page-body">
发布考试
<div class="row">
<q-input filled stack-label maxlength="30" :dense="false" v-model="postMsg.ExamStartTime"
class="col-6 q-pb-lg q-pr-lg" label="开始时间" />
<q-input filled stack-label maxlength="30" :dense="false" v-model="postMsg.ExamEndTime" class="col-6 q-pb-lg"
label="结束时间" />
</div>
<div class="row">
<q-input filled bottom-slots maxlength="10" v-model="postMsg.ExamTimes" label="考试限时" class="col-6 q-pb-lg q-pr-lg"
:dense="false">
<template v-slot:append>
分钟
</template>
</q-input>
<q-input filled bottom-slots maxlength="10" v-model="postMsg.ExamTimes" label="限时提交" class="col-6 q-pb-lg "
:dense="false">
<template v-slot:append>
分钟内不允许提交
</template>
</q-input>
</div>
<div class="row">
<q-input filled bottom-slots maxlength="10" v-model="postMsg.EnterTimes" label="限时进入"
class="col-6 q-pb-lg q-pr-lg" :dense="false">
<template v-slot:append>
分钟后不允许参加考试
</template>
</q-input>
</div>
防作弊设置
<br />
<div class="row">
<q-checkbox size="xs" v-model="postMsg.IsQuestionRandom" :true-value="1" :false-value="0" label="题目乱序"
class="col-6 q-pb-lg q-pr-lg" />
<q-checkbox size="xs" v-model="postMsg.IsOptionRandom" :true-value="1" :false-value="0" label="选项乱序"
class="col-6 q-pb-lg " />
</div>
<div class="row">
<span class="col-6 q-pb-lg q-pr-lg">
<q-checkbox size="xs" v-model="postMsg.IsLeaveAnswer" :true-value="1" :false-value="0" label="学生离开作答页面" />
<template>
<span style="position:relative;top:2px;">
<el-input style="width:100px;" size="small" v-model="postMsg.LeaveTimes"
@keyup.native="checkInteger(postMsg,'LeaveTimes')" maxlength="5"></el-input>
&nbsp;&nbsp;次,系统强制收卷
</span>
</template>
</span>
<q-checkbox size="xs" v-model="postMsg.IsDisableMultiTerminal" :true-value="1" :false-value="0" label="禁止学生多终端考试"
class="col-6 q-pb-lg " />
</div>
<div class="row">
<span class="col-6 q-pb-lg q-pr-lg">
<q-checkbox size="xs" v-model="postMsg.IsExamType" :true-value="1" :false-value="0" label="只允许" />
<template>
<span style="position:relative;top:2px;">
<el-select style="width:100px;" size="small" v-model="postMsg.ExamTypeValue">
<el-option :value="1" label="App"></el-option>
<el-option :value="2" label="PC"></el-option>
</el-select> &nbsp;&nbsp;考试
</span>
</template>
</span>
</div>
<div class="row">
<q-input filled bottom-slots maxlength="100" v-model="postMsg.ExamNotice" label="考试须知(换成UeEditor)"
class="col-6 q-pb-lg q-pr-lg" :dense="false">
</q-input>
</div>
高级设置
<br />
<div class="row">
<q-checkbox size="xs" v-model="postMsg.IsAutoSubmit" :true-value="1" :false-value="0" label="考试到达截止时间后自动提交"
class="col-6 q-pb-lg q-pr-lg" />
</div>
评分设置
<br />
<div class="row">
<q-checkbox size="xs" v-model="postMsg.FillInIsSubject" :true-value="1" :false-value="0" label="填空类型的题目设为主观题"
class="col-6 q-pb-lg q-pr-lg" />
<q-checkbox size="xs" v-model="postMsg.FillInIsIgnore" :true-value="1" :false-value="0" label="填空题答案不区分大小写"
class="col-6 q-pb-lg " />
</div>
<div class="row">
<q-checkbox size="xs" v-model="postMsg.IsHalfScore" :true-value="1" :false-value="0" label="多选题未选全给一半分"
class="col-6 q-pb-lg q-pr-lg" />
</div>
<div class="row">
<q-btn color="accent" size="sm" @click="setPublishExam" class="q-mr-md" label="发布考试"  />
</div>
</div>
</template>
<script>
'../../api/question/question'
import {
savePublishExam,
} from '../../api/teacher/index';
export default {
components: {
},
meta: {
title: "发布考试"
},
data() {
return {
postMsg: {
Id: 0, //发布编号
PaperId: 0, //试卷编号
PublishType: 1, // 发放类型(1-按班级发放,2-指定学生发放)
ExamStartTime: "2021-08-20 10:00:00", //考试开始时间
ExamEndTime: "2021-08-20 12:00:00", //考试结束时间
ExamTimes: 0, //考试限时
SubmitTimes: 0, //限时提交(多少分钟内不允许提交)
EnterTimes: 0, //限时进入(多少分钟后不允许参加考试)
IsQuestionRandom: 0, //题目乱序(1-是)
IsOptionRandom: 0, //选项乱序(1-是)
IsLeaveAnswer: 0, //学生离开作答页面(1-是)
LeaveTimes: 0, //离开次数
IsDisableMultiTerminal: 0, //是否禁用多终端(1-是)
IsExamType: 0, //是否只允许(App、PC)考试(1-是)
ExamTypeValue: 1, //考试终端类型(1-App,2-PC)
ExamNotice: "", //考试须知
PassScore: 0, //及格分数
IsAutoSubmit: 1, //考试到达截止时间后自动提交(1-是)
FillInIsSubject: 0, //填空类型的题目设为主观题(1-是)
FillInIsIgnore: 0, //填空题答案不区分大小写(1-是)
IsHalfScore: 1, //多选题未选全给一半分(1-是)
},
}
},
created() {
if (this.$route.query && this.$route.query.PaperId) {
this.postMsg.PaperId = decodeURI(this.$route.query.PaperId)
}
},
mounted() {
},
methods: {
//发布考试
setPublishExam() {
savePublishExam(this.postMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功!',
position: 'top'
})
this.$router.push({
path: '/exam/examManagement',
query: {}
});
} else {
this.$q.notify({
type: 'negative',
position: "top",
message: `操作失败!`
})
}
})
}
}
}
</script>
...@@ -1053,6 +1053,11 @@ const routes = [{ ...@@ -1053,6 +1053,11 @@ const routes = [{
component: () => component: () =>
import("pages/exam/examCreate") import("pages/exam/examCreate")
}, },
{
path: "/exam/examPublish", //发布考试
component: () =>
import("pages/exam/examPublish")
},
{ {
path: "/teacher/testdatabase", //题库查询 path: "/teacher/testdatabase", //题库查询
component: () => component: () =>
......
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