diff --git a/src/main/resources/static/route/classplan/show.html b/src/main/resources/static/route/classplan/show.html index 9b9c379..dbc126b 100644 --- a/src/main/resources/static/route/classplan/show.html +++ b/src/main/resources/static/route/classplan/show.html @@ -194,6 +194,7 @@ var teacherList = []; var classPlanLessons = []; var classPlanId = top.restAjax.params(window.location.href).classPlanId; + var orgId = '' // 初始化内容 function initData() { @@ -216,6 +217,7 @@ //初始化课程列表 initTeacherList(data.orgId); classPlanLessons = data.classPlanLessons; + orgId = data.orgId; }, function(code, data) { top.dialog.msg(data.msg); }, function() { @@ -249,7 +251,7 @@ form.render(); 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['teacher'] = teacherList; laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) { diff --git a/src/main/resources/static/route/classplan/update.html b/src/main/resources/static/route/classplan/update.html index 4c247c0..d9f86d0 100644 --- a/src/main/resources/static/route/classplan/update.html +++ b/src/main/resources/static/route/classplan/update.html @@ -202,6 +202,7 @@ var teacherList = []; var classPlanLessons = []; var classPlanId = top.restAjax.params(window.location.href).classPlanId; + var orgId = ''; // 初始化内容 function initData() { @@ -229,6 +230,7 @@ //初始化课程列表 initTeacherList(data.orgId); classPlanLessons = data.classPlanLessons; + orgId = data.orgId }, function(code, data) { top.dialog.msg(data.msg); }, function() { @@ -382,6 +384,13 @@ form.render(null, 'dataForm'); top.dialog.dialogTreeData.selectedNodes = {}; initLessonsList(); + if($('#projectCatalogId').val() == ''){ + $('.teacher-lessons-div').hide(); + return; + } else if($('#planStartTime').val() != '' && $('#planEndTime').val() != ''){ + initLessonsList(); + $('.teacher-lessons-div').show(); + } } }); });