|
|
|
@ -10,10 +10,13 @@ layui.define(['form', 'laydate', 'table', 'teachingManagementApi', 'table', 'xmS
|
|
|
|
|
var universityFacultyId = $("#addForm select[name='universityFacultyInfo']").val();
|
|
|
|
|
|
|
|
|
|
var universitySystemId = $("#addForm select[name='universitySystemInfo']").val();
|
|
|
|
|
var classData = Common.getAjax('/jlw/schoolClass/getValues.json', {
|
|
|
|
|
universitySystemId: universitySystemId,
|
|
|
|
|
universityFacultyId: universityFacultyId
|
|
|
|
|
}).data;//上课班级多选框data
|
|
|
|
|
var classData = []
|
|
|
|
|
if (!$.isEmpty(universityFacultyId) && !$.isEmpty(universitySystemId)){
|
|
|
|
|
classData = Common.getAjax('/jlw/schoolClass/getValues.json', {
|
|
|
|
|
universitySystemId: universitySystemId,
|
|
|
|
|
universityFacultyId: universityFacultyId
|
|
|
|
|
}).data;//上课班级多选框data
|
|
|
|
|
}
|
|
|
|
|
var xmSeValue = $("#demo1").data('value');
|
|
|
|
|
var xmSeInitValue = [];
|
|
|
|
|
if (!$.isEmpty(xmSeValue)) {
|
|
|
|
@ -159,7 +162,8 @@ layui.define(['form', 'laydate', 'table', 'teachingManagementApi', 'table', 'xmS
|
|
|
|
|
time: 1500 //2秒关闭(如果不配置,默认是3秒)
|
|
|
|
|
},function (){
|
|
|
|
|
if(ret.code == 0){
|
|
|
|
|
Lib.tableRefresh();
|
|
|
|
|
parent.Lib.tableRefresh();
|
|
|
|
|
Lib.closeFrame();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -176,18 +180,39 @@ layui.define(['form', 'laydate', 'table', 'teachingManagementApi', 'table', 'xmS
|
|
|
|
|
form.on('select(select_universityFaculty)', function (obj) {//院系
|
|
|
|
|
Lib.getUniversitySystems($("select[name='universitySystemInfo']"),obj.value);
|
|
|
|
|
universitySystemId = $("#addForm select[name='universitySystemInfo']").val();
|
|
|
|
|
classData = Common.getAjax('/jlw/schoolClass/getValues.json', {
|
|
|
|
|
var universitySystemList = Common.getAjax('/jlw/universitySystem/getValues.json', {
|
|
|
|
|
universitySystemId: universitySystemId,
|
|
|
|
|
universityFacultyId: obj.value
|
|
|
|
|
}).data;//上课班级多选框data
|
|
|
|
|
}).data;
|
|
|
|
|
var htm = '<option value="">请选择</option>';//universitySystemInfo
|
|
|
|
|
for (var i = 0;i < universitySystemList.length;i++){
|
|
|
|
|
htm += '<option value="'+universitySystemList[i].universitySystemId+'">'+universitySystemList[i].universitySystemName+'</option>';
|
|
|
|
|
}
|
|
|
|
|
$("#universitySystemInfo").empty();
|
|
|
|
|
$("#universitySystemInfo").append(htm);
|
|
|
|
|
form.render();
|
|
|
|
|
//重置班级
|
|
|
|
|
classData = [];//上课班级多选框data
|
|
|
|
|
demo1.update({
|
|
|
|
|
data: classData
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
//查询班级
|
|
|
|
|
//查询班级与教师
|
|
|
|
|
form.on('select(select_universitySystem)', function (obj) {//专业
|
|
|
|
|
Lib.getClassByUniSys($("select[name='schoolClassInfo']"),obj.value);
|
|
|
|
|
universityFacultyId = $("#addForm select[name='universityFacultyInfo']").val();
|
|
|
|
|
//教师
|
|
|
|
|
var universitySystemList = Common.getAjax('/jlw/teacher/getValues.json', {
|
|
|
|
|
universitySystemId: obj.value,
|
|
|
|
|
universityFacultyId: universityFacultyId
|
|
|
|
|
}).data;
|
|
|
|
|
var htm = '<option value="">请选择</option>';//universitySystemInfo
|
|
|
|
|
for (var i = 0;i < universitySystemList.length;i++){
|
|
|
|
|
htm += '<option value="'+universitySystemList[i].teacherId+'">'+universitySystemList[i].teacherName+'</option>';
|
|
|
|
|
}
|
|
|
|
|
$("#teacherInfo").empty();
|
|
|
|
|
$("#teacherInfo").append(htm);
|
|
|
|
|
form.render();
|
|
|
|
|
classData = Common.getAjax('/jlw/schoolClass/getValues.json', {
|
|
|
|
|
universitySystemId: obj.value,
|
|
|
|
|
universityFacultyId: universityFacultyId
|
|
|
|
|