系统或课程授权 只传选择的信息

beetlsql3-dev
yangdj 2 years ago
parent 4c13712cf7
commit c179b21a79

@ -301,12 +301,16 @@
xtList = [],//实验系统List xtList = [],//实验系统List
kcList = [];//当前编辑系统下的课程List kcList = [];//当前编辑系统下的课程List
var onUniversitiesCollegesId = $("input[name='universitiesCollegesId']").val(); var onUniversitiesCollegesId = $("input[name='universitiesCollegesId']").val();
layer.load(3);
setTimeout(function () {
loadxtInfo(); //加载系统数据 loadxtInfo(); //加载系统数据
loadkcInfo(); //加载课程数据 loadkcInfo(); //加载课程数据
},200);
function loadxtInfo() { function loadxtInfo() {
var ret = Common.getAjax("/jlw/universitiesCollegesJurisdictionExperimentalSystem/getAllByQuery.json", { var ret = Common.getAjax("/jlw/universitiesCollegesJurisdictionExperimentalSystem/getAllByQuery.json", {
universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId
});//获取实训系统 });//获取实训系统
layer.closeAll("loading");
xtList = ret.data; xtList = ret.data;
loaduje(xtList); loaduje(xtList);
// onxtId = xtList.length > 0?xtList[0].universitiesCollegesJurisdictionExperimentalSystemId:""; // onxtId = xtList.length > 0?xtList[0].universitiesCollegesJurisdictionExperimentalSystemId:"";
@ -600,25 +604,19 @@
}); });
return; return;
} }
var t = true; var t = true,experimentalSystemList = [], //系统授权list
curriculumResourcesList = []; //课程授权
$("input[name='xt_id']").each(function (i) { $("input[name='xt_id']").each(function (i) {
if (!$(this).prop("checked")) { if ($(this).prop("checked")) {
xtList[i] = { if ($.isEmpty(xtList[i].useType)) {
type: xtList[i].type, layer.msg("请选择实验系统【" + xtList[i].applicationName + "】使用层次!", {
typeId: xtList[i].typeId,
useType: 0,
universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId
}
} else {
/*if (xtList[i].useType == 0 || $.isEmpty(xtList[i].useType)) {
layer.msg("请选择实验系统【" + xtList[i].applicationName + "】使用级别!", {
offset: ['50%'], offset: ['50%'],
icon: 2, icon: 2,
time: 1500 //2秒关闭如果不配置默认是3秒 time: 1500 //2秒关闭如果不配置默认是3秒
}); });
t = false; t = false;
return false; return false;
}*/ }
if ($.isEmpty(xtList[i].useStartTime)) { if ($.isEmpty(xtList[i].useStartTime)) {
layer.msg("请选择实验系统【" + xtList[i].applicationName + "】开始时间!", { layer.msg("请选择实验系统【" + xtList[i].applicationName + "】开始时间!", {
offset: ['50%'], offset: ['50%'],
@ -637,17 +635,7 @@
t = false; t = false;
return false; return false;
} }
/*if ($.isEmpty(xtList[i].subsystemBottomBar)) { experimentalSystemList.push(xtList[i]);
layer.msg("请填写实验系统【" + xtList[i].applicationName + "】子系统底栏名称!", {
offset: ['50%'],
icon: 2,
time: 1500 //2秒关闭如果不配置默认是3秒
}, function () {
$("#subsystemBottomBar_xt_" + i).focus();
});
t = false;
return false;
}*/
} }
}); });
@ -655,24 +643,16 @@
return false; return false;
} }
$("input[name='kc_id']").each(function (i) { $("input[name='kc_id']").each(function (i) {
if (!$(this).prop("checked")) { if ($(this).prop("checked")) {
kcList[i] = { if ($.isEmpty(kcList[i].useType)) {
type: kcList[i].type, layer.msg("请选择课程系统【" + kcList[i].courseInfoName + "】使用层次!", {
typeId: kcList[i].typeId,
useType: 0,
courseInfoId: kcList[i].courseInfoId,
universitiesCollegesId: $("select[name='universitiesCollegesId']").val() || onUniversitiesCollegesId
}
} else {
/*if (kcList[i].useType == 0 || $.isEmpty(kcList[i].useType)) {
layer.msg("请选择课程系统【" + kcList[i].applicationName + "】使用级别!", {
offset: ['50%'], offset: ['50%'],
icon: 2, icon: 2,
time: 1500 //2秒关闭如果不配置默认是3秒 time: 1500 //2秒关闭如果不配置默认是3秒
}); });
t = false; t = false;
return false; return false;
}*/ }
if ($.isEmpty(kcList[i].useStartTime)) { if ($.isEmpty(kcList[i].useStartTime)) {
layer.msg("请选择课程系统【" + kcList[i].courseInfoName + "】开始时间!", { layer.msg("请选择课程系统【" + kcList[i].courseInfoName + "】开始时间!", {
offset: ['50%'], offset: ['50%'],
@ -691,26 +671,7 @@
t = false; t = false;
return false; return false;
} }
/*if ($.isEmpty(kcList[i].secondLevelName)) { curriculumResourcesList.push(kcList[i]);
layer.msg("请设置课程系统【" + kcList[i].courseInfoName + "】二级课程名!", {
offset: ['50%'],
icon: 2,
time: 1500 //2秒关闭如果不配置默认是3秒
}, function () {
$("#secondLevelName_kc_" + i).focus();
});
t = false;
return false;
}
if ($.isEmpty(kcList[i].secondLevelLogo)) {
layer.msg("请设置课程系统【" + kcList[i].courseInfoName + "】二级课程logo", {
offset: ['50%'],
icon: 2,
time: 1500 //2秒关闭如果不配置默认是3秒
});
t = false;
return false;
}*/
} }
}); });
if (t == false) { if (t == false) {
@ -719,8 +680,8 @@
layer.load(); layer.load();
var param = { var param = {
universitiesCollegesId: universitiesCollegesId, universitiesCollegesId: universitiesCollegesId,
UniversitiesCollegesJurisdictionExperimentalSystemListJson: JSON.stringify(xtList), UniversitiesCollegesJurisdictionExperimentalSystemListJson: JSON.stringify(experimentalSystemList),
UniversitiesCollegesJurisdictionCurriculumResourcesListJson: JSON.stringify(kcList) UniversitiesCollegesJurisdictionCurriculumResourcesListJson: JSON.stringify(curriculumResourcesList)
}; };
var ret; var ret;
setTimeout(function () { setTimeout(function () {

Loading…
Cancel
Save