Commit 38d28fa4 authored by 黄奎's avatar 黄奎

页面修改

parent 666286f2
...@@ -202,4 +202,16 @@ export function queryPublishExamPage(data) { ...@@ -202,4 +202,16 @@ export function queryPublishExamPage(data) {
method: 'post', method: 'post',
data data
}) })
}
/**
* 根据编号获取考卷发布信息
* @param {JSON参数} data
*/
export function queryExamPublish(data) {
return request({
url: '/Exam/GetExamPublish',
method: 'post',
data
})
} }
\ No newline at end of file
...@@ -4,6 +4,22 @@ ...@@ -4,6 +4,22 @@
<q-card-section> <q-card-section>
<div class="text-h6">选择学员</div> <div class="text-h6">选择学员</div>
</q-card-section> </q-card-section>
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.GuestName" label="学员名称"
@clear="research" maxlength="20" />
</div>
<div class="col-3">
<q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.ClassName" label="班级名称"
@clear="research" maxlength="20" />
</div>
<div class="col-3">
<q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.ClassNo" label="班级编号"
@clear="research" maxlength="20" />
</div>
</div>
</div>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<el-tree :data="dataList" show-checkbox node-key="GuestId" ref="classStuTree" highlight-current <el-tree :data="dataList" show-checkbox node-key="GuestId" ref="classStuTree" highlight-current
:props="defaultProps"> :props="defaultProps">
...@@ -29,7 +45,11 @@ ...@@ -29,7 +45,11 @@
children: 'SubList', children: 'SubList',
label: 'Name' label: 'Name'
}, },
msg: {}, //查询参数 msg: {
GuestName: "", //学员名称
ClassName: "", //班级名称
ClassNo: "", //班级编号
}, //查询参数
loading: false, //表格加载进度条 loading: false, //表格加载进度条
dataList: [], //数据列表 dataList: [], //数据列表
} }
...@@ -38,6 +58,10 @@ ...@@ -38,6 +58,10 @@
this.getClassStudentTree(); this.getClassStudentTree();
}, },
methods: { methods: {
//重新查询
research() {
this.getClassStudentTree();
},
//获取题库分页列表 //获取题库分页列表
getClassStudentTree() { getClassStudentTree() {
queryClassStudentTree(this.msg).then(res => { queryClassStudentTree(this.msg).then(res => {
...@@ -58,8 +82,7 @@ ...@@ -58,8 +82,7 @@
var checkArray = this.$refs.classStuTree.getCheckedNodes(); var checkArray = this.$refs.classStuTree.getCheckedNodes();
if (checkArray && checkArray.length > 0) { if (checkArray && checkArray.length > 0) {
checkArray.forEach(item => { checkArray.forEach(item => {
if (item.SubList && item.SubList.length > 0) { if (item.SubList && item.SubList.length > 0) {} else {
} else {
tempArray.push(item); tempArray.push(item);
} }
}) })
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" color="accent" style="font-weight:400" label="详情" /> <q-btn flat size="xs" color="accent" style="font-weight:400" label="修改" @click="publishExam(props.row)" />
<q-btn flat size="xs" color="accent" style="font-weight:400" label="考生管理" /> <q-btn flat size="xs" color="accent" style="font-weight:400" label="考生管理" />
</q-td> </q-td>
</template> </template>
...@@ -155,6 +155,12 @@ ...@@ -155,6 +155,12 @@
this.getList(); this.getList();
}, },
methods: { methods: {
//修改考试相关
publishExam(item) {
this.OpenNewUrl('/exam/paperPublish', {
Id: item.Id
});
},
//创建试卷 //创建试卷
CreatePaper() { CreatePaper() {
this.OpenNewUrl('/exam/paperCreate', {}) this.OpenNewUrl('/exam/paperCreate', {})
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
分钟 分钟
</template> </template>
</q-input> </q-input>
<q-input filled bottom-slots maxlength="10" v-model="postMsg.ExamTimes" label="限时提交" class="col-6 q-pb-lg " <q-input filled bottom-slots maxlength="10" v-model="postMsg.SubmitTimes" label="限时提交" class="col-6 q-pb-lg "
:dense="false"> :dense="false">
<template v-slot:append> <template v-slot:append>
分钟内不允许提交 分钟内不允许提交
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
import classstutreeForm from '../../components/exam/classstutree-form' import classstutreeForm from '../../components/exam/classstutree-form'
import { import {
savePublishExam, savePublishExam,
queryExamPublish,
} from '../../api/teacher/index'; } from '../../api/teacher/index';
export default { export default {
components: { components: {
...@@ -170,11 +170,51 @@ ...@@ -170,11 +170,51 @@
if (this.$route.query && this.$route.query.PaperId) { if (this.$route.query && this.$route.query.PaperId) {
this.postMsg.PaperId = decodeURI(this.$route.query.PaperId) this.postMsg.PaperId = decodeURI(this.$route.query.PaperId)
} }
if (this.$route.query && this.$route.query.Id) {
this.postMsg.Id = decodeURI(this.$route.query.Id);
this.getExamInfo();
}
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getExamInfo() {
queryExamPublish({
Id: this.postMsg.Id
}).then(res => {
console.log("res", res);
if (res.Code == 1) {
var tempData = res.Data;
if (tempData) {
this.postMsg.Id = tempData.Id;
this.postMsg.PaperId = tempData.PaperId;
this.postMsg.PublishType = tempData.PublishType;
this.postMsg.ExamStartTime = tempData.ExamStartTime;
this.postMsg.ExamEndTime = tempData.ExamEndTime;
this.postMsg.ExamTimes = tempData.ExamTimes;
this.postMsg.SubmitTimes = tempData.SubmitTimes;
this.postMsg.EnterTimes = tempData.EnterTimes;
this.postMsg.IsQuestionRandom = tempData.IsQuestionRandom;
this.postMsg.IsOptionRandom = tempData.IsOptionRandom;
this.postMsg.IsLeaveAnswer = tempData.IsLeaveAnswer;
this.postMsg.LeaveTimes = tempData.LeaveTimes;
this.postMsg.IsDisableMultiTerminal = tempData.IsDisableMultiTerminal;
this.postMsg.IsExamType = tempData.IsExamType;
this.postMsg.ExamTypeValue = tempData.ExamTypeValue;
this.postMsg.ExamNotice = tempData.ExamNotice;
this.postMsg.PassScore = tempData.PassScore;
this.postMsg.IsAutoSubmit = tempData.IsAutoSubmit;
this.postMsg.FillInIsSubject = tempData.FillInIsSubject;
this.postMsg.FillInIsIgnore = tempData.FillInIsIgnore;
this.postMsg.IsHalfScore = tempData.IsHalfScore;
if (tempData.StudentList && tempData.StudentList.length > 0) {
this.postMsg.StudentList = tempData.StudentList;
}
}
}
})
},
//显示班级学员弹窗 //显示班级学员弹窗
showClassStu() { showClassStu() {
this.isShowClassStu = true; this.isShowClassStu = true;
......
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