|
|
@ -225,7 +225,7 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
|
|
|
|
, btn: ['保存','关闭']
|
|
|
|
, btn: ['保存','关闭']
|
|
|
|
,success:function () {
|
|
|
|
,success:function () {
|
|
|
|
resourcesQuestionTable();
|
|
|
|
resourcesQuestionTable();
|
|
|
|
Lib.getCourseInfo($("select[name='courseInfoId_1']"), teacherOpenCourseId);
|
|
|
|
Lib.getCourseInfo($("select[name='courseInfoId_1']"), teacherOpenCourseId,2,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
, yes: function (index, layero) {
|
|
|
|
, yes: function (index, layero) {
|
|
|
|
var ret = Common.getAjax('/jlw/handsOnSimulationTasks/getObjectiveProblem.do?problemIds='+resourcesQuestionIds);
|
|
|
|
var ret = Common.getAjax('/jlw/handsOnSimulationTasks/getObjectiveProblem.do?problemIds='+resourcesQuestionIds);
|
|
|
@ -250,8 +250,8 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
|
|
|
|
btn.on('click', function () {
|
|
|
|
btn.on('click', function () {
|
|
|
|
resourcesQuestionTable1.reload({
|
|
|
|
resourcesQuestionTable1.reload({
|
|
|
|
where: {
|
|
|
|
where: {
|
|
|
|
'courseInfoParentId':teacherOpenCourseId,
|
|
|
|
'teacherOpenCourseId':teacherOpenCourseId,
|
|
|
|
'courseInfoId':$("#resourcesQuestionTable_demo select[name='courseInfoId_1']").find("option:selected").val(),
|
|
|
|
'teacherOpenCourseMergeCourseInfoId':$("#resourcesQuestionTable_demo select[name='courseInfoId_1']").find("option:selected").val(),
|
|
|
|
"questionStem":$("#resourcesQuestionTable_demo input[name='generalQuestionSettingName']").val(),
|
|
|
|
"questionStem":$("#resourcesQuestionTable_demo input[name='generalQuestionSettingName']").val(),
|
|
|
|
'questionType':$("#resourcesQuestionTable_demo select[name='questionType']").find("option:selected").val()
|
|
|
|
'questionType':$("#resourcesQuestionTable_demo select[name='questionType']").find("option:selected").val()
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -263,22 +263,23 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
|
|
|
|
if (obj.type == "all") {//全选
|
|
|
|
if (obj.type == "all") {//全选
|
|
|
|
var checkStatus = table.checkStatus('resourcesQuestionTable').data;
|
|
|
|
var checkStatus = table.checkStatus('resourcesQuestionTable').data;
|
|
|
|
for (var i = 0; i < checkStatus.length; i++) {
|
|
|
|
for (var i = 0; i < checkStatus.length; i++) {
|
|
|
|
if (("," + resourcesQuestionIds + ",").indexOf(checkStatus[i].resourcesQuestionId) < 0) {
|
|
|
|
if (("," + resourcesQuestionIds + ",").indexOf(checkStatus[i].teacherOpenCourseMergeResourcesQuestionId) < 0) {
|
|
|
|
if (!$.isEmpty(resourcesQuestionIds)) {
|
|
|
|
if (!$.isEmpty(resourcesQuestionIds)) {
|
|
|
|
resourcesQuestionIds += "," + checkStatus[i].resourcesQuestionId;
|
|
|
|
resourcesQuestionIds += "," + checkStatus[i].teacherOpenCourseMergeResourcesQuestionId;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
resourcesQuestionIds = checkStatus[i].resourcesQuestionId;
|
|
|
|
resourcesQuestionIds = checkStatus[i].teacherOpenCourseMergeResourcesQuestionId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
console.log(obj.data)
|
|
|
|
if (!$.isEmpty(resourcesQuestionIds)) {
|
|
|
|
if (!$.isEmpty(resourcesQuestionIds)) {
|
|
|
|
resourcesQuestionIds += "," + obj.data.resourcesQuestionId;
|
|
|
|
resourcesQuestionIds += "," + obj.data.teacherOpenCourseMergeResourcesQuestionId;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
resourcesQuestionIds = obj.data.resourcesQuestionId;
|
|
|
|
resourcesQuestionIds = obj.data.teacherOpenCourseMergeResourcesQuestionId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {//取消全选
|
|
|
|
} else {//取消选中
|
|
|
|
if (obj.type == "all") {//全选
|
|
|
|
if (obj.type == "all") {//全选
|
|
|
|
var checkStatus = table.cache["resourcesQuestionTable"];
|
|
|
|
var checkStatus = table.cache["resourcesQuestionTable"];
|
|
|
|
for (var i = 0; i < checkStatus.length; i++) {
|
|
|
|
for (var i = 0; i < checkStatus.length; i++) {
|
|
|
@ -288,7 +289,6 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
|
|
|
|
resourcesQuestionIds = Lib.stringRemove(resourcesQuestionIds, obj.data.resourcesQuestionId);
|
|
|
|
resourcesQuestionIds = Lib.stringRemove(resourcesQuestionIds, obj.data.resourcesQuestionId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$("#countQ").html(resourcesQuestionIds.split(',').length)
|
|
|
|
$("#countQ").html(resourcesQuestionIds.split(',').length)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -316,10 +316,10 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
|
|
|
|
method: 'post',
|
|
|
|
method: 'post',
|
|
|
|
even: true,
|
|
|
|
even: true,
|
|
|
|
size: "sms",
|
|
|
|
size: "sms",
|
|
|
|
url: Common.ctxPath + '/jlw/resourcesQuestion/list.json' // 数据接口
|
|
|
|
url: Common.ctxPath + '/api/teacherOpenCourseMergeResourcesQuestion/getManagePageList.do' // 数据接口
|
|
|
|
, page: Lib.tablePage // 开启分页
|
|
|
|
, page: Lib.tablePage // 开启分页
|
|
|
|
, limit: 8
|
|
|
|
, limit: 8
|
|
|
|
, where: {"courseInfoParentId": teacherOpenCourseId}
|
|
|
|
, where: {"teacherOpenCourseId": teacherOpenCourseId}
|
|
|
|
,cols: [[ // 表头
|
|
|
|
,cols: [[ // 表头
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: 'checkbox', align: "center"
|
|
|
|
type: 'checkbox', align: "center"
|
|
|
@ -335,11 +335,11 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnSimulationTas
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
field: 'courseInfoParentName',
|
|
|
|
field: 'teacherOpenCourseIdText',
|
|
|
|
title: '归属课程', align: "center"
|
|
|
|
title: '归属课程', align: "center"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
field: 'courseInfoName',
|
|
|
|
field: 'teacherOpenCourseMergeCourseInfoIdText',
|
|
|
|
title: '归属章节', align: "center"
|
|
|
|
title: '归属章节', align: "center"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]],done: function(res, curr, count){
|
|
|
|
]],done: function(res, curr, count){
|
|
|
|