开班计划修改和显示功能功能bug修复

This commit is contained in:
wans 2021-05-19 17:57:20 +08:00
parent 356bf6392f
commit 7d6f5ce1f5
2 changed files with 12 additions and 1 deletions

View File

@ -194,6 +194,7 @@
var teacherList = []; var teacherList = [];
var classPlanLessons = []; var classPlanLessons = [];
var classPlanId = top.restAjax.params(window.location.href).classPlanId; var classPlanId = top.restAjax.params(window.location.href).classPlanId;
var orgId = ''
// 初始化内容 // 初始化内容
function initData() { function initData() {
@ -216,6 +217,7 @@
//初始化课程列表 //初始化课程列表
initTeacherList(data.orgId); initTeacherList(data.orgId);
classPlanLessons = data.classPlanLessons; classPlanLessons = data.classPlanLessons;
orgId = data.orgId;
}, function(code, data) { }, function(code, data) {
top.dialog.msg(data.msg); top.dialog.msg(data.msg);
}, function() { }, function() {
@ -249,7 +251,7 @@
form.render(); form.render();
return; return;
} }
top.restAjax.get(top.restAjax.path('api/lessons/list',[]), {projectCatalogId : projectCatalogId}, null, function(code,data){ top.restAjax.get(top.restAjax.path('api/lessons/list',[]), {projectCatalogId : projectCatalogId, orgId: orgId}, null, function(code,data){
dataObj['lesson'] = data; dataObj['lesson'] = data;
dataObj['teacher'] = teacherList; dataObj['teacher'] = teacherList;
laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) { laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) {

View File

@ -202,6 +202,7 @@
var teacherList = []; var teacherList = [];
var classPlanLessons = []; var classPlanLessons = [];
var classPlanId = top.restAjax.params(window.location.href).classPlanId; var classPlanId = top.restAjax.params(window.location.href).classPlanId;
var orgId = '';
// 初始化内容 // 初始化内容
function initData() { function initData() {
@ -229,6 +230,7 @@
//初始化课程列表 //初始化课程列表
initTeacherList(data.orgId); initTeacherList(data.orgId);
classPlanLessons = data.classPlanLessons; classPlanLessons = data.classPlanLessons;
orgId = data.orgId
}, function(code, data) { }, function(code, data) {
top.dialog.msg(data.msg); top.dialog.msg(data.msg);
}, function() { }, function() {
@ -382,6 +384,13 @@
form.render(null, 'dataForm'); form.render(null, 'dataForm');
top.dialog.dialogTreeData.selectedNodes = {}; top.dialog.dialogTreeData.selectedNodes = {};
initLessonsList(); initLessonsList();
if($('#projectCatalogId').val() == ''){
$('.teacher-lessons-div').hide();
return;
} else if($('#planStartTime').val() != '' && $('#planEndTime').val() != ''){
initLessonsList();
$('.teacher-lessons-div').show();
}
} }
}); });
}); });