|
|
@@ -9,14 +9,134 @@ var refreshGirdData; |
|
|
|
|
|
|
|
var bootstrap = function ($, learun) { |
|
|
|
"use strict"; |
|
|
|
var datebegin = ''; |
|
|
|
var dateend = ''; |
|
|
|
//var ClassNo = ''; |
|
|
|
var ClassRoomNo = ''; |
|
|
|
//传参 |
|
|
|
var params = '{}', query = '{}'; |
|
|
|
//课程 |
|
|
|
var LessonTemp = []; |
|
|
|
//教师 |
|
|
|
var EmpInfo = []; |
|
|
|
//第几页 |
|
|
|
var pageNum = 1; |
|
|
|
var headData = [ |
|
|
|
{ |
|
|
|
label: '学校', name: 'F_SchoolId', width: 190, align: "center", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', |
|
|
|
key: value, |
|
|
|
keyId: 'f_companyid', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['f_fullname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: '学年', name: 'AcademicYearNo', width: 60, align: "center" }, |
|
|
|
{ label: '学期', name: 'Semester', width: 50, align: "center" }, |
|
|
|
{ label: '姓名', name: 'StuName', width: 100, align: "center" }, |
|
|
|
{ label: '学生编号', name: 'StuNo', width: 130, align: "center" }, |
|
|
|
{ label: '学籍号', name: 'StuCode', width: 150, align: "center" }, |
|
|
|
{ |
|
|
|
label: "系所", name: "DeptNo", width: 100, align: "center", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', |
|
|
|
key: value, |
|
|
|
keyId: 'deptno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['deptname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "专业", name: "MajorNo", width: 100, align: "center", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', |
|
|
|
key: value, |
|
|
|
keyId: 'majorno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['majorname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "班级", name: "ClassNo", width: 100, align: "center", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', |
|
|
|
key: value, |
|
|
|
keyId: 'classno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['classname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '考试日期', name: 'ExamDate', width: 90, align: "center", |
|
|
|
formatter: function (v) { |
|
|
|
return learun.formatDate(v, "yyyy-MM-dd"); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: '考试时间', name: 'ExamTime', width: 90, align: "center" }, |
|
|
|
{ label: '课程编号', name: 'LessonNo', width: 100, align: "center" }, |
|
|
|
{ label: '课程名称', name: 'LessonName', width: 200, align: "center" }, |
|
|
|
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "center" }, |
|
|
|
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "center" }, |
|
|
|
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "center" }, |
|
|
|
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "center" }, |
|
|
|
{ label: '班级名称', name: 'ClassName', width: 100, align: "center" }, |
|
|
|
{ label: '座位编号', name: 'SitNumber', width: 80, aligndd: "center" }, |
|
|
|
{ label: '任课教师', width: 130, align: "center", statistics: true, children: LessonTemp }, |
|
|
|
{ label: '考号', name: 'kh', width: 140, align: "center", ishide: false }, |
|
|
|
]; |
|
|
|
var page = { |
|
|
|
init: function () { |
|
|
|
page.initGird(); |
|
|
|
init: async function () { |
|
|
|
//获取教师 |
|
|
|
await new Promise((resolve) => { |
|
|
|
learun.clientdata.getAllAsync('sourceData', { |
|
|
|
code: 'EmpInfo', |
|
|
|
callback: function (dataes) { |
|
|
|
EmpInfo = dataes.map(e => { return { value: e.empno, text: e.empname } }) |
|
|
|
resolve() |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
params = request('params') || '{}' |
|
|
|
query = request('query') || '{}' |
|
|
|
////获取班级text |
|
|
|
//learun.clientdata.getAsync('custmerData', { |
|
|
|
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', |
|
|
|
// key: JSON.parse(query).ClassNo, |
|
|
|
// keyId: request('ClassNo'), |
|
|
|
// callback: function (_data) { |
|
|
|
// $('.printTitle').text(_data.classname+'教学质量检测考生统计表') |
|
|
|
// } |
|
|
|
//}); |
|
|
|
$.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetLessonList', JSON.parse(params), |
|
|
|
function (data) { |
|
|
|
var temparr = []; |
|
|
|
for (var i = 0; i < data.length; i++) { |
|
|
|
let obj = EmpInfo.find(e => e.value == data[i].text ) |
|
|
|
var item = {}; |
|
|
|
item.label = data[i].value; |
|
|
|
item.name = data[i].text; |
|
|
|
item.width = 150; |
|
|
|
item.formatterAsync = function (callback, value, row, op, $cell) { |
|
|
|
callback(obj ? obj.text : '') |
|
|
|
} |
|
|
|
item.align = "center"; |
|
|
|
temparr.push(item); |
|
|
|
} |
|
|
|
LessonTemp = temparr; |
|
|
|
page.initGird(); |
|
|
|
page.search() |
|
|
|
}); |
|
|
|
//page.initGird(); |
|
|
|
page.bind(); |
|
|
|
}, |
|
|
|
bind: function () { |
|
|
@@ -24,104 +144,82 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#lr_print').on('click', function () { |
|
|
|
$('#printPage').jqprint() |
|
|
|
}); |
|
|
|
//列选择 |
|
|
|
$('#lr_columns').on('click', function () { |
|
|
|
pageNum = 1 |
|
|
|
headData[0].ishide = headData[0].ishide ? false : true |
|
|
|
$("#gridtablePage1")[0].dfop = undefined |
|
|
|
//$("#gridtable")[0].dfop = headData |
|
|
|
//$('#gridtable1').jfGridSet('reload'); |
|
|
|
//console.log($("#gridtable").jfGrid) |
|
|
|
$('#gridtablePage1').lrAuthorizeJfGridLei({ |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', |
|
|
|
headData, |
|
|
|
mainId: 'AETId', |
|
|
|
sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', |
|
|
|
isPage: true, |
|
|
|
rows: 10, |
|
|
|
onRenderComplete: function (list) { |
|
|
|
if (list.length == 10) { |
|
|
|
pageNum += 1 |
|
|
|
$('#printPage').append( |
|
|
|
`<div class="page page` + pageNum + `"> |
|
|
|
<div class="pageContent"> |
|
|
|
<div class="printTitle">教学质量检测考生统计表</div> |
|
|
|
<div class="lr-layout-body" id="gridtablePage` + pageNum + `"></div> |
|
|
|
</div> |
|
|
|
</div>` |
|
|
|
) |
|
|
|
page.initGird() |
|
|
|
} else { |
|
|
|
if (!list.length) { |
|
|
|
$('.page' + pageNum).remove() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
page.search(); |
|
|
|
//page.initGird() |
|
|
|
}); |
|
|
|
}, |
|
|
|
initGird: function () { |
|
|
|
console.log($('#gridtable').jfGrid) |
|
|
|
$('#gridtable').jfGrid({ |
|
|
|
let id = '#gridtablePage' + pageNum |
|
|
|
$(id).jfGrid({ |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', |
|
|
|
headData: [ |
|
|
|
{ |
|
|
|
label: '学校', name: 'F_SchoolId', width: 190, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', |
|
|
|
key: value, |
|
|
|
keyId: 'f_companyid', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['f_fullname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: '学年', name: 'AcademicYearNo', width: 60, align: "left" }, |
|
|
|
{ label: '学期', name: 'Semester', width: 50, align: "left" }, |
|
|
|
{ label: '姓名', name: 'StuName', width: 100, align: "left" }, |
|
|
|
{ label: '学生编号', name: 'StuNo', width: 130, align: "left" }, |
|
|
|
{ label: '学籍号', name: 'StuCode', width: 130, align: "left" }, |
|
|
|
{ |
|
|
|
label: "系所", name: "DeptNo", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', |
|
|
|
key: value, |
|
|
|
keyId: 'deptno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['deptname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "专业", name: "MajorNo", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', |
|
|
|
key: value, |
|
|
|
keyId: 'majorno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['majorname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "班级", name: "ClassNo", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', |
|
|
|
key: value, |
|
|
|
keyId: 'classno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['classname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '考试日期', name: 'ExamDate', width: 90, align: "left", |
|
|
|
formatter: function (v) { |
|
|
|
return learun.formatDate(v, "yyyy-MM-dd"); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: '考试时间', name: 'ExamTime', width: 90, align: "left" }, |
|
|
|
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, |
|
|
|
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, |
|
|
|
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, |
|
|
|
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, |
|
|
|
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, |
|
|
|
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, |
|
|
|
{ label: '班级名称', name: 'ClassName', width: 100, align: "left" }, |
|
|
|
{ label: '座位编号', name: 'SitNumber', width: 80, aligndd: "left" }, |
|
|
|
{ label: '考号', name: 'kh', width: 140, align: "left", ishide: true }, |
|
|
|
], |
|
|
|
headData, |
|
|
|
mainId: 'AETId', |
|
|
|
sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', |
|
|
|
isPage: true, |
|
|
|
rows:10, |
|
|
|
onRenderComplete: function (list) { |
|
|
|
if (list.length == 10) { |
|
|
|
pageNum += 1 |
|
|
|
$('#printPage').append( |
|
|
|
`<div class="page page` + pageNum +`"> |
|
|
|
<div class="pageContent"> |
|
|
|
<div class="printTitle">教学质量检测考生统计表</div> |
|
|
|
<div class="lr-layout-body" id="gridtablePage` + pageNum + `"></div> |
|
|
|
</div> |
|
|
|
</div>` |
|
|
|
) |
|
|
|
page.initGird() |
|
|
|
} else { |
|
|
|
if (!list.length) { |
|
|
|
$('.page' + pageNum).remove() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
page.search(); |
|
|
|
}, |
|
|
|
search: function (param) { |
|
|
|
param = param || {}; |
|
|
|
param.StartTime = datebegin; |
|
|
|
param.EndTime = dateend; |
|
|
|
param.ClassRoomNo = ClassRoomNo; |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
search: function () { |
|
|
|
$('#gridtablePage' + pageNum).jfGridSet('reload', { queryJson: JSON.parse(query) }, { page: pageNum }); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
refreshGirdData = function () { |
|
|
|
$('#gridtable').jfGridSet('reload'); |
|
|
|
$('#gridtable1').jfGridSet('reload'); |
|
|
|
}; |
|
|
|
page.init(); |
|
|
|
} |