From 91ec7c27b2b2c320e2848e30bce4a6d31071bfc2 Mon Sep 17 00:00:00 2001 From: ChineseTony <13206573871@163.com> Date: Sat, 13 Apr 2019 22:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=B7=BB=E5=8A=A0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +- WebContent/jsp/AddCourse.jsp | 34 ++++++++++- WebContent/jsp/QueryCourse.jsp | 60 +++++++++++++++++-- WebContent/jsp/UpdateCourse.jsp | 30 +++++++++- .../controller/CourseController.java | 21 +++++-- .../controller/SpecialityController.java | 7 +++ .../curriculum/service/CourseService.java | 2 + .../curriculum/service/CourseServiceImpl.java | 27 +++++++++ .../curriculum/service/SpecialityService.java | 3 + .../service/SpecialityServiceImpl.java | 9 +++ 10 files changed, 186 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 2f24f9d..9d6f180 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ *.class .classpath .project -build/ +/build/ + + +/target/ # Java class files *.class diff --git a/WebContent/jsp/AddCourse.jsp b/WebContent/jsp/AddCourse.jsp index ea93712..0dac350 100644 --- a/WebContent/jsp/AddCourse.jsp +++ b/WebContent/jsp/AddCourse.jsp @@ -25,6 +25,22 @@ tiptype:3 }); + $('#academyid').change(function (academyid){ + var academyid = $('#academyid option:selected').val(); + + $.ajax({ + url : '<%=request.getContextPath() %>/SpecialityController/QueryAllSpecialityByAcademyid.action', + datatype : 'json', + data: { "academyid":academyid}, + success : function(specialities){ + $('#specialityid').empty(); + specialities.forEach(function(speciality){ + $('#specialityid').append(''); + }) + } + }); + }); + }); @@ -96,9 +112,23 @@ - + + +