Commit a5b13c03 authored by Mac's avatar Mac
parents 58176547 ad1930ad
......@@ -20,7 +20,7 @@ export default {
</script>
<style>
@import url("//at.alicdn.com/t/font_2077629_fy2rbdc1zqw.css");
@import url("//at.alicdn.com/t/font_2077629_yt6s3mpdrdj.css");
.q-scrollarea__thumb {
z-index: 999999 !important;
}
......
......@@ -174,16 +174,16 @@
<div class="page-search row items-center">
<div class="col row wrap q-ml-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="research(1)" clearable standout="bg-primary text-white" v-model="msg.GuestName" label="学员名称"
@clear="research(0)" maxlength="20" />
<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(2)" clearable standout="bg-primary text-white" v-model="msg.ClassName" label="班级名称"
@clear="research(0)" maxlength="20" />
<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(3)" clearable standout="bg-primary text-white" v-model="msg.ClassNo" label="班级编号"
@clear="research(0)" maxlength="20" />
<q-input @input="research()" clearable standout="bg-primary text-white" v-model="msg.ClassNo" label="班级编号"
@clear="research()" maxlength="20" />
</div>
</div>
</div>
......@@ -192,7 +192,7 @@
<div class="SendOne_Left">
<div class="object_tit">
<span style="margin-left:20px;">班级/学生</span>
<span>全选</span>
<span style="cursor:pointer;" @click="Allchecked=!Allchecked">{{!Allchecked?"全选":"取消"}}</span>
</div>
<div class="objectList">
<ul>
......@@ -210,7 +210,7 @@
<ul class="stuChilden" :class="{'showChild':item.isShowChild}">
<li v-for="(subItem,subIndex) in item.SubList" :key="subIndex">
<div class="manageTitl" style="display:flex;justify-content:space-between;">
<div style="padding-left:40px;">{{subItem.Name}}</div>
<div style="padding-left:40px;">{{subItem.GuestId}} {{subItem.Name}}</div>
<div style="padding-right:35px;">
<el-checkbox v-model="subItem.IsCheck" @change="getchildCheck(item)">
</el-checkbox>
......@@ -273,19 +273,35 @@
loading: false, //表格加载进度条
dataList: [], //数据列表
checkedStu: [], //选中数据
checked: false,
AlldataList:[] //所有数据
Allchecked: false, //全选、取消全选
}
},
mounted() {
this.initData();
this.getClassStudentTree();
},
methods: {
initData() {
if (this.sendStudent && this.sendStudent.length > 0) {
this.sendStudent.forEach(item => {
this.checkedStu.push(item);
})
}
},
//点击父级全选或取消
getFatherCheck(item) {
if (item && item.SubList && item.SubList.length > 0) {
item.SubList.forEach(y => {
y.IsCheck = item.IsCheck;
//取消选中
if (!y.IsCheck) {
if (this.checkStuExists(y)) {
var cIndex = this.checkedStu.findIndex(cItem => cItem.GuestId == y.GuestId);
if (cIndex > -1 && cIndex < this.checkedStu.length) {
this.checkedStu.splice(cIndex, 1);
}
}
}
})
}
this.setStuChecked();
......@@ -305,6 +321,15 @@
item.IsCheck = false;
}
}
//取消选中
if (!item.IsCheck) {
if (this.checkStuExists(item)) {
var cIndex = this.checkedStu.findIndex(cItem => cItem.GuestId == item.GuestId);
if (cIndex > -1 && cIndex < this.checkedStu.length) {
this.checkedStu.splice(cIndex, 1);
}
}
}
this.setStuChecked();
},
//删除选中名单
......@@ -328,69 +353,47 @@
},
//重新查询
research(type) {
//按学员名称过滤
if(type==1){
const needle = this.msg.GuestName;
this.dataList = this.AlldataList.filter(
(v) => v.Name.indexOf(needle) > -1
);
console.log(this.dataList);
}
// this.getClassStudentTree();
this.getClassStudentTree();
},
//获取题库分页列表
getClassStudentTree() {
queryClassStudentTree(this.msg).then(res => {
if (res.Code == 1) {
this.dataList = res.Data;
this.AlldataList = res.Data;
this.dataList.forEach(x => {
x.isShowChild = false;
})
this.initStuCheck();
}
})
},
//设置选中或取消选中
setStuChecked() {
this.checkedStu = [];
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(rootItem => {
if (rootItem.SubList && rootItem.SubList.length > 0) {
rootItem.SubList.forEach(sItem => {
//选中
if (sItem.IsCheck) {
this.checkedStu.push(sItem);
if (!this.checkStuExists(sItem)) {
this.checkedStu.push(sItem);
}
}
})
}
})
}
},
//初始化选中
initStuCheck() {
if (this.sendStudent) {
if (this.sendStudent && this.sendStudent.length > 0 && this.dataList && this.dataList.length > 0) {
this.dataList.forEach(rootItem => {
if (rootItem.SubList && rootItem.SubList.length > 0) {
var num = 0;
rootItem.SubList.forEach(sItem => {
this.sendStudent.forEach(item => {
if (sItem.GuestId == item.GuestId) {
sItem.IsCheck = true;
num++;
this.checkedStu.push(sItem);
}
})
})
if (num == rootItem.SubList.length) {
rootItem.IsCheck = true;
} else {
rootItem.IsCheck = false;
}
}
})
}
//检查用户是否存在
checkStuExists(item) {
var isExists = false;
if (this.checkedStu && this.checkedStu.length > 0) {
this.checkedStu.forEach(cItem => {
if (!isExists && cItem.GuestId == item.GuestId) {
isExists = true;
}
})
}
return isExists;
},
//关闭弹窗
closeSaveForm() {
......@@ -409,7 +412,7 @@
watch: {
sendStudent: {
handler(newValue) {
this.initStuCheck();
this.initData();
},
deep: true
},
......
......@@ -23,7 +23,15 @@
.treeDiv .el-tree-node__content {
height: auto;
}
.Move_PaperName{
display: inline-block;
width:300px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
position: relative;
top:4px;
}
</style>
<!--移动到文件夹-->
<template>
......@@ -38,7 +46,7 @@
@node-click="handleNodeClick" default-expand-all>
<span class="custom-tree-node" slot-scope="{node,data}">
<span>
<i class="iconfont icon-wenjianjia" style="font-size:18px;margin-right:3px;"></i>
<i class="iconfont icon-weibiaoti5" style="font-size:18px;margin-right:3px;color:#85CDFD"></i>
<template v-if="data.isEdit">
<el-input size="small" v-model="folderMsg.PaperName"></el-input>
<span class="move_Icon">
......@@ -46,16 +54,18 @@
<i class="iconfont icon-shanchu2" @click="() => delMoveData(node, data)"></i>
</span>
</template>
<template v-else>{{data.PaperName}}</template>
<template v-else>
<div class="Move_PaperName">{{data.PaperName}}</div>
</template>
</span>
</span>
</el-tree>
</div>
<div class="movefolder_left" @click="CreateNewFolder(1)">
<i class="iconfont icon-xinjianwenjianjia"></i>同级目录
<i class="iconfont icon-weibiaoti5" style="color:#85CDFD"></i>同级目录
</div>
<div class="movefolder_left" @click="CreateNewFolder(2)">
<i class="iconfont icon-xinjianwenjianjia"></i>子目录
<i class="iconfont icon-weibiaoti5" style="color:#85CDFD"></i>子目录
</div>
</q-card-section>
<q-separator />
......@@ -117,7 +127,7 @@
//删除节点
delMoveData(node, nodeData) {
const parent = node.parent;
const children = parent.data.children || parent.data;
const children = parent.data.ChildList || parent.data;
const index = children.findIndex(d => d.PaperId === nodeData.PaperId);
children.splice(index, 1);
},
......@@ -126,14 +136,6 @@
},
//创建文件夹
CreateNewFolder(type) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择目标文件夹`
})
return
}
let obj = {
PaperId: 0,
PaperName: '',
......@@ -143,11 +145,26 @@
}
//同级目录
if (type == 1) {
this.folderMsg.ParentId = 0;
this.dataList.push(obj);
//选择了父级
if(this.checkFolder){
this.folderMsg.ParentId = this.checkFolder.ParentId;
this.checkFolder.ChildList.push(obj);
}else{
//直接点击不选父级
this.folderMsg.ParentId = 0;
this.dataList.push(obj);
}
}
//子目录
else if (type == 2) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择父级文件夹`
})
return
}
this.folderMsg.ParentId = this.checkFolder.PaperId;
this.checkFolder.ChildList.push(obj);
}
......
......@@ -238,7 +238,6 @@
} else {
qObj.SubAnwser = CreateQuestion(item.Key);
}
console.log("qObj", qObj)
this.data.push(qObj);
},
//删除选项
......
<style>
.OtherCourseNum {
display: inline-block;
width: 25px;
height: 25px;
text-align: center;
line-height: 25px;
border: 1px solid #2961fe;
border-radius: 50%;
cursor: pointer;
color: #2961fe;
}
.OtherCourseNum {
display: inline-block;
width: 25px;
height: 25px;
text-align: center;
line-height: 25px;
border: 1px solid #2961fe;
border-radius: 50%;
cursor: pointer;
color: #2961fe;
}
.OCourseTable {
width: 400px;
text-align: center;
}
.OCourseTable {
width: 400px;
text-align: center;
}
.OCourseTable tr td {
height: 40px;
}
.OCourseTable tr td {
height: 40px;
}
.OCourseTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.OCourseTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
</style>
<template>
<div class="page-body">
<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
@change="refreshPage"
clearable
standout="bg-primary text-white"
v-model="msg.GuestName"
label="考生名称"
@clear="refreshPage"
maxlength="20"
/>
<q-input @change="refreshPage" clearable standout="bg-primary text-white" v-model="msg.GuestName" label="考生名称"
@clear="refreshPage" maxlength="20" />
</div>
</div>
</div>
<div class="page-content">
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table sticky-right-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">考生管理</div>
</template>
<template v-slot:bottom>
<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" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
......@@ -93,87 +73,83 @@
</div>
</template>
<script>
import { getExaminationStudentPage } from "../../api/teacher/index";
export default {
meta: {
title: "考生管理",
},
data() {
return {
columns: [
{
name: "GuestId",
label: "考生编号",
field: "GuestId",
align: "left",
},
{
name: "GuestName",
label: "考生名称",
field: "GuestName",
align: "left",
},
{
name: "Mobile",
label: "电话",
field: "Mobile",
align: "left",
},
{
name: "ClassName",
label: "班级名称",
field: "ClassName",
align: "left",
import {
getExaminationStudentPage
} from "../../api/teacher/index";
export default {
meta: {
title: "考生管理",
},
data() {
return {
columns: [{
name: "GuestId",
label: "考生编号",
field: "GuestId",
align: "left",
},
{
name: "GuestName",
label: "考生名称",
field: "GuestName",
align: "left",
},
{
name: "Mobile",
label: "电话",
field: "Mobile",
align: "left",
},
{
name: "ClassName",
label: "班级名称",
field: "ClassName",
align: "left",
},
],
data: [],
loading: false,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
PublishId: 0,
GuestName: "", //学员名称
},
// {
// name: "optioned",
// label: "操作",
// field: "CourseId",
// },
],
data: [],
loading: false,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
PublishId: 0,
GuestName: "", //学员名称
},
pageCount: 0,
};
},
created() {
this.msg.PublishId = this.$route.query.Id;
console.log(289, this.$route);
},
mounted() {
this.getList();
},
methods: {
getList() {
getExaminationStudentPage(this.msg).then((res) => {
console.log(296, res);
if (res.Code === 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
});
pageCount: 0,
};
},
created() {
this.msg.PublishId = this.$route.query.Id;
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
mounted() {
this.getList();
},
methods: {
getList() {
getExaminationStudentPage(this.msg).then((res) => {
if (res.Code === 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
});
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
//刷新页面
refreshPage() {
this.msg.pageIndex = 1;
this.getList();
//刷新页面
refreshPage() {
this.msg.pageIndex = 1;
this.getList();
},
},
},
};
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
@import url('~assets/css/table.sass')
</style>
......@@ -211,7 +211,6 @@ export default {
this.dataList = [];
queryPublishExamPage(this.msg)
.then((res) => {
console.log("res=>", res);
this.loading = false;
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
......
......@@ -81,15 +81,18 @@
.selectClass span:hover i {
display: block;
}
.paper_QuesDes{
.paper_QuesDes {
font-size: 12px;
color: #A8A8B3;
display: block;
margin:0 0 15px 28px;
margin: 0 0 15px 28px;
}
#paper_Publish{
padding-left:60px!important;
#paper_Publish {
padding-left: 60px !important;
}
#paper_Publish .edui-editor {
z-index: 99 !important;
}
......@@ -112,14 +115,14 @@
<div class="setCt">
<span class="papPub_Left f1">发放时间</span>
<div class="f1">
<q-input filled v-model="postMsg.ExamStartTime" style="width:308px;" mask="####-##-## ##:##:##" label="开始时间" ref="StartTime"
:rules="[val => !!val || '请选择开始时间']">
<q-input filled v-model="postMsg.ExamStartTime" style="width:308px;" mask="####-##-## ##:##:##" label="开始时间"
ref="StartTime" :rules="[val => !!val || '请选择开始时间']">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start">
<q-date v-model="postMsg.ExamStartTime" mask="YYYY-MM-DD HH:mm:ss"></q-date>
<q-time v-model="postMsg.ExamStartTime" format24h mask="YYYY-MM-DD HH:mm:ss"/>
<q-time v-model="postMsg.ExamStartTime" format24h mask="YYYY-MM-DD HH:mm:ss" />
</div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
</q-popup-proxy>
......@@ -131,14 +134,14 @@
<div class="setCt">
<span class="papPub_Left f1">结束时间</span>
<div class="f1">
<q-input filled v-model="postMsg.ExamEndTime" style="width:308px;" mask="####-##-## ##:##:##" label="结束时间" ref="ExamEndTime"
:rules="[val => !!val || '请选择结束时间']">
<q-input filled v-model="postMsg.ExamEndTime" style="width:308px;" mask="####-##-## ##:##:##" label="结束时间"
ref="ExamEndTime" :rules="[val => !!val || '请选择结束时间']">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy2" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md row items-start">
<q-date v-model="postMsg.ExamEndTime" mask="YYYY-MM-DD HH:mm:ss"></q-date>
<q-time v-model="postMsg.ExamEndTime" format24h mask="YYYY-MM-DD HH:mm:ss"/>
<q-time v-model="postMsg.ExamEndTime" format24h mask="YYYY-MM-DD HH:mm:ss" />
</div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
</q-popup-proxy>
......@@ -172,8 +175,7 @@
<div class="setCt">
<span class="papPub_Left f1">限时进入</span>
<div class="f1">
<q-input filled bottom-slots maxlength="10" v-model="postMsg.EnterTimes" label="限时进入"
:dense="false">
<q-input filled bottom-slots maxlength="10" v-model="postMsg.EnterTimes" label="限时进入" :dense="false">
<template v-slot:append>
<span style="font-size:12px;">分钟后不允许参加考试</span>
</template>
......@@ -196,7 +198,10 @@
</span>
</template>
<div class="paper_QuesDes">系统强制收卷后,教师重新发放试卷,学生可以继续作答</div>
<div style="margin-bottom:15px;"><q-checkbox size="xs" v-model="postMsg.IsDisableMultiTerminal" :true-value="1" :false-value="0" label="禁止学生多终端考试" /></div>
<div style="margin-bottom:15px;">
<q-checkbox size="xs" v-model="postMsg.IsDisableMultiTerminal" :true-value="1" :false-value="0"
label="禁止学生多终端考试" />
</div>
<q-checkbox size="xs" v-model="postMsg.IsExamType" :true-value="1" :false-value="0" label="只允许" />
<template>
<span style="position:relative;top:2px;">
......@@ -210,7 +215,8 @@
</div>
<div class="setCt">
<span class="papPub_Left f1">考试须知</span>
<UeEditor v-model="postMsg.ExamNotice" :config="config" style="margin:30px 0 0 110px;z-index:1;width:1026px" ref="UE_Title"></UeEditor>
<UeEditor v-model="postMsg.ExamNotice" :config="config" style="margin:30px 0 0 110px;z-index:1;width:1026px"
ref="UE_Title"></UeEditor>
</div>
<div style="margin:20px 0">高级设置</div>
<div class="setCt">
......@@ -231,7 +237,8 @@
<div class="row">
<q-btn color="accent" @click="setPublishExam" class="q-mr-md" label="发布考试"  />
</div>
<classstutreeForm v-if="isShowClassStu" :sendStudent="sendStudent"  @close="closeClassStuForm"  @success="getClassStuList">
<classstutreeForm v-if="isShowClassStu" :sendStudent="sendStudent"  @close="closeClassStuForm"
 @success="getClassStuList">
</classstutreeForm>
</div>
</template>
......@@ -256,8 +263,8 @@
Id: 0, //发布编号
PaperId: 0, //试卷编号
PublishType: 1, // 发放类型(1-按班级发放,2-指定学生发放)
ExamStartTime: "2021-08-20 10:00:00", //考试开始时间
ExamEndTime: "2021-08-20 12:00:00", //考试结束时间
ExamStartTime: "2021-08-30 10:00:00", //考试开始时间
ExamEndTime: "2021-08-30 12:00:00", //考试结束时间
ExamTimes: 0, //考试限时
SubmitTimes: 0, //限时提交(多少分钟内不允许提交)
EnterTimes: 0, //限时进入(多少分钟后不允许参加考试)
......@@ -280,9 +287,8 @@
initialFrameWidth: null,
initialFrameHeight: 80,
},
isShowClassStu: false, //是否显示学员弹窗
sendStudent:[], //传送已选学生
sendStudent: [], //传送已选学生
}
},
created() {
......@@ -297,27 +303,29 @@
mounted() {
},
watch:{
"postMsg.StudentList":{
handler(val){
watch: {
"postMsg.StudentList": {
handler(val) {
this.sendStudent = [];
val.forEach(x=>{
let obj={
ClassId:x.ClassId,
CourseId:x.CourseId,
GuestId:x.GuestId,
Name:x.GuestName,
OrderId:x.OrderId
}
this.sendStudent.push(obj);
})
if (this.postMsg.StudentList && this.postMsg.StudentList.length > 0) {
this.postMsg.StudentList.forEach(x => {
let obj = {
ClassId: x.ClassId,
CourseId: x.CourseId,
GuestId: x.GuestId,
Name: x.GuestName,
OrderId: x.OrderId
}
this.sendStudent.push(obj);
})
}
}
}
},
methods: {
//删除发放对象
delStudentName(index){
this.postMsg.StudentList.splice(index,1);
delStudentName(index) {
this.postMsg.StudentList.splice(index, 1);
},
getExamInfo() {
queryExamPublish({
......@@ -364,7 +372,7 @@
},
//获取选中的需要列表
getClassStuList(array) {
this.postMsg.StudentList=[];
this.postMsg.StudentList = [];
if (array && array.length > 0) {
array.forEach(item => {
this.postMsg.StudentList.push({
......
......@@ -479,7 +479,6 @@ export default {
queryExamPublish({
Id: this.postMsg.Id,
}).then((res) => {
console.log("res", res);
if (res.Code == 1) {
var tempData = res.Data;
if (tempData) {
......
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