From 7f7e1840616e8cd70b818a886af4f123219dce5c Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Tue, 25 May 2021 17:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E7=8F=AD=E6=97=B6?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=AE=B2=E5=B8=88=E5=92=8C=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/route/classplan/save.html | 7 +++++++ src/main/resources/static/route/classplan/update.html | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/main/resources/static/route/classplan/save.html b/src/main/resources/static/route/classplan/save.html index 410d5d1..373d1e3 100644 --- a/src/main/resources/static/route/classplan/save.html +++ b/src/main/resources/static/route/classplan/save.html @@ -254,6 +254,10 @@ top.restAjax.get(top.restAjax.path('api/lessons/list',[]), {projectCatalogId : projectCatalogId,orgId : orgId}, null, function(code,data){ dataObj['lesson'] = data; dataObj['teacher'] = teacherList; + if(typeof (data) === 'undefined' || dataObj['lesson'].length == 0){ + layer.msg('未查询到课程,请先添加课程'); + return; + } laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) { document.getElementById('lessonTbodyBox').innerHTML = html; }); @@ -278,6 +282,9 @@ function initTeacherList(){ top.restAjax.get(top.restAjax.path('api/teacher/list',[]), {orgId : orgId}, null, function(code,data){ teacherList = data; + if(typeof (data) === 'undefined' || teacherList.length == 0){ + layer.msg('当前机构没有讲师,请先在讲师管理中添加讲师'); + } },function(code,data){ top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/classplan/update.html b/src/main/resources/static/route/classplan/update.html index 412c36b..451673b 100644 --- a/src/main/resources/static/route/classplan/update.html +++ b/src/main/resources/static/route/classplan/update.html @@ -245,6 +245,9 @@ function initTeacherList(orgId){ top.restAjax.get(top.restAjax.path('api/teacher/list',[]), {orgId : orgId}, null, function(code,data){ teacherList = data; + if(typeof (data) === 'undefined' || teacherList.length == 0){ + layer.msg('当前机构没有讲师,请先在讲师管理中添加讲师'); + } initLessonsList(); },function(code,data){ top.dialog.msg(data.msg); @@ -267,6 +270,10 @@ top.restAjax.get(top.restAjax.path('api/lessons/list',[]), {projectCatalogId : projectCatalogId,orgId : orgId}, null, function(code,data){ dataObj['lesson'] = data; dataObj['teacher'] = teacherList; + if(typeof (data) === 'undefined' || dataObj['lesson'].length == 0){ + layer.msg('未查询到课程,请先添加课程'); + return; + } laytpl(document.getElementById('lessonTbodyTemplate').innerHTML).render(dataObj, function(html) { document.getElementById('lessonTbodyBox').innerHTML = html; });