|
|
|
@ -61,8 +61,7 @@
|
|
|
|
|
<select name="teacherOpenCourseQuestionSettingId" lay-verify="">
|
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
{{# layui.each(d, function(index, item){ }}
|
|
|
|
|
<option value="{{item.teacherOpenCourseQuestionSettingId}}">{{item.teacherOpenCourseQuestionSettingName}}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="{{item.teacherOpenCourseQuestionSettingId}}" {{item.teacherOpenCourseQuestionSettingId == ${questionSettingId}?'selected':''}}>{{item.teacherOpenCourseQuestionSettingName}}</option>
|
|
|
|
|
{{# }); }}
|
|
|
|
|
</select>
|
|
|
|
|
</script>
|
|
|
|
@ -124,6 +123,8 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
var questionSettingId = $("input[name='questionSettingId']").val();
|
|
|
|
|
var teacherOpenCourseId=$("input[name='teacherOpenCourseId']").val();
|
|
|
|
|
var questionSettingType = $("input[name='questionSettingType']").val();
|
|
|
|
|
var studentIdClick = "";
|
|
|
|
|
|
|
|
|
|
laydate.render({
|
|
|
|
|
elem: '#test5'
|
|
|
|
|
,type: 'datetime'
|
|
|
|
@ -158,9 +159,18 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
initTable:function(){
|
|
|
|
|
var sx_ = localStorage.getItem("teacherOpenCourseQuestionLogTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存
|
|
|
|
|
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
|
|
|
|
|
var url = '/api/teacherOpenCourseQuestionLog/list.do?questionLogAddType=FINALLY_SUBMIT';//"作业-题目类型
|
|
|
|
|
var url = "";
|
|
|
|
|
if(questionSettingType == 'HOMEWORK_FILE'){//作业-附件类型
|
|
|
|
|
url = '/jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json';
|
|
|
|
|
//url = "/api/teacherOpenCourseQuestionLog/getPageList.do“
|
|
|
|
|
}else if(questionSettingType == 'HOMEWORK_QUESTION'){//作业-题库类型
|
|
|
|
|
//api/teacherOpenCourseQuestionLog/list.do
|
|
|
|
|
url = '/api/teacherOpenCourseQuestionLog/list.do';//"作业-题目类型
|
|
|
|
|
//url = "/api/questionLogSummary/getPageList.do";
|
|
|
|
|
}else if(questionSettingType == 'CHAPTER_EXERCISE'){//章节
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/getPageList.do";
|
|
|
|
|
}else if(questionSettingType == 'EXAM'){//考试
|
|
|
|
|
url ="/api/teacherOpenCourseQuestionLog/getPageList.do";
|
|
|
|
|
}
|
|
|
|
|
teacherOpenCourseQuestionLogTable = table.render({
|
|
|
|
|
elem: '#teacherOpenCourseQuestionLogTable',
|
|
|
|
@ -171,7 +181,7 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
,page : Lib.tablePage // 开启分页
|
|
|
|
|
/* ,toolbar: '#toolbar_teacherOpenCourseQuestionLog' //自定义头部左侧工具栏
|
|
|
|
|
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
|
|
|
|
|
,where:{'teacherOpenCourseQuestionSettingId':questionSettingId}
|
|
|
|
|
,where:getParam()
|
|
|
|
|
,limit : 10,
|
|
|
|
|
cols : [ [ // 表头
|
|
|
|
|
{
|
|
|
|
@ -316,18 +326,14 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
$(".layui-table-body tr ").attr({"style": "color:#666"});//其他tr恢复原样
|
|
|
|
|
// console.log(obj.tr) //得到当前点击的tr
|
|
|
|
|
$(obj.tr).attr({"style": "color:#5FB878"});//改变当前tr颜色
|
|
|
|
|
var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val();
|
|
|
|
|
var param={
|
|
|
|
|
'studentId':obj.data.studentId,
|
|
|
|
|
'teacherOpenCourseQuestionSettingId':$.isEmpty(settingId)?questionSettingId:settingId,
|
|
|
|
|
};
|
|
|
|
|
if(questionSettingType == 'HOMEWORK_FILE'){
|
|
|
|
|
studentIdClick = obj.data.studentId;
|
|
|
|
|
/*if(questionSettingType == 'HOMEWORK_FILE'){
|
|
|
|
|
url = 'jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json';
|
|
|
|
|
param = {"questionSettingIdPlural":questionSettingId};
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseQuestionLogTable.reload({
|
|
|
|
|
where: param,
|
|
|
|
|
where: getParam(studentIdClick),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
@ -341,11 +347,15 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
|
|
|
|
|
var btn_s = $("#searchFormSearch");
|
|
|
|
|
btn_s.on('click', function () {
|
|
|
|
|
var data = $("#searchForm").serializeJson();
|
|
|
|
|
data.teacherOpenCourseQuestionSettingId =$.isEmpty(data.teacherOpenCourseQuestionSettingId)?questionSettingId:data.teacherOpenCourseQuestionSettingId
|
|
|
|
|
|
|
|
|
|
studentIdClick = "";
|
|
|
|
|
teacherOpenCourseQuestionLogTable.reload({
|
|
|
|
|
where: data,
|
|
|
|
|
where: getParam(),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
studentTable.reload({
|
|
|
|
|
where: getParam_s(),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
@ -354,12 +364,19 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
|
|
|
|
|
var btn = $("#studentFormSearch");
|
|
|
|
|
btn.on('click', function () {
|
|
|
|
|
studentIdClick = "";
|
|
|
|
|
studentTable.reload({
|
|
|
|
|
where: getParam_s(),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
teacherOpenCourseQuestionLogTable.reload({
|
|
|
|
|
where: getParam(),
|
|
|
|
|
page: {
|
|
|
|
|
curr: 1
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -402,26 +419,35 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
Common.openDlg(url, "teacherOpenCourseQuestionLog管理>上传");
|
|
|
|
|
},*/
|
|
|
|
|
exportDocument: function () {
|
|
|
|
|
var url,title;
|
|
|
|
|
var settingId = $("select[name='teacherOpenCourseQuestionSettingId']").val();
|
|
|
|
|
settingId = $.isEmpty(settingId)?questionSettingId:settingId;
|
|
|
|
|
|
|
|
|
|
var url = "",title = "",value = "";
|
|
|
|
|
var param = getParam(studentIdClick);
|
|
|
|
|
param.questionSettingType = questionSettingType;
|
|
|
|
|
if(questionSettingType == "CHAPTER_EXERCISE"){///jlw/questionLogSummary/homeworkFileAnalysisExport.json
|
|
|
|
|
title = '章节详情表';
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
|
|
|
|
|
//url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do";
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/exportInfo.do"
|
|
|
|
|
}else if(questionSettingType == "EXAM"){
|
|
|
|
|
title = '考试详情表';
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
|
|
|
|
|
//url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do";
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/exportInfo.do";
|
|
|
|
|
}else if(questionSettingType == "HOMEWORK_FILE"){
|
|
|
|
|
title = '附件作业详情表';
|
|
|
|
|
url = '/jlw/questionLogSummary/homeworkFileAnalysisExport.json?teacherOpenCourseId'+ teacherOpenCourseId + '&questionSettingType=' + questionSettingType;
|
|
|
|
|
url = '/jlw/questionLogSummary/homeworkFileAnalysisExport.json';
|
|
|
|
|
}else if(questionSettingType == "HOMEWORK_QUESTION"){
|
|
|
|
|
title ="题库作业详情表";
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do?teacherOpenCourseQuestionSettingId=" + settingId;
|
|
|
|
|
//url = "/api/teacherOpenCourseQuestionLog/zyDetailExport.do";
|
|
|
|
|
url = "/api/teacherOpenCourseQuestionLog/exportInfo.do";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Common.openConfirm("确认要导出"+title+"?", function (index) {
|
|
|
|
|
$.downFile(Common.ctxPath + url);
|
|
|
|
|
for(let k in param) {
|
|
|
|
|
if(!$.isEmpty(param[k])){
|
|
|
|
|
value+='&'+k+"="+param[k];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!$.isEmpty(value)){
|
|
|
|
|
url = url +"?" + value.slice(1);
|
|
|
|
|
}
|
|
|
|
|
Common.openConfirm("确认要导出-"+title+"?", function (index) {
|
|
|
|
|
$.downFile(Common.ctxPath + url,title);
|
|
|
|
|
layer.close(index);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -459,13 +485,55 @@ layui.use(['form','laydate','table','laytpl'], function(){
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
function getParam(studentId) {
|
|
|
|
|
var param = $("#searchForm").serializeJson();
|
|
|
|
|
param.studentId = studentId;
|
|
|
|
|
if(questionSettingType == "CHAPTER_EXERCISE"){//章节
|
|
|
|
|
param.teacherOpenCourseMergeCourseInfoId = "";
|
|
|
|
|
}
|
|
|
|
|
if(questionSettingType == "HOMEWORK_QUESTION"){//作业_题库
|
|
|
|
|
param.questionSettingType = questionSettingType;
|
|
|
|
|
}
|
|
|
|
|
if($.isEmpty(param.teacherOpenCourseQuestionSettingId)){
|
|
|
|
|
param.teacherOpenCourseQuestionSettingId = questionSettingId;
|
|
|
|
|
}
|
|
|
|
|
if(questionSettingType == "HOMEWORK_FILE"){
|
|
|
|
|
param.questionSettingType = questionSettingType;
|
|
|
|
|
param.teacherOpenCourseQuestionLogStatus = 1;
|
|
|
|
|
}
|
|
|
|
|
if(questionSettingType == "EXAM"){
|
|
|
|
|
param.teacherOpenCourseId = teacherOpenCourseId;
|
|
|
|
|
}
|
|
|
|
|
return param;
|
|
|
|
|
}
|
|
|
|
|
function getParam_s(){
|
|
|
|
|
var schoolClassId = $("#studentForm select[name='classId']").val();
|
|
|
|
|
var teacherOpenCourseQuestionSettingId = $("#searchForm select[name='teacherOpenCourseQuestionSettingId']").val()||questionSettingId;
|
|
|
|
|
var param = {
|
|
|
|
|
"schoolClassIdPlural":$("#studentForm select[name='classId']").val(),
|
|
|
|
|
"studentSnOrName":$("#studentForm input[name='studentOrName']").val(),
|
|
|
|
|
'teacherOpenCourseId': teacherOpenCourseId
|
|
|
|
|
"studentOrName":$("#studentForm input[name='studentOrName']").val(),
|
|
|
|
|
"teacherOpenCourseQuestionSettingId":teacherOpenCourseQuestionSettingId,
|
|
|
|
|
};
|
|
|
|
|
if(questionSettingType == "CHAPTER_EXERCISE"){//章节
|
|
|
|
|
param.schoolClassIdPlural = schoolClassId;
|
|
|
|
|
param.teacherOpenCourseId = teacherOpenCourseId;
|
|
|
|
|
param.teacherOpenCourseQuestionLogStatus = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(questionSettingType == "HOMEWORK_QUESTION"){//作业_题库
|
|
|
|
|
param.schoolClassId = schoolClassId;
|
|
|
|
|
param.teacherOpenCourseQuestionLogStatus = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(questionSettingType == "HOMEWORK_FILE"){//作业_附件
|
|
|
|
|
param.schoolClassId = schoolClassId;
|
|
|
|
|
param.questionSettingType = questionSettingType;
|
|
|
|
|
param.teacherOpenCourseQuestionLogStatus = 1;
|
|
|
|
|
}
|
|
|
|
|
if(questionSettingType == "EXAM"){//考试
|
|
|
|
|
param.teacherOpenCourseQuestionLogStatus = 2;
|
|
|
|
|
param.type = 1;
|
|
|
|
|
param.schoolClassId = schoolClassId;
|
|
|
|
|
}
|
|
|
|
|
return param
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|