@@ -166,10 +166,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public ActionResult GetSeatData(string ClassRoomNo, string AcademicYearNo, int? Semester) | |||
public ActionResult GetSeatData(string ClassRoomNo, string AcademicYearNo, int? Semester,string LessonNo) | |||
{ | |||
var data = exam_ExamRoomIBLL.GetEntityByClassroomNo(ClassRoomNo, AcademicYearNo, Semester); | |||
var studata = exam_ArrangeExamTermNewIBLL.GetStuList(AcademicYearNo, Semester, ClassRoomNo).OrderBy(x => x.SitNumber); | |||
var studata = exam_ArrangeExamTermNewIBLL.GetStuList(AcademicYearNo, Semester, ClassRoomNo, LessonNo).OrderBy(x => x.SitNumber); | |||
var StuList = new List<EaxmStuList>(); | |||
var EaxmStartTime = ""; | |||
var EaxmEndTime = ""; | |||
@@ -83,6 +83,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
$('#AcademicYearNo').bind('change', function () { | |||
ClassRoomNo= '' | |||
var AcademicYearNo = ''; | |||
var Semester = ''; | |||
if ($('#AcademicYearNo').lrselectGet()) { | |||
@@ -102,6 +103,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
$('#Semester').bind('change', function () { | |||
ClassRoomNo = '' | |||
var AcademicYearNo = ''; | |||
var Semester = ''; | |||
if ($('#AcademicYearNo').lrselectGet()) { | |||
@@ -125,51 +127,26 @@ var bootstrap = function ($, learun) { | |||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||
$('#lr_view').on('click', function () { | |||
var AcademicYearNo = ''; | |||
var Semester = ''; | |||
var AcademicYearNo = $('#AcademicYearNo').lrselectGet() || ''; | |||
var Semester = $('#Semester').lrselectGet() || ''; | |||
var LessonNo = $('#LessonNo').lrselectGet() || ''; | |||
console.log({ AcademicYearNo, Semester, LessonNo }, AcademicYearNo != '' && Semester != '' && LessonNo != '') | |||
if (AcademicYearNo == '' && Semester == '' || LessonNo == '' ) { | |||
learun.alert.warning("请选择学年,学期以及课程"); | |||
return; | |||
} | |||
if (!ClassRoomNo) { | |||
learun.alert.warning("请选择考场"); | |||
return; | |||
} | |||
if ($('#AcademicYearNo').lrselectGet()) { | |||
AcademicYearNo = '22-23'//$('#AcademicYearNo').lrselectGet(); | |||
} | |||
if ($('#Semester').lrselectGet()) { | |||
Semester = '2'//$('#Semester').lrselectGet(); | |||
} | |||
////弹框文件名字SeatForm | |||
if (Semester != '' && AcademicYearNo != '') { | |||
learun.layerForm({ | |||
id: 'SeatForm', | |||
title: '排考座位表', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SeatForm?' + $.param({ ClassRoomNo: ClassRoomNo, AcademicYearNo: AcademicYearNo, Semester }), | |||
width: 1200, | |||
height: 800, | |||
btn: null | |||
}); | |||
// | |||
//$.ajax({ | |||
// url: '/EducationalAdministration/Exam_ArrangeExamTermNew/GetSeatData', | |||
// data: { ClassRoomNo: ClassRoomNo, AcademicYearNo: AcademicYearNo, Semester, Semester }, | |||
// type: "Post", | |||
// dataType: "json", | |||
// async: true, | |||
// cache: false, | |||
// success: function (data) { | |||
// console.log(data) | |||
// }, | |||
// error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
// }, | |||
// beforeSend: function () { | |||
// }, | |||
// complete: function () { | |||
// } | |||
//}); | |||
//座位数据 | |||
} | |||
learun.layerForm({ | |||
id: 'SeatForm', | |||
title: '排考座位表', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SeatForm?' + $.param({ ClassRoomNo, AcademicYearNo, Semester, LessonNo }), | |||
width: 1200, | |||
height: 800, | |||
btn: null | |||
}); | |||
}); | |||
}, | |||
initGird: function () { | |||
@@ -3,22 +3,24 @@ | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<link href="~/Content/css/UserCenter/user.css" rel="stylesheet" /> | |||
<div id="app"> | |||
<div class="title"> | |||
<div id="app"style="padding:20px;"> | |||
<div class="title" style="font-size:18px;color:#333;lineHeight:50px;textAlign:center;position:relative;"> | |||
{{dataOne.tClassroomName}}排考座位表 | |||
<div class="btn btn-primary no-print" style="position:absolute;right:0;top:6px" v-on:click="printClick">打 印</div> | |||
</div> | |||
<div class="desc"> | |||
<div class="desc" style="display:flex;justifyContent:space-between;color:#666;padding:10px;"> | |||
<span>监考老师:{{dataOne.teach}}</span> | |||
<span>考试时间:{{dataOne.EaxmStartTime}}{{dataOne.EaxmEndTime}}</span> | |||
</div> | |||
<ul class="StuList"> | |||
<li v-for="item in StuList" :key="item.SitNumber" :style="{width}"> | |||
<div class="content"> | |||
<ul class="StuList" style="overflow:hidden"> | |||
<li v-for="item in StuList" :key="item.SitNumber" :style="{width:width,float:'left',padding:'9px 10px',textAlign:'center'}"> | |||
<div class="content" style="border:1px solid #ccc;padding:6px;"> | |||
<div>{{item.StuName}}</div> | |||
{{item.SitNumber}} | |||
</div> | |||
</li> | |||
</ul> | |||
<div style="color:#333;font-size:14px;text-align:center;line-height:80px" v-if="isEmpty">暂无数据</div> | |||
</div> | |||
<script> | |||
var vm = new Vue({ | |||
@@ -28,7 +30,8 @@ | |||
StuList: [], | |||
dataOne: {}, | |||
StuListColumns: [], | |||
width:'10%' | |||
width: '10%', | |||
isEmpty: false, | |||
} | |||
}, | |||
created() { | |||
@@ -38,7 +41,8 @@ | |||
getData: function () { | |||
$.ajax({ | |||
url: '/EducationalAdministration/Exam_ArrangeExamTermNew/GetSeatData', | |||
data: { ClassRoomNo: request('ClassRoomNo'), AcademicYearNo: request('AcademicYearNo'), Semester: request('Semester') }, | |||
data: { | |||
ClassRoomNo: request('ClassRoomNo'), AcademicYearNo: request('AcademicYearNo'), Semester: request('Semester'), LessonNo: request('LessonNo') }, | |||
type: "Post", | |||
dataType: "json", | |||
async: true, | |||
@@ -47,6 +51,9 @@ | |||
if (res.code == 200) { | |||
this.StuList = res.data.StuList || [] | |||
this.dataOne = res.data.dataOne || {} | |||
if (!this.StuList.length) { | |||
this.isEmpty = true | |||
} | |||
//this.dataOne.SeatColumns = 5 | |||
this.width = 100 / (this.dataOne.SeatColumns || 10) + '%' | |||
} | |||
@@ -60,36 +67,11 @@ | |||
} | |||
}) | |||
}, | |||
printClick() { | |||
$('.btn').css('display','none') | |||
$('#app').jqprint({ noPrintSelector: ".no-print", }) | |||
$('.btn').css('display', 'block') | |||
} | |||
}, | |||
}) | |||
</script> | |||
<style lang="scss"> | |||
#app{ | |||
padding:20px; | |||
} | |||
.title{ | |||
font-size:18px; | |||
color:#333; | |||
line-height:50px; | |||
text-align:center; | |||
} | |||
.desc{ | |||
display:flex; | |||
justify-content:space-between; | |||
color:#666; | |||
padding:10px; | |||
} | |||
.StuList{ | |||
/*display:flex;*/ | |||
overflow:hidden; | |||
} | |||
.StuList li{ | |||
float:left; | |||
padding:9px 10px; | |||
text-align:center; | |||
} | |||
.StuList li .content{ | |||
border:1px solid #ccc; | |||
padding:6px; | |||
} | |||
</style> |
@@ -147,11 +147,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo) | |||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo,string LessonNo) | |||
{ | |||
try | |||
{ | |||
return exam_ArrangeExamTermNewService.GetStuList(AcademicYearNo, Semester, ClassRoomNo); | |||
return exam_ArrangeExamTermNewService.GetStuList(AcademicYearNo, Semester, ClassRoomNo, LessonNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> ScreeningPlan(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo); | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo,string LessonNo); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
@@ -378,13 +378,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo) | |||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo,string LessonNo) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null | |||
and e.AcademicYearNo ='" + AcademicYearNo + "' and e.Semester='" + Semester + "' and Classroomno= '" + ClassRoomNo + "' "); | |||
and e.AcademicYearNo ='" + AcademicYearNo + "' and e.Semester='" + Semester + "' and Classroomno= '" + ClassRoomNo + "' and LessonNo = '"+ LessonNo + "' "); | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString()); | |||
} | |||
catch (Exception ex) | |||