├── .gitignore ├── .idea ├── .gitignore ├── compiler.xml ├── dataSources.xml ├── dictionaries ├── encodings.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── misc.xml ├── sqldialects.xml ├── uiDesigner.xml └── vcs.xml ├── README.assets ├── 1603964981938.png ├── 1603965055525.png ├── 1603965105126.png ├── 1603965154298.png ├── 1603965181641.png ├── 1603965203848.png ├── 1603965227754.png ├── 1603965239997.png ├── 1603965281604.png ├── 1603965303966.png ├── 1603965338953.png └── 1603968112796.png ├── README.md ├── pom.xml ├── sms.iml ├── sms.sql └── src └── main ├── java └── cn │ └── akwing │ └── sms │ ├── controller │ ├── AdminController.java │ ├── CourseController.java │ ├── GradeController.java │ ├── StudentController.java │ ├── SystemController.java │ └── TeacherController.java │ ├── interceptor │ ├── AuthorityInterceptor.java │ └── LoginInterceptor.java │ ├── mapper │ ├── AdminMapper.java │ ├── CourseMapper.java │ ├── GradeMapper.java │ ├── StudentMapper.java │ └── TeacherMapper.java │ ├── pojo │ ├── Admin.java │ ├── Course.java │ ├── Grade.java │ ├── Student.java │ └── Teacher.java │ └── service │ ├── AdminService.java │ ├── CourseService.java │ ├── GradeService.java │ ├── StudentService.java │ ├── TeacherService.java │ └── impl │ ├── AdminServiceImpl.java │ ├── CourseServiceImpl.java │ ├── GradeServiceImpl.java │ ├── StudentServiceImpl.java │ └── TeacherServiceImpl.java ├── resources ├── applicationContext.xml ├── cn │ └── akwing │ │ └── sms │ │ └── mapper │ │ ├── AdminMapper.xml │ │ ├── CourseMapper.xml │ │ ├── GradeMapper.xml │ │ ├── StudentMapper.xml │ │ └── TeacherMapper.xml ├── database.properties ├── generatorConfig.xml ├── log4j.properties ├── mybatis-config.xml ├── spring-dao.xml ├── spring-mvc.xml └── spring-service.xml └── webapp ├── WEB-INF ├── view │ ├── course │ │ ├── courseManage.jsp │ │ └── gradeManage.jsp │ ├── grade │ │ └── examManage.jsp │ ├── student │ │ └── studentManage.jsp │ ├── system │ │ ├── information.jsp │ │ ├── login.jsp │ │ ├── main.jsp │ │ └── welcome.jsp │ └── teacher │ │ └── teacherManage.jsp └── web.xml ├── index.jsp └── static ├── css ├── board.css ├── font.css └── load.css ├── fonts ├── iconfont.eot ├── iconfont.svg ├── iconfont.ttf └── iconfont.woff ├── images ├── aiwrap.png ├── bg.png ├── board.jpg ├── cainiao.jpg ├── close.gif ├── close_div.png ├── down.png ├── greyUp.png ├── kuaidi.jpg ├── metro.gif ├── metro.png └── up.png ├── js ├── date-format.js ├── jquery-1.10.2.intellisense.js ├── jquery-1.10.2.js ├── jquery-1.10.2.min.js ├── jquery-1.10.2.min.map ├── jquery.cookie.js ├── jquery.qrcode.min.js ├── jquery.validate-vsdoc.js ├── jquery.validate.js ├── jquery.validate.min.js ├── jquery.validate.unobtrusive.js ├── jquery.validate.unobtrusive.min.js ├── md5.js ├── xadmin.js ├── xcity.js └── xlsx.full.min.js └── layui ├── css ├── layui.css ├── layui.mobile.css ├── modules │ ├── code.css │ ├── laydate │ │ └── default │ │ │ └── laydate.css │ └── layer │ │ └── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── layer.css │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif └── xadmin.css ├── font ├── iconfont.eot ├── iconfont.svg ├── iconfont.ttf ├── iconfont.woff └── iconfont.woff2 ├── images └── face │ ├── 0.gif │ ├── 1.gif │ ├── 10.gif │ ├── 11.gif │ ├── 12.gif │ ├── 13.gif │ ├── 14.gif │ ├── 15.gif │ ├── 16.gif │ ├── 17.gif │ ├── 18.gif │ ├── 19.gif │ ├── 2.gif │ ├── 20.gif │ ├── 21.gif │ ├── 22.gif │ ├── 23.gif │ ├── 24.gif │ ├── 25.gif │ ├── 26.gif │ ├── 27.gif │ ├── 28.gif │ ├── 29.gif │ ├── 3.gif │ ├── 30.gif │ ├── 31.gif │ ├── 32.gif │ ├── 33.gif │ ├── 34.gif │ ├── 35.gif │ ├── 36.gif │ ├── 37.gif │ ├── 38.gif │ ├── 39.gif │ ├── 4.gif │ ├── 40.gif │ ├── 41.gif │ ├── 42.gif │ ├── 43.gif │ ├── 44.gif │ ├── 45.gif │ ├── 46.gif │ ├── 47.gif │ ├── 48.gif │ ├── 49.gif │ ├── 5.gif │ ├── 50.gif │ ├── 51.gif │ ├── 52.gif │ ├── 53.gif │ ├── 54.gif │ ├── 55.gif │ ├── 56.gif │ ├── 57.gif │ ├── 58.gif │ ├── 59.gif │ ├── 6.gif │ ├── 60.gif │ ├── 61.gif │ ├── 62.gif │ ├── 63.gif │ ├── 64.gif │ ├── 65.gif │ ├── 66.gif │ ├── 67.gif │ ├── 68.gif │ ├── 69.gif │ ├── 7.gif │ ├── 70.gif │ ├── 71.gif │ ├── 8.gif │ └── 9.gif ├── lay └── modules │ ├── carousel.js │ ├── code.js │ ├── colorpicker.js │ ├── element.js │ ├── flow.js │ ├── form.js │ ├── jquery.js │ ├── laydate.js │ ├── layedit.js │ ├── layer.js │ ├── laypage.js │ ├── laytpl.js │ ├── mobile.js │ ├── rate.js │ ├── slider.js │ ├── table.js │ ├── transfer.js │ ├── tree.js │ ├── upload.js │ └── util.js ├── layui.all.js └── layui.js /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.idea/ -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | 10 | /target/ -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql 6 | true 7 | com.mysql.jdbc.Driver 8 | jdbc:mysql://localhost:3306 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/dictionaries: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /.idea/sqldialects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.assets/1603964981938.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603964981938.png -------------------------------------------------------------------------------- /README.assets/1603965055525.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965055525.png -------------------------------------------------------------------------------- /README.assets/1603965105126.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965105126.png -------------------------------------------------------------------------------- /README.assets/1603965154298.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965154298.png -------------------------------------------------------------------------------- /README.assets/1603965181641.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965181641.png -------------------------------------------------------------------------------- /README.assets/1603965203848.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965203848.png -------------------------------------------------------------------------------- /README.assets/1603965227754.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965227754.png -------------------------------------------------------------------------------- /README.assets/1603965239997.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965239997.png -------------------------------------------------------------------------------- /README.assets/1603965281604.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965281604.png -------------------------------------------------------------------------------- /README.assets/1603965303966.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965303966.png -------------------------------------------------------------------------------- /README.assets/1603965338953.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603965338953.png -------------------------------------------------------------------------------- /README.assets/1603968112796.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/README.assets/1603968112796.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 学生管理系统(Student Manage System) 2 | 3 | ### 项目概述 4 | 这是我为了熟悉SSM框架写的一个学生管理系统, 是SSM的一个入门项目. 前端用的[Layui框架](https://www.layui.com/), 很多前端代码都是借鉴别人的. 5 | 6 | 预览地址:http://sms.akwing.cn:8080/sms 7 | 8 | 用户名: admin 9 | 10 | 密 码:admin 11 | 12 | 13 | 14 | - 开发工具: Intellij IDEA 2020.1.1(Ultimate Edition) 15 | - Java版本:Java8 16 | - Tomcat版本:Tomcat 9.0.38 17 | - mysql版本:mysql8.0.20 18 | 19 | 20 | 21 | ### 项目功能 22 | 该学生管理系统可以由三类角色登录:管理员,教师和学生。 23 | 24 | 功能有 25 | - 学生管理 26 | - 教师管理 27 | - 课程管理 28 | - 选课管理 29 | - 成绩查询 30 | - 修改个人信息 31 | 32 | 管理员具备所有功能,教师能管理学生,管理自己的课程以及修改分数,学生只能查看自己的选课和成绩。 33 | 34 | ### 项目截图 35 | 36 | #### 登录界面 37 | 38 | ![1603964981938](README.assets/1603964981938.png) 39 | 40 | 41 | 42 | #### 系统主界面 43 | 44 | ![1603965055525](README.assets/1603965055525.png) 45 | 46 | 47 | 48 | #### 学生管理界面 49 | 50 | ![1603965105126](README.assets/1603965105126.png) 51 | 52 | 53 | 54 | #### 添加学生信息 55 | 56 | ![1603965281604](README.assets/1603965281604.png) 57 | 58 | 59 | 60 | #### 修改学生信息 61 | 62 | ![1603965303966](README.assets/1603965303966.png) 63 | 64 | 65 | 66 | #### 查询学生 67 | 68 | 姓名是模糊查询 69 | 70 | ![1603965338953](README.assets/1603965338953.png) 71 | 72 | 73 | 74 | #### 课程管理界面 75 | 76 | ![1603965154298](README.assets/1603965154298.png) 77 | 78 | 79 | 80 | #### 选课管理界面 81 | 82 | ![1603965181641](README.assets/1603965181641.png) 83 | 84 | 85 | 86 | #### 成绩管理界面 87 | 88 | ![1603965203848](README.assets/1603965203848.png) 89 | 90 | 91 | #### 教师管理界面 92 | 93 | ![1603965227754](README.assets/1603965227754.png) 94 | 95 | 96 | 97 | #### 个人信息修改界面 98 | 99 | ![1603965239997](README.assets/1603965239997.png) 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 4.0.0 6 | 7 | cn.akwing 8 | sms 9 | 1.0-SNAPSHOT 10 | war 11 | 12 | sms Maven Webapp 13 | http://www.akwing.cn 14 | 15 | 16 | 17 | junit 18 | junit 19 | 4.12 20 | test 21 | 22 | 23 | mysql 24 | mysql-connector-java 25 | 5.1.47 26 | 27 | 28 | 29 | 30 | com.mchange 31 | c3p0 32 | 0.9.5.4 33 | 34 | 35 | 36 | 37 | javax.servlet 38 | javax.servlet-api 39 | 4.0.1 40 | 41 | 42 | javax.servlet.jsp 43 | jsp-api 44 | 2.2 45 | 46 | 47 | javax.servlet 48 | jstl 49 | 1.2 50 | 51 | 52 | 53 | 54 | 55 | org.apache.taglibs 56 | taglibs-standard-spec 57 | 1.2.5 58 | 59 | 60 | org.apache.taglibs 61 | taglibs-standard-impl 62 | 1.2.5 63 | 64 | 65 | 66 | 67 | org.mybatis 68 | mybatis 69 | 3.5.2 70 | 71 | 72 | org.mybatis 73 | mybatis-spring 74 | 2.0.5 75 | 76 | 77 | 78 | org.springframework 79 | spring-webmvc 80 | 5.2.0.RELEASE 81 | 82 | 83 | org.springframework 84 | spring-jdbc 85 | 5.2.0.RELEASE 86 | 87 | 88 | com.fasterxml.jackson.core 89 | jackson-databind 90 | 2.10.0 91 | 92 | 93 | 94 | 95 | com.github.pagehelper 96 | pagehelper 97 | 5.2.0 98 | 99 | 100 | 101 | 102 | com.github.whvcse 103 | easy-captcha 104 | 1.6.2 105 | 106 | 107 | 108 | 109 | org.mybatis.generator 110 | mybatis-generator-core 111 | 1.3.7 112 | test 113 | 114 | 115 | 116 | org.slf4j 117 | slf4j-log4j12 118 | 1.7.25 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | org.mybatis.generator 127 | mybatis-generator-maven-plugin 128 | 1.3.7 129 | 130 | true 131 | src/main/resources/generatorConfig.xml 132 | true 133 | 134 | 135 | 136 | mysql 137 | mysql-connector-java 138 | 5.1.47 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /sms.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/controller/AdminController.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.controller; 2 | 3 | import cn.akwing.sms.pojo.Admin; 4 | import cn.akwing.sms.service.AdminService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import javax.servlet.http.HttpSession; 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | /** 15 | * @author c1515 16 | */ 17 | @Controller 18 | @RequestMapping("/admin") 19 | public class AdminController { 20 | 21 | @Autowired 22 | private AdminService adminService; 23 | 24 | @RequestMapping("/updateAdmin") 25 | @ResponseBody 26 | public Map updataAdmin(Admin admin) { 27 | Map map = new HashMap(); 28 | int result = adminService.updateByPrimaryKey(admin); 29 | if(result > 0) { 30 | map.put("success", true); 31 | map.put("msg", "修改成功"); 32 | }else{ 33 | map.put("success", false); 34 | map.put("msg", "修改失败"); 35 | } 36 | return map; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/controller/CourseController.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.controller; 2 | 3 | import cn.akwing.sms.pojo.Course; 4 | import cn.akwing.sms.pojo.Teacher; 5 | import cn.akwing.sms.service.CourseService; 6 | import com.github.pagehelper.PageHelper; 7 | import com.github.pagehelper.PageInfo; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import javax.servlet.http.HttpSession; 14 | import java.util.HashMap; 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | /** 19 | * @author c1515 20 | */ 21 | @RequestMapping("/course") 22 | @Controller 23 | public class CourseController { 24 | 25 | @Autowired 26 | private CourseService courseService; 27 | 28 | @RequestMapping("/goCourseManage") 29 | public String goCourseManage(){ 30 | return "course/courseManage"; 31 | } 32 | 33 | @RequestMapping("/getCourseList") 34 | @ResponseBody 35 | public Map getCourseList(Integer page, Integer limit, Course course, HttpSession session){ 36 | 37 | /* 开启分页 */ 38 | if(page != null && limit != null) { 39 | PageHelper.startPage(page, limit); 40 | } 41 | 42 | /* 教师只能查看自己的课 */ 43 | int userType = (int) session.getAttribute("userType"); 44 | if( userType == 2) { 45 | Teacher teacher = (Teacher) session.getAttribute("userInfo"); 46 | course.setTeacherId(teacher.getId()); 47 | } 48 | 49 | System.out.println("getCourseList ->" + course); 50 | 51 | List courseList = courseService.selectByCondition(course); 52 | PageInfo pageInfo = new PageInfo(courseList); 53 | Map map = new HashMap(); 54 | 55 | /* 将数据返回给前端 */ 56 | map.put("code", "0"); 57 | map.put("msg", "0"); 58 | map.put("count", pageInfo.getTotal()); 59 | map.put("data", courseList); 60 | 61 | return map; 62 | } 63 | 64 | 65 | @RequestMapping("/addCourse") 66 | @ResponseBody 67 | public Map insertCourse(Course course){ 68 | System.out.println("insertCourse ->" + course); 69 | Map map = new HashMap(); 70 | int result = courseService.insertCourse(course); 71 | if(result > 0) { 72 | map.put("success", true); 73 | map.put("msg","添加成功"); 74 | }else{ 75 | map.put("success", false); 76 | map.put("msg","添加失败"); 77 | } 78 | return map; 79 | } 80 | 81 | @RequestMapping("/deleteCourse") 82 | @ResponseBody 83 | public Map deleteCourse(String id){ 84 | System.out.println("deleteCourse ->" + id); 85 | Map map = new HashMap(); 86 | int result = courseService.deleteByPrimaryKey(id); 87 | if(result > 0) { 88 | map.put("success", true); 89 | map.put("msg","删除成功"); 90 | }else{ 91 | map.put("success", false); 92 | map.put("msg","删除失败"); 93 | } 94 | return map; 95 | 96 | } 97 | 98 | @RequestMapping("/updateCourse") 99 | @ResponseBody 100 | public Map updateCourse(Course course){ 101 | System.out.println("updateCourse ->" + course); 102 | Map map = new HashMap(); 103 | int result = courseService.updateCourse(course); 104 | if(result > 0) { 105 | map.put("success", true); 106 | map.put("msg","修改成功"); 107 | }else{ 108 | map.put("success", false); 109 | map.put("msg","修改失败"); 110 | } 111 | return map; 112 | 113 | } 114 | 115 | 116 | @RequestMapping("/selectCourseByStudent") 117 | @ResponseBody 118 | public Map selectCourseByStudent(String studentId){ 119 | Map map = new HashMap(); 120 | List courseList = courseService.selectByStudentId(studentId); 121 | map.put("data", courseList); 122 | return map; 123 | } 124 | 125 | 126 | } 127 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/controller/GradeController.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.controller; 2 | 3 | import cn.akwing.sms.pojo.Course; 4 | import cn.akwing.sms.pojo.Grade; 5 | import cn.akwing.sms.pojo.Student; 6 | import cn.akwing.sms.pojo.Teacher; 7 | import cn.akwing.sms.service.GradeService; 8 | import com.github.pagehelper.PageHelper; 9 | import com.github.pagehelper.PageInfo; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Controller; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.ResponseBody; 14 | 15 | import javax.servlet.http.HttpSession; 16 | import java.util.HashMap; 17 | import java.util.List; 18 | import java.util.Map; 19 | 20 | /** 21 | * @author c1515 22 | */ 23 | @Controller 24 | @RequestMapping("/grade") 25 | public class GradeController { 26 | @Autowired 27 | private GradeService gradeService; 28 | 29 | @RequestMapping("/goGradeManage") 30 | public String goGradeManage(){ 31 | return "course/gradeManage"; 32 | } 33 | 34 | @RequestMapping("/goExamManage") 35 | public String goExamManage(){ 36 | return "grade/examManage"; 37 | } 38 | 39 | 40 | @RequestMapping("/getGradeList") 41 | @ResponseBody 42 | public Map getGradeList(Integer page, Integer limit, Grade grade, HttpSession session){ 43 | System.out.println("getCourseList ->" + grade); 44 | /* 开启分页 */ 45 | if(page != null && limit != null) { 46 | PageHelper.startPage(page, limit); 47 | } 48 | 49 | int userType = (int) session.getAttribute("userType"); 50 | if( userType == 2) { 51 | Teacher teacher = (Teacher) session.getAttribute("userInfo"); 52 | grade.setTeacherId(teacher.getId()); 53 | } else if(userType == 3) { 54 | Student student = (Student) session.getAttribute("userInfo"); 55 | grade.setStudentId(student.getId()); 56 | } 57 | 58 | List gradeList = gradeService.selectByCondition(grade); 59 | PageInfo pageInfo = new PageInfo(gradeList); 60 | Map map = new HashMap(); 61 | 62 | /* 将数据返回给前端 */ 63 | map.put("code", "0"); 64 | map.put("msg", "0"); 65 | map.put("count", pageInfo.getTotal()); 66 | map.put("data", gradeList); 67 | 68 | return map; 69 | } 70 | 71 | 72 | @RequestMapping("/addGrade") 73 | @ResponseBody 74 | public Map insertGrade(Grade grade){ 75 | System.out.println("insertGrade ->" + grade); 76 | Map map = new HashMap(); 77 | int result = gradeService.insert(grade); 78 | if(result > 0) { 79 | map.put("success", true); 80 | map.put("msg","添加成功"); 81 | }else{ 82 | map.put("success", false); 83 | map.put("msg","添加失败"); 84 | } 85 | return map; 86 | } 87 | 88 | @RequestMapping("/deleteGrade") 89 | @ResponseBody 90 | public Map deleteGrade(String studentId, String courseId){ 91 | Map map = new HashMap(); 92 | int result = gradeService.delete(studentId, courseId); 93 | if(result > 0) { 94 | map.put("success", true); 95 | map.put("msg","删除成功"); 96 | }else{ 97 | map.put("success", false); 98 | map.put("msg","删除失败"); 99 | } 100 | return map; 101 | 102 | } 103 | 104 | @RequestMapping("/updateGrade") 105 | @ResponseBody 106 | public Map updateGrade(Grade grade){ 107 | System.out.println("updateGrade -> " + grade); 108 | Map map = new HashMap(); 109 | int result = gradeService.update(grade); 110 | if(result > 0) { 111 | map.put("success", true); 112 | map.put("msg","修改成功"); 113 | }else{ 114 | map.put("success", false); 115 | map.put("msg","修改失败"); 116 | } 117 | return map; 118 | 119 | } 120 | 121 | 122 | } 123 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/controller/StudentController.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.controller; 2 | 3 | import cn.akwing.sms.pojo.Student; 4 | import cn.akwing.sms.service.StudentService; 5 | import com.fasterxml.jackson.core.JsonProcessingException; 6 | import com.fasterxml.jackson.databind.ObjectMapper; 7 | import com.github.pagehelper.PageHelper; 8 | import com.github.pagehelper.PageInfo; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import javax.servlet.http.HttpSession; 15 | import java.util.Arrays; 16 | import java.util.HashMap; 17 | import java.util.List; 18 | import java.util.Map; 19 | 20 | /** 21 | * @author c1515 22 | */ 23 | @Controller 24 | @RequestMapping("/student") 25 | public class StudentController { 26 | 27 | @Autowired 28 | private StudentService studentService; 29 | 30 | @RequestMapping("/goStudentManage") 31 | public String goStudentManage(){ 32 | return "student/studentManage"; 33 | } 34 | 35 | 36 | @RequestMapping("/getStudentList") 37 | @ResponseBody 38 | public Map getStudentList(Integer page, Integer limit, Student student){ 39 | /* 开启分页 */ 40 | if(page != null && limit != null) { 41 | PageHelper.startPage(page, limit); 42 | } 43 | 44 | List studentList = studentService.selectByCondition(student); 45 | PageInfo pageInfo = new PageInfo(studentList); 46 | Map map = new HashMap(); 47 | 48 | /* 将数据返回给前端 */ 49 | map.put("code", "0"); 50 | map.put("msg", "0"); 51 | map.put("count", pageInfo.getTotal()); 52 | map.put("data", studentList); 53 | 54 | try { 55 | System.out.println(new ObjectMapper().writeValueAsString(map)); 56 | } catch (JsonProcessingException e) { 57 | e.printStackTrace(); 58 | } 59 | 60 | return map; 61 | } 62 | 63 | 64 | @RequestMapping("/deleteStudent") 65 | @ResponseBody 66 | public Map deleteStudent(String[] id){ 67 | System.out.println("deleteStudent -> " + Arrays.toString(id)); 68 | Map map = new HashMap(); 69 | if(id == null) { 70 | map.put("success", false); 71 | map.put("msg","请选择需要删除的内容"); 72 | return map; 73 | } 74 | int result = studentService.deleteByPrimaryKey(id); 75 | if(result > 0) { 76 | map.put("success", true); 77 | map.put("msg","删除成功"); 78 | }else{ 79 | map.put("success", false); 80 | map.put("msg","删除失败"); 81 | } 82 | return map; 83 | } 84 | 85 | @RequestMapping("/addStudent") 86 | @ResponseBody 87 | public Map addStudent(Student student){ 88 | Map map = new HashMap(); 89 | int result = studentService.insertStudent(student); 90 | if(result > 0) { 91 | map.put("success", true); 92 | map.put("msg","添加成功"); 93 | }else{ 94 | map.put("success", false); 95 | map.put("msg","添加失败"); 96 | } 97 | return map; 98 | } 99 | 100 | @RequestMapping("/updateStudent") 101 | @ResponseBody 102 | public Map updateStudent(Student student){ 103 | Map map = new HashMap(); 104 | int result = studentService.updateStudent(student); 105 | if(result > 0) { 106 | map.put("success", true); 107 | map.put("msg","修改成功"); 108 | }else{ 109 | map.put("success", false); 110 | map.put("msg","修改失败"); 111 | } 112 | return map; 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/controller/SystemController.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.controller; 2 | 3 | 4 | import cn.akwing.sms.service.AdminService; 5 | import cn.akwing.sms.service.StudentService; 6 | import cn.akwing.sms.service.TeacherService; 7 | import com.wf.captcha.utils.CaptchaUtil; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpServletResponse; 15 | import javax.servlet.http.HttpSession; 16 | import java.io.IOException; 17 | import java.util.HashMap; 18 | import java.util.Map; 19 | 20 | /** 21 | * @author c1515 22 | */ 23 | @Controller 24 | @RequestMapping("/system") 25 | public class SystemController { 26 | 27 | @Autowired 28 | private AdminService adminService; 29 | 30 | @Autowired 31 | private TeacherService teacherService; 32 | 33 | @Autowired 34 | private StudentService studentService; 35 | 36 | @RequestMapping("/goLogin") 37 | private String goLogin() { 38 | return "system/login"; 39 | } 40 | 41 | @RequestMapping("/getCaptcha") 42 | public void getCaptcha(HttpServletRequest request, HttpServletResponse response) throws Exception { 43 | CaptchaUtil.out(request, response); 44 | } 45 | 46 | @RequestMapping("/goInformation") 47 | public String goInformation(){ 48 | return "system/information"; 49 | } 50 | 51 | @RequestMapping("/login") 52 | @ResponseBody 53 | public Map login(String id, String password, String verCode, String userType, HttpSession session, HttpServletRequest request){ 54 | System.out.println(id + " " + password + " " + userType); 55 | Map map = new HashMap(); 56 | 57 | if (!CaptchaUtil.ver(verCode, request)) { 58 | CaptchaUtil.clear(request); 59 | map.put("success", false); 60 | map.put("msg", "验证码错误"); 61 | return map; 62 | } 63 | 64 | Object object = null; 65 | 66 | switch (userType) { 67 | case "1": 68 | object = adminService.login(id, password); 69 | break; 70 | case "2": 71 | object = teacherService.login(id, password); 72 | break; 73 | case "3": 74 | object = studentService.login(id, password); 75 | break; 76 | } 77 | 78 | if(object != null) { 79 | session.setAttribute("userInfo", object); 80 | session.setAttribute("userType", Integer.parseInt(userType)); 81 | map.put("success", true); 82 | map.put("msg", "登录成功"); 83 | } else{ 84 | map.put("success", false); 85 | map.put("msg", "用户名或密码错误"); 86 | } 87 | 88 | return map; 89 | } 90 | 91 | 92 | @RequestMapping("/goMain") 93 | private String goMain(){ 94 | return "system/main"; 95 | } 96 | 97 | @RequestMapping("/goWelcome") 98 | private String goWelcome(){ 99 | return "system/welcome"; 100 | } 101 | 102 | @RequestMapping("/goLogout") 103 | private void goLogout(HttpSession session, HttpServletRequest request, HttpServletResponse response) throws IOException { 104 | session.removeAttribute("userInfo"); 105 | session.removeAttribute("userType"); 106 | response.sendRedirect(request.getContextPath()); 107 | } 108 | 109 | 110 | @RequestMapping("/getUserInfo") 111 | @ResponseBody 112 | private Map getUserInfo(HttpSession session){ 113 | Map map = new HashMap(); 114 | map.put("userInfo", session.getAttribute("userInfo")); 115 | return map; 116 | } 117 | 118 | } 119 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/controller/TeacherController.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.controller; 2 | 3 | import cn.akwing.sms.pojo.Teacher; 4 | import cn.akwing.sms.service.TeacherService; 5 | import com.github.pagehelper.PageHelper; 6 | import com.github.pagehelper.PageInfo; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import javax.servlet.http.HttpSession; 13 | import java.util.ArrayList; 14 | import java.util.HashMap; 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | /** 19 | * @author c1515 20 | */ 21 | @Controller 22 | @RequestMapping("/teacher") 23 | public class TeacherController { 24 | 25 | @Autowired 26 | private TeacherService teacherService; 27 | 28 | @RequestMapping("/goTeacherManage") 29 | public String goTeacherManage(){ 30 | return "teacher/teacherManage"; 31 | } 32 | 33 | @RequestMapping("/getTeacherList") 34 | @ResponseBody 35 | public Map getTeacherList(Integer page, Integer limit, Teacher teacher, HttpSession session){ 36 | 37 | /* 开启分页 */ 38 | if(page != null && limit != null) { 39 | PageHelper.startPage(page, limit); 40 | } 41 | 42 | List teacherList = null; 43 | int userType = (int) session.getAttribute("userType"); 44 | 45 | if(userType == 2){ 46 | teacherList = new ArrayList(); 47 | teacherList.add((Teacher)(session.getAttribute("userInfo"))); 48 | }else { 49 | teacherList = teacherService.selectByCondition(teacher); 50 | } 51 | PageInfo pageInfo = new PageInfo(teacherList); 52 | Map map = new HashMap(); 53 | 54 | /* 将数据返回给前端 */ 55 | map.put("code", "0"); 56 | map.put("msg", "0"); 57 | map.put("count", pageInfo.getTotal()); 58 | map.put("data", teacherList); 59 | 60 | return map; 61 | } 62 | 63 | @RequestMapping("/getAllTeacher") 64 | @ResponseBody 65 | public Map getAllTeacher(HttpSession session) { 66 | Map map = new HashMap(); 67 | int userType = (int) session.getAttribute("userType"); 68 | List teacherList = null; 69 | /* 如果是老师就返回自己 */ 70 | if(userType == 2){ 71 | teacherList = new ArrayList(); 72 | teacherList.add((Teacher)(session.getAttribute("userInfo"))); 73 | }else{ 74 | teacherList = teacherService.selectAll(); 75 | } 76 | 77 | /* 将数据返回给前端 */ 78 | map.put("code", "0"); 79 | map.put("msg", "0"); 80 | map.put("count", teacherList.size()); 81 | map.put("data", teacherList); 82 | 83 | return map; 84 | } 85 | 86 | @RequestMapping("/deleteTeacher") 87 | @ResponseBody 88 | public Map deleteTeacher(String id){ 89 | Map map = new HashMap(); 90 | int result = teacherService.deleteByPrimaryKey(id); 91 | if(result > 0) { 92 | map.put("success", true); 93 | map.put("msg","删除成功"); 94 | }else{ 95 | map.put("success", false); 96 | map.put("msg","删除失败"); 97 | } 98 | return map; 99 | } 100 | 101 | @RequestMapping("/addTeacher") 102 | @ResponseBody 103 | public Map addTeacher(Teacher teacher){ 104 | Map map = new HashMap(); 105 | int result = teacherService.insert(teacher); 106 | if(result > 0) { 107 | map.put("success", true); 108 | map.put("msg","添加成功"); 109 | }else{ 110 | map.put("success", false); 111 | map.put("msg","添加失败"); 112 | } 113 | return map; 114 | } 115 | 116 | @RequestMapping("/updateTeacher") 117 | @ResponseBody 118 | public Map updateTeacher(Teacher teacher){ 119 | Map map = new HashMap(); 120 | int result = teacherService.updateByPrimaryKey(teacher); 121 | if(result > 0) { 122 | map.put("success", true); 123 | map.put("msg","修改成功"); 124 | }else{ 125 | map.put("success", false); 126 | map.put("msg","修改失败"); 127 | } 128 | return map; 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/interceptor/AuthorityInterceptor.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | 8 | /** 9 | * @author c1515 10 | */ 11 | 12 | /** 13 | * 权限拦截器,阻止低权限的用户访问高权限的地址 14 | */ 15 | public class AuthorityInterceptor implements HandlerInterceptor { 16 | @Override 17 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 18 | int userType = (int) request.getSession().getAttribute("userType"); 19 | String uri = request.getRequestURI(); 20 | String contextPath = request.getContextPath(); 21 | if(userType == 1) { 22 | /* 管理员 */ 23 | return true; 24 | }else if(userType == 2) { 25 | /* 教师 */ 26 | if(uri.startsWith(contextPath + "/teacher") || uri.startsWith(contextPath + "/admin")) { 27 | return false; 28 | } 29 | return true; 30 | } else if(userType == 3) { 31 | /* 学生 */ 32 | if(uri.startsWith(contextPath + "/teacher") || uri.startsWith(contextPath + "/admin") 33 | || uri.startsWith(contextPath + "/student") ) { 34 | return false; 35 | } 36 | return true; 37 | } 38 | 39 | return true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | 8 | /** 9 | * @author c1515 10 | */ 11 | public class LoginInterceptor implements HandlerInterceptor { 12 | 13 | @Override 14 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 15 | if(request.getSession().getAttribute("userInfo") != null) { 16 | return true; 17 | } 18 | 19 | response.sendRedirect(request.getContextPath() + "/index.jsp"); 20 | return false; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/mapper/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.mapper; 2 | 3 | import cn.akwing.sms.pojo.Admin; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface AdminMapper { 9 | int updateByPrimaryKey(Admin record); 10 | 11 | Admin login(@Param("id") String id, @Param("password") String password); 12 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/mapper/CourseMapper.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.mapper; 2 | 3 | import cn.akwing.sms.pojo.Course; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface CourseMapper { 9 | int deleteByPrimaryKey(@Param("id") String id); 10 | 11 | int insert(Course record); 12 | 13 | List selectAll(); 14 | 15 | int updateByPrimaryKey(Course record); 16 | 17 | List selectByCondition(Course course); 18 | 19 | List selectByStudentId(@Param("studentId") String studentId); 20 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/mapper/GradeMapper.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.mapper; 2 | 3 | import cn.akwing.sms.pojo.Grade; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author c1515 10 | */ 11 | public interface GradeMapper { 12 | List selectByCondition(Grade grade); 13 | int insert(Grade grade); 14 | int update(Grade grade); 15 | int delete(@Param("studentId") String studentId, @Param("courseId") String courseId); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/mapper/StudentMapper.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.mapper; 2 | 3 | import cn.akwing.sms.pojo.Student; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface StudentMapper { 9 | int deleteByPrimaryKey(@Param("id") String[] id); 10 | 11 | int insert(Student record); 12 | 13 | List selectAll(); 14 | 15 | int updateByPrimaryKey(Student record); 16 | 17 | List selectByCondition(Student student); 18 | 19 | Student login(@Param("id") String id, @Param("password") String password); 20 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/mapper/TeacherMapper.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.mapper; 2 | 3 | import cn.akwing.sms.pojo.Teacher; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | public interface TeacherMapper { 9 | int deleteByPrimaryKey(String id); 10 | 11 | int insert(Teacher record); 12 | 13 | List selectAll(); 14 | 15 | int updateByPrimaryKey(Teacher record); 16 | 17 | List selectByCondition(Teacher teacher); 18 | 19 | Teacher login(@Param("id") String id, @Param("password") String password); 20 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/pojo/Admin.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.pojo; 2 | 3 | public class Admin { 4 | private String id; 5 | 6 | private String password; 7 | 8 | private String name; 9 | 10 | private String sex; 11 | 12 | private String email; 13 | 14 | private String tel; 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public void setId(String id) { 21 | this.id = id == null ? null : id.trim(); 22 | } 23 | 24 | public String getPassword() { 25 | return password; 26 | } 27 | 28 | public void setPassword(String password) { 29 | this.password = password == null ? null : password.trim(); 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name == null ? null : name.trim(); 38 | } 39 | 40 | public String getSex() { 41 | return sex; 42 | } 43 | 44 | public void setSex(String sex) { 45 | this.sex = sex == null ? null : sex.trim(); 46 | } 47 | 48 | public String getEmail() { 49 | return email; 50 | } 51 | 52 | public void setEmail(String email) { 53 | this.email = email == null ? null : email.trim(); 54 | } 55 | 56 | public String getTel() { 57 | return tel; 58 | } 59 | 60 | public void setTel(String tel) { 61 | this.tel = tel == null ? null : tel.trim(); 62 | } 63 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/pojo/Course.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.pojo; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class Course { 6 | private String id; 7 | 8 | private String name; 9 | 10 | private String teacherId; 11 | 12 | private String address; 13 | 14 | private BigDecimal credit; 15 | 16 | private String teacherName; 17 | 18 | public String getTeacherName() { 19 | return teacherName; 20 | } 21 | 22 | public void setTeacherName(String teacherName) { 23 | this.teacherName = teacherName == null ? null : teacherName.trim(); 24 | } 25 | 26 | public String getId() { 27 | return id; 28 | } 29 | 30 | public void setId(String id) { 31 | this.id = id == null ? null : id.trim(); 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name == null ? null : name.trim(); 40 | } 41 | 42 | public String getTeacherId() { 43 | return teacherId; 44 | } 45 | 46 | public void setTeacherId(String teacherId) { 47 | this.teacherId = teacherId == null ? null : teacherId.trim(); 48 | } 49 | 50 | public String getAddress() { 51 | return address; 52 | } 53 | 54 | public void setAddress(String address) { 55 | this.address = address == null ? null : address.trim(); 56 | } 57 | 58 | public BigDecimal getCredit() { 59 | return credit; 60 | } 61 | 62 | public void setCredit(BigDecimal credit) { 63 | this.credit = credit; 64 | } 65 | 66 | @Override 67 | public String toString() { 68 | return "Course{" + 69 | "id='" + id + '\'' + 70 | ", name='" + name + '\'' + 71 | ", teacherId='" + teacherId + '\'' + 72 | ", address='" + address + '\'' + 73 | ", credit=" + credit + 74 | ", teacherName='" + teacherName + '\'' + 75 | '}'; 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/pojo/Grade.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.pojo; 2 | 3 | import java.math.BigDecimal; 4 | 5 | /** 6 | * @author c1515 7 | */ 8 | public class Grade { 9 | 10 | private String studentId; 11 | private String courseId; 12 | private String courseName; 13 | private String teacherId; 14 | private String address; 15 | private BigDecimal credit; 16 | private String teacherName; 17 | private String grade; 18 | 19 | /** 20 | * update的时候使用该字段 21 | */ 22 | private String olderCourseId; 23 | 24 | public String getOlderCourseId() { 25 | return olderCourseId; 26 | } 27 | 28 | public void setOlderCourseId(String olderCourseId) { 29 | this.olderCourseId = olderCourseId; 30 | } 31 | 32 | public String getGrade() { 33 | return grade; 34 | } 35 | 36 | public void setGrade(String grade) { 37 | this.grade = grade; 38 | } 39 | 40 | public String getStudentId() { 41 | return studentId; 42 | } 43 | 44 | public void setStudentId(String studentId) { 45 | this.studentId = studentId == null ? null : studentId.trim(); 46 | } 47 | 48 | public String getCourseId() { 49 | return courseId; 50 | } 51 | 52 | public void setCourseId(String courseId) { 53 | this.courseId = courseId == null ? null : courseId.trim(); 54 | } 55 | 56 | public String getCourseName() { 57 | return courseName; 58 | } 59 | 60 | public void setCourseName(String name) { 61 | this.courseName = name; 62 | } 63 | 64 | public String getTeacherId() { 65 | return teacherId; 66 | } 67 | 68 | public void setTeacherId(String teacherId) { 69 | this.teacherId = teacherId; 70 | } 71 | 72 | public String getAddress() { 73 | return address; 74 | } 75 | 76 | public void setAddress(String address) { 77 | this.address = address; 78 | } 79 | 80 | public BigDecimal getCredit() { 81 | return credit; 82 | } 83 | 84 | public void setCredit(BigDecimal credit) { 85 | this.credit = credit; 86 | } 87 | 88 | public String getTeacherName() { 89 | return teacherName; 90 | } 91 | 92 | public void setTeacherName(String teacherName) { 93 | this.teacherName = teacherName; 94 | } 95 | 96 | @Override 97 | public String toString() { 98 | return "Grade{" + 99 | "studentId='" + studentId + '\'' + 100 | ", courseId='" + courseId + '\'' + 101 | ", courseName='" + courseName + '\'' + 102 | ", teacherId='" + teacherId + '\'' + 103 | ", address='" + address + '\'' + 104 | ", credit=" + credit + 105 | ", teacherName='" + teacherName + '\'' + 106 | ", grade='" + grade + '\'' + 107 | '}'; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/pojo/Student.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.pojo; 2 | 3 | public class Student { 4 | private String id; 5 | 6 | private String password; 7 | 8 | private String name; 9 | 10 | private String sex; 11 | 12 | private String tel; 13 | 14 | private String grade; 15 | 16 | private String dept; 17 | 18 | private String major; 19 | 20 | private String ofClass; 21 | 22 | public String getId() { 23 | return id; 24 | } 25 | 26 | public void setId(String id) { 27 | this.id = id == null ? null : id.trim(); 28 | } 29 | 30 | public String getPassword() { 31 | return password; 32 | } 33 | 34 | public void setPassword(String password) { 35 | this.password = password == null ? null : password.trim(); 36 | } 37 | 38 | public String getName() { 39 | return name; 40 | } 41 | 42 | public void setName(String name) { 43 | this.name = name == null ? null : name.trim(); 44 | } 45 | 46 | public String getSex() { 47 | return sex; 48 | } 49 | 50 | public void setSex(String sex) { 51 | this.sex = sex == null ? null : sex.trim(); 52 | } 53 | 54 | public String getTel() { 55 | return tel; 56 | } 57 | 58 | public void setTel(String tel) { 59 | this.tel = tel == null ? null : tel.trim(); 60 | } 61 | 62 | public String getGrade() { 63 | return grade; 64 | } 65 | 66 | public void setGrade(String grade) { 67 | this.grade = grade == null ? null : grade.trim(); 68 | } 69 | 70 | public String getDept() { 71 | return dept; 72 | } 73 | 74 | public void setDept(String dept) { 75 | this.dept = dept == null ? null : dept.trim(); 76 | } 77 | 78 | public String getMajor() { 79 | return major; 80 | } 81 | 82 | public void setMajor(String major) { 83 | this.major = major == null ? null : major.trim(); 84 | } 85 | 86 | public String getOfClass() { 87 | return ofClass; 88 | } 89 | 90 | public void setOfClass(String ofClass) { 91 | this.ofClass = ofClass == null ? null : ofClass.trim(); 92 | } 93 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/pojo/Teacher.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.pojo; 2 | 3 | public class Teacher { 4 | private String id; 5 | 6 | private String password; 7 | 8 | private String name; 9 | 10 | private String sex; 11 | 12 | private String tel; 13 | 14 | private String dept; 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public void setId(String id) { 21 | this.id = id == null ? null : id.trim(); 22 | } 23 | 24 | public String getPassword() { 25 | return password; 26 | } 27 | 28 | public void setPassword(String password) { 29 | this.password = password == null ? null : password.trim(); 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name == null ? null : name.trim(); 38 | } 39 | 40 | public String getSex() { 41 | return sex; 42 | } 43 | 44 | public void setSex(String sex) { 45 | this.sex = sex == null ? null : sex.trim(); 46 | } 47 | 48 | public String getTel() { 49 | return tel; 50 | } 51 | 52 | public void setTel(String tel) { 53 | this.tel = tel == null ? null : tel.trim(); 54 | } 55 | 56 | public String getDept() { 57 | return dept; 58 | } 59 | 60 | public void setDept(String dept) { 61 | this.dept = dept == null ? null : dept.trim(); 62 | } 63 | } -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service; 2 | 3 | import cn.akwing.sms.pojo.Admin; 4 | 5 | /** 6 | * @author c1515 7 | */ 8 | public interface AdminService { 9 | 10 | Admin login(String id, String password); 11 | 12 | int updateByPrimaryKey(Admin record); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/CourseService.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service; 2 | 3 | import cn.akwing.sms.pojo.Course; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author c1515 9 | */ 10 | public interface CourseService { 11 | 12 | List selectByCondition(Course course); 13 | 14 | int deleteByPrimaryKey(String id); 15 | 16 | int insertCourse(Course course); 17 | 18 | int updateCourse(Course course); 19 | 20 | List selectByStudentId(String studentId); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/GradeService.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service; 2 | 3 | import cn.akwing.sms.pojo.Grade; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author c1515 10 | */ 11 | public interface GradeService { 12 | List selectByCondition(Grade grade); 13 | int insert(Grade grade); 14 | int update(Grade grade); 15 | int delete(String studentId, String courseId); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/StudentService.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service; 2 | 3 | import cn.akwing.sms.pojo.Student; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author c1515 9 | */ 10 | public interface StudentService { 11 | 12 | List selectAll(); 13 | 14 | List selectByCondition(Student student); 15 | 16 | int deleteByPrimaryKey(String[] id); 17 | 18 | int insertStudent(Student student); 19 | 20 | int updateStudent(Student student); 21 | 22 | Student login(String id, String password); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/TeacherService.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service; 2 | 3 | import cn.akwing.sms.pojo.Teacher; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author c1515 9 | */ 10 | public interface TeacherService { 11 | 12 | List selectByCondition(Teacher teacher); 13 | 14 | List selectAll(); 15 | 16 | int updateByPrimaryKey(Teacher record); 17 | 18 | int insert(Teacher record); 19 | 20 | int deleteByPrimaryKey(String id); 21 | 22 | Teacher login(String id, String password); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service.impl; 2 | 3 | import cn.akwing.sms.mapper.AdminMapper; 4 | import cn.akwing.sms.pojo.Admin; 5 | import cn.akwing.sms.service.AdminService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author c1515 11 | */ 12 | @Service 13 | public class AdminServiceImpl implements AdminService { 14 | 15 | @Autowired 16 | private AdminMapper adminMapper; 17 | 18 | @Override 19 | public Admin login(String id, String password) { 20 | return adminMapper.login(id, password); 21 | } 22 | 23 | @Override 24 | public int updateByPrimaryKey(Admin record) { 25 | return adminMapper.updateByPrimaryKey(record); 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/impl/CourseServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service.impl; 2 | 3 | import cn.akwing.sms.mapper.CourseMapper; 4 | import cn.akwing.sms.pojo.Course; 5 | import cn.akwing.sms.service.CourseService; 6 | import com.mysql.jdbc.StringUtils; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author c1515 14 | */ 15 | @Service 16 | public class CourseServiceImpl implements CourseService { 17 | 18 | @Autowired 19 | private CourseMapper courseMapper; 20 | 21 | @Override 22 | public List selectByCondition(Course course){ 23 | /* 如果某个查询条件为空,不会通过后面mybatis查询的 if test ... != null */ 24 | if(StringUtils.isNullOrEmpty(course.getName())) { 25 | course.setName(null); 26 | } 27 | 28 | if(StringUtils.isNullOrEmpty(course.getTeacherName())) { 29 | course.setTeacherName(null); 30 | } 31 | 32 | return courseMapper.selectByCondition(course); 33 | } 34 | 35 | @Override 36 | public int deleteByPrimaryKey(String id) { 37 | return courseMapper.deleteByPrimaryKey(id); 38 | } 39 | 40 | @Override 41 | public int insertCourse(Course course) { 42 | return courseMapper.insert(course); 43 | } 44 | 45 | @Override 46 | public int updateCourse(Course course) { 47 | return courseMapper.updateByPrimaryKey(course); 48 | } 49 | 50 | @Override 51 | public List selectByStudentId(String studentId) { 52 | return courseMapper.selectByStudentId(studentId); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/impl/GradeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service.impl; 2 | 3 | import cn.akwing.sms.mapper.GradeMapper; 4 | import cn.akwing.sms.pojo.Grade; 5 | import cn.akwing.sms.service.GradeService; 6 | import com.mysql.jdbc.StringUtils; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author c1515 14 | */ 15 | @Service 16 | public class GradeServiceImpl implements GradeService { 17 | 18 | @Autowired 19 | private GradeMapper gradeMapper; 20 | 21 | @Override 22 | public List selectByCondition(Grade grade) { 23 | /* 如果某个查询条件为空,不会通过后面mybatis查询的 if test ... != null */ 24 | if(StringUtils.isNullOrEmpty(grade.getStudentId())) { 25 | grade.setStudentId(null); 26 | } 27 | if(StringUtils.isNullOrEmpty(grade.getTeacherId())) { 28 | grade.setTeacherId(null); 29 | } 30 | 31 | return gradeMapper.selectByCondition(grade); 32 | } 33 | 34 | @Override 35 | public int insert(Grade grade) { 36 | return gradeMapper.insert(grade); 37 | } 38 | 39 | @Override 40 | public int update(Grade grade) { 41 | return gradeMapper.update(grade); 42 | } 43 | 44 | @Override 45 | public int delete(String studentId, String courseId) { 46 | return gradeMapper.delete(studentId, courseId); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/impl/StudentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service.impl; 2 | 3 | import cn.akwing.sms.mapper.StudentMapper; 4 | import cn.akwing.sms.pojo.Student; 5 | import cn.akwing.sms.service.StudentService; 6 | import com.mysql.jdbc.StringUtils; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author c1515 14 | */ 15 | @Service 16 | public class StudentServiceImpl implements StudentService { 17 | 18 | @Autowired 19 | private StudentMapper studentMapper; 20 | 21 | @Override 22 | public List selectAll() { 23 | return studentMapper.selectAll(); 24 | } 25 | 26 | @Override 27 | public List selectByCondition(Student student) { 28 | /* 如果某个查询条件为空,不会通过后面mybatis查询的 if test ... != null */ 29 | if(StringUtils.isNullOrEmpty(student.getId())) { 30 | student.setId(null); 31 | } 32 | 33 | if(StringUtils.isNullOrEmpty(student.getName())) { 34 | student.setName(null); 35 | } 36 | 37 | if(StringUtils.isNullOrEmpty(student.getOfClass())) { 38 | student.setOfClass(null); 39 | } 40 | return studentMapper.selectByCondition(student); 41 | } 42 | 43 | @Override 44 | public int deleteByPrimaryKey(String[] id) { 45 | return studentMapper.deleteByPrimaryKey(id); 46 | } 47 | 48 | @Override 49 | public int insertStudent(Student student) { 50 | return studentMapper.insert(student); 51 | } 52 | 53 | @Override 54 | public int updateStudent(Student student) { 55 | return studentMapper.updateByPrimaryKey(student); 56 | } 57 | 58 | @Override 59 | public Student login(String id, String password) { 60 | return studentMapper.login(id, password); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/cn/akwing/sms/service/impl/TeacherServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cn.akwing.sms.service.impl; 2 | 3 | import cn.akwing.sms.mapper.TeacherMapper; 4 | import cn.akwing.sms.pojo.Teacher; 5 | import cn.akwing.sms.service.TeacherService; 6 | import com.mysql.jdbc.StringUtils; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author c1515 14 | */ 15 | @Service 16 | public class TeacherServiceImpl implements TeacherService { 17 | 18 | @Autowired 19 | private TeacherMapper teacherMapper; 20 | 21 | @Override 22 | public List selectByCondition(Teacher teacher) { 23 | /* 如果某个查询条件为空,不会通过后面mybatis查询的 if test ... != null */ 24 | if(StringUtils.isNullOrEmpty(teacher.getId())){ 25 | teacher.setId(null); 26 | } 27 | if(StringUtils.isNullOrEmpty(teacher.getName())){ 28 | teacher.setName(null); 29 | } 30 | if(StringUtils.isNullOrEmpty(teacher.getDept())){ 31 | teacher.setDept(null); 32 | } 33 | return teacherMapper.selectByCondition(teacher); 34 | } 35 | 36 | @Override 37 | public List selectAll() { 38 | return teacherMapper.selectAll(); 39 | } 40 | 41 | @Override 42 | public int updateByPrimaryKey(Teacher record) { 43 | return teacherMapper.updateByPrimaryKey(record); 44 | } 45 | 46 | @Override 47 | public int insert(Teacher record) { 48 | return teacherMapper.insert(record); 49 | } 50 | 51 | @Override 52 | public int deleteByPrimaryKey(String id) { 53 | return teacherMapper.deleteByPrimaryKey(id); 54 | } 55 | 56 | @Override 57 | public Teacher login(String id, String password) { 58 | return teacherMapper.login(id, password); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/cn/akwing/sms/mapper/AdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | update admin 14 | set password = #{password,jdbcType=VARCHAR}, 15 | name = #{name,jdbcType=VARCHAR}, 16 | sex = #{sex,jdbcType=CHAR}, 17 | email = #{email,jdbcType=VARCHAR}, 18 | tel = #{tel,jdbcType=VARCHAR} 19 | where id = #{id,jdbcType=VARCHAR} 20 | 21 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/cn/akwing/sms/mapper/CourseMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | delete from course 14 | where id = #{id,jdbcType=VARCHAR} 15 | 16 | 17 | insert into course (id, name, teacher_id, 18 | address, credit) 19 | values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{teacherId,jdbcType=VARCHAR}, 20 | #{address,jdbcType=VARCHAR}, #{credit,jdbcType=DECIMAL}) 21 | 22 | 23 | update course 24 | set name = #{name,jdbcType=VARCHAR}, 25 | teacher_id = #{teacherId,jdbcType=VARCHAR}, 26 | address = #{address,jdbcType=VARCHAR}, 27 | credit = #{credit,jdbcType=DECIMAL} 28 | where id = #{id,jdbcType=VARCHAR} 29 | 30 | 31 | 35 | 36 | 51 | 52 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/resources/cn/akwing/sms/mapper/GradeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 27 | 28 | 29 | update grade 30 | set course_id = #{courseId}, grade = #{grade} 31 | where student_id = #{studentId} and course_id = #{olderCourseId} 32 | 33 | 34 | 35 | insert into grade values(#{studentId}, #{courseId}, #{grade}) 36 | 37 | 38 | 39 | delete from grade where student_id = #{studentId} and course_id = #{courseId} 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/cn/akwing/sms/mapper/StudentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | delete from student 17 | where id IN 18 | 19 | #{singleId} 20 | 21 | 22 | 23 | insert into student (id, password, name, 24 | sex, tel, grade, dept, 25 | major, of_class) 26 | values (#{id,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 27 | #{sex,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, #{grade,jdbcType=VARCHAR}, #{dept,jdbcType=VARCHAR}, 28 | #{major,jdbcType=VARCHAR}, #{ofClass,jdbcType=VARCHAR}) 29 | 30 | 31 | update student 32 | set password = #{password,jdbcType=VARCHAR}, 33 | name = #{name,jdbcType=VARCHAR}, 34 | sex = #{sex,jdbcType=VARCHAR}, 35 | tel = #{tel,jdbcType=VARCHAR}, 36 | grade = #{grade,jdbcType=VARCHAR}, 37 | dept = #{dept,jdbcType=VARCHAR}, 38 | major = #{major,jdbcType=VARCHAR}, 39 | of_class = #{ofClass,jdbcType=VARCHAR} 40 | where id = #{id,jdbcType=VARCHAR} 41 | 42 | 43 | 47 | 48 | 49 | 63 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/resources/cn/akwing/sms/mapper/TeacherMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | delete from teacher 14 | where id = #{id,jdbcType=VARCHAR} 15 | 16 | 17 | insert into teacher (id, password, name, 18 | sex, tel, dept) 19 | values (#{id,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 20 | #{sex,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, #{dept,jdbcType=VARCHAR}) 21 | 22 | 23 | update teacher 24 | set password = #{password,jdbcType=VARCHAR}, 25 | name = #{name,jdbcType=VARCHAR}, 26 | sex = #{sex,jdbcType=VARCHAR}, 27 | tel = #{tel,jdbcType=VARCHAR}, 28 | dept = #{dept,jdbcType=VARCHAR} 29 | where id = #{id,jdbcType=VARCHAR} 30 | 31 | 32 | 36 | 37 | 51 | 52 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/database.properties: -------------------------------------------------------------------------------- 1 | driver=com.mysql.jdbc.Driver 2 | url=jdbc:mysql://localhost:3306/sms?useSSL=false 3 | user=root 4 | password=root 5 | -------------------------------------------------------------------------------- /src/main/resources/generatorConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Global logging configuration 2 | log4j.rootLogger=ERROR, stdout 3 | # MyBatis logging configuration... 4 | # 将包名cn.akwing.sms修改为自己的包名即可使用 5 | log4j.logger.cn.akwing.sms=DEBUG 6 | # Console output... 7 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 8 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 9 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/resources/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/resources/spring-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/system/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" %> 2 | 3 | 4 | 5 | 6 | 登录学生信息管理系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 47 | 48 | 49 | 50 | 88 | 89 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/system/main.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 4 | 5 | 6 | 7 | 8 | 学生信息管理系统 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 |
26 |
    27 |
28 | 38 | 39 |
40 | 41 | 42 | 43 |
44 |
45 | 137 |
138 |
139 | 140 | 141 | 142 |
143 |
144 |
    145 |
  • 我的桌面
  • 146 |
147 |
148 |
149 | <%-- 无法直接访问WEB-INF下的内容,借助Controller跳转 --%> 150 | 151 |
152 |
153 |
154 |
155 |
156 | 157 |
158 | 159 | 160 | 161 | 164 | 165 | 166 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/view/system/welcome.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: c1515 4 | Date: 2020/10/24 5 | Time: 17:21 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 欢迎页面 12 | 13 | 14 |

尊敬的${userInfo.name}, 欢迎来到学生管理系统~

15 |

开发人员: guapi

16 |

联系方式-Email: tomaito@qq.com

17 |
18 |

项目开发环境介绍

19 |

操作系统: Windows 10 家庭版

20 |

开发工具: Intellij IDEA 2020.1.1(Ultimate Edition)

21 |

Java版本: Java8

22 |

服务器: Tomcat 9.0.38

23 |

数据库: Server version: 8.0.20 MySQL Community Server - GPL

24 |

采用技术: JSP+jQuery+Ajax+Layui+Spring+Spring MVC+MyBatis+MySQL+Maven

25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | springmvc 10 | org.springframework.web.servlet.DispatcherServlet 11 | 12 | contextConfigLocation 13 | classpath:applicationContext.xml 14 | 15 | 1 16 | 17 | 18 | springmvc 19 | / 20 | 21 | 22 | 23 | encodingFilter 24 | org.springframework.web.filter.CharacterEncodingFilter 25 | 26 | encoding 27 | utf-8 28 | 29 | 30 | 31 | encodingFilter 32 | /* 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: c1515 4 | Date: 2020/10/23 5 | Time: 20:44 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <% response.sendRedirect("system/goLogin"); %> -------------------------------------------------------------------------------- /src/main/webapp/static/css/board.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #DFE1E5; 3 | } 4 | .container{margin: 0 auto; max-width: 1960px;} 5 | .row{width: 100%; float: left; margin:0 10px 110px 10px;} 6 | 7 | /*= common css to all effects =*/ 8 | .single-member{width: 250px; float: left; margin: 30px 2.5%; background-color: #fff; text-align: center; position: relative;} 9 | .member-image img{max-width: 100%; vertical-align: middle;} 10 | h3 { 11 | font-size: 24px; 12 | font-weight: normal; 13 | margin:0; 14 | text-transform: uppercase; 15 | font-family: 'Microsoft YaHei UI'; 16 | } 17 | h5 { 18 | font-size: 16px; 19 | font-weight: 300; 20 | margin: 0; 21 | line-height: 22px; 22 | font-family: 'Microsoft YaHei UI'; 23 | } 24 | p {font-size: 12px;color:#808080; line-height: 22px; padding: 0 30px; margin-bottom:31px;} 25 | .social-touch{ 26 | margin-top:0px; 27 | } 28 | .social-touch a { 29 | display: inline-block; 30 | width: 250px; 31 | height: 40px; 32 | margin-top:10px; 33 | background-repeat: no-repeat; 34 | opacity: 0.9; 35 | text-align:center; 36 | line-height:40px; 37 | transition: 0.3s; 38 | color: #fff; 39 | text-decoration: none; 40 | font-size: 14px; 41 | font-family: 'Microsoft YaHei UI' 42 | } 43 | .social-touch a:hover{opacity: 1; transition: 0.3s; color:white;} 44 | /*= common css to all effects end =*/ 45 | 46 | /*= effect-3 css =*/ 47 | .effect-3{max-height: 270px; min-height: 270px; overflow: hidden;border-radius:5px;} 48 | .effect-3 h3{padding-top: 7px; line-height: 33px;} 49 | .effect-3 .member-image { 50 | border-bottom: 8px solid #3BB13E; 51 | transition: 0.4s; 52 | height: 195px; 53 | width: 100%; 54 | display: inline-block; 55 | float: none; 56 | vertical-align: middle; 57 | } 58 | .effect-3 .member-info{transition: 0.4s;} 59 | .effect-3 .member-image img{width: 100%; vertical-align: bottom;} 60 | .effect-3 .social-touch { 61 | float: left; 62 | left: 0; 63 | bottom: 0; 64 | overflow: hidden; 65 | padding: 5px 0; 66 | width: 100%; 67 | transition: 0.4s; 68 | } 69 | .effect-3:hover .member-image{border-bottom: 0; border-radius: 0 0 50px 50px; height: 81px; display: inline-block; overflow: hidden; width: 109px; transition: 0.4s;} 70 | /*= effect-3 css end =*/ 71 | .toolinfobar{ 72 | margin:10px; 73 | } 74 | .x-right{ 75 | float:right; 76 | margin-right:100px; 77 | overflow:hidden; 78 | } 79 | /*= Media Query 80 | =============== */ 81 | @media only screen and (max-width: 1080px) { 82 | .row{width: 100%; margin: 110px 0;} 83 | .team-members{text-align: center;} 84 | .single-member{float: none; display: inline-block; vertical-align: bottom;} 85 | } 86 | /*= Media Query End 87 | =================== */ -------------------------------------------------------------------------------- /src/main/webapp/static/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('../fonts/iconfont.eot'); 4 | src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/iconfont.woff') format('woff'), 6 | url('../fonts/iconfont.ttf') format('truetype'), 7 | url('../fonts/iconfont.svg#iconfont') format('svg'); 8 | } 9 | .iconfont{ 10 | font-family:"iconfont" !important; 11 | font-size:16px;font-style:normal; 12 | -webkit-font-smoothing: antialiased; 13 | -webkit-text-stroke-width: 0.2px; 14 | -moz-osx-font-smoothing: grayscale; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/static/css/load.css: -------------------------------------------------------------------------------- 1 | #loading { 2 | background-color: #45b29d; 3 | height: 100%; 4 | width: 100%; 5 | position: fixed; 6 | z-index: 1; 7 | margin-top: 0px; 8 | top: 0px; 9 | } 10 | 11 | #loading-center { 12 | width: 100%; 13 | height: 100%; 14 | position: relative; 15 | } 16 | 17 | #loading-center-absolute { 18 | position: absolute; 19 | left: 50%; 20 | top: 50%; 21 | height: 50px; 22 | width: 150px; 23 | margin-top: -25px; 24 | margin-left: -75px; 25 | } 26 | 27 | .object { 28 | width: 8px; 29 | height: 50px; 30 | margin-right: 5px; 31 | background-color: #FFF; 32 | -webkit-animation: animate 1s infinite; 33 | animation: animate 1s infinite; 34 | float: left; 35 | } 36 | 37 | .object:last-child { 38 | margin-right: 0px; 39 | } 40 | 41 | .object:nth-child(10) { 42 | -webkit-animation-delay: 0.9s; 43 | animation-delay: 0.9s; 44 | } 45 | 46 | .object:nth-child(9) { 47 | -webkit-animation-delay: 0.8s; 48 | animation-delay: 0.8s; 49 | } 50 | 51 | .object:nth-child(8) { 52 | -webkit-animation-delay: 0.7s; 53 | animation-delay: 0.7s; 54 | } 55 | 56 | .object:nth-child(7) { 57 | -webkit-animation-delay: 0.6s; 58 | animation-delay: 0.6s; 59 | } 60 | 61 | .object:nth-child(6) { 62 | -webkit-animation-delay: 0.5s; 63 | animation-delay: 0.5s; 64 | } 65 | 66 | .object:nth-child(5) { 67 | -webkit-animation-delay: 0.4s; 68 | animation-delay: 0.4s; 69 | } 70 | 71 | .object:nth-child(4) { 72 | -webkit-animation-delay: 0.3s; 73 | animation-delay: 0.3s; 74 | } 75 | 76 | .object:nth-child(3) { 77 | -webkit-animation-delay: 0.2s; 78 | animation-delay: 0.2s; 79 | } 80 | 81 | .object:nth-child(2) { 82 | -webkit-animation-delay: 0.1s; 83 | animation-delay: 0.1s; 84 | } 85 | 86 | @-webkit-keyframes animate { 87 | 88 | 50% { 89 | -ms-transform: scaleY(0); 90 | -webkit-transform: scaleY(0); 91 | transform: scaleY(0); 92 | } 93 | } 94 | 95 | @keyframes animate { 96 | 50% { 97 | -ms-transform: scaleY(0); 98 | -webkit-transform: scaleY(0); 99 | transform: scaleY(0); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/fonts/iconfont.eot -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/fonts/iconfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/fonts/iconfont.woff -------------------------------------------------------------------------------- /src/main/webapp/static/images/aiwrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/aiwrap.png -------------------------------------------------------------------------------- /src/main/webapp/static/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/bg.png -------------------------------------------------------------------------------- /src/main/webapp/static/images/board.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/board.jpg -------------------------------------------------------------------------------- /src/main/webapp/static/images/cainiao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/cainiao.jpg -------------------------------------------------------------------------------- /src/main/webapp/static/images/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/close.gif -------------------------------------------------------------------------------- /src/main/webapp/static/images/close_div.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/close_div.png -------------------------------------------------------------------------------- /src/main/webapp/static/images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/down.png -------------------------------------------------------------------------------- /src/main/webapp/static/images/greyUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/greyUp.png -------------------------------------------------------------------------------- /src/main/webapp/static/images/kuaidi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/kuaidi.jpg -------------------------------------------------------------------------------- /src/main/webapp/static/images/metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/metro.gif -------------------------------------------------------------------------------- /src/main/webapp/static/images/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/metro.png -------------------------------------------------------------------------------- /src/main/webapp/static/images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/images/up.png -------------------------------------------------------------------------------- /src/main/webapp/static/js/date-format.js: -------------------------------------------------------------------------------- 1 | //对Date的扩展,将 Date 转化为指定格式的String 2 | //月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, 3 | //年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) 4 | //例子: 5 | //(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 6 | //(new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 7 | Date.prototype.Format = function (fmt) { //author: meizz 8 | var o = { 9 | "M+": this.getMonth() + 1, //月份 10 | "d+": this.getDate(), //日 11 | "h+": this.getHours(), //小时 12 | "m+": this.getMinutes(), //分 13 | "s+": this.getSeconds(), //秒 14 | "q+": Math.floor((this.getMonth() + 3) / 3), //季度 15 | "S": this.getMilliseconds() //毫秒 16 | }; 17 | if (/(y+)/.test(fmt)) 18 | fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); 19 | for (var k in o) 20 | if (new RegExp("(" + k + ")").test(fmt)) 21 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); 22 | return fmt; 23 | } -------------------------------------------------------------------------------- /src/main/webapp/static/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.4.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2013 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | (function (factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD 11 | define(['jquery'], factory); 12 | } else if (typeof exports === 'object') { 13 | // CommonJS 14 | factory(require('jquery')); 15 | } else { 16 | // Browser globals 17 | factory(jQuery); 18 | } 19 | }(function ($) { 20 | 21 | var pluses = /\+/g; 22 | 23 | function encode(s) { 24 | return config.raw ? s : encodeURIComponent(s); 25 | } 26 | 27 | function decode(s) { 28 | return config.raw ? s : decodeURIComponent(s); 29 | } 30 | 31 | function stringifyCookieValue(value) { 32 | return encode(config.json ? JSON.stringify(value) : String(value)); 33 | } 34 | 35 | function parseCookieValue(s) { 36 | if (s.indexOf('"') === 0) { 37 | // This is a quoted cookie as according to RFC2068, unescape... 38 | s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 39 | } 40 | 41 | try { 42 | // Replace server-side written pluses with spaces. 43 | // If we can't decode the cookie, ignore it, it's unusable. 44 | // If we can't parse the cookie, ignore it, it's unusable. 45 | s = decodeURIComponent(s.replace(pluses, ' ')); 46 | return config.json ? JSON.parse(s) : s; 47 | } catch(e) {} 48 | } 49 | 50 | function read(s, converter) { 51 | var value = config.raw ? s : parseCookieValue(s); 52 | return $.isFunction(converter) ? converter(value) : value; 53 | } 54 | 55 | var config = $.cookie = function (key, value, options) { 56 | 57 | // Write 58 | 59 | if (value !== undefined && !$.isFunction(value)) { 60 | options = $.extend({}, config.defaults, options); 61 | 62 | if (typeof options.expires === 'number') { 63 | var days = options.expires, t = options.expires = new Date(); 64 | t.setTime(+t + days * 864e+5); 65 | } 66 | 67 | return (document.cookie = [ 68 | encode(key), '=', stringifyCookieValue(value), 69 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 70 | options.path ? '; path=' + options.path : '', 71 | options.domain ? '; domain=' + options.domain : '', 72 | options.secure ? '; secure' : '' 73 | ].join('')); 74 | } 75 | 76 | // Read 77 | 78 | var result = key ? undefined : {}; 79 | 80 | // To prevent the for loop in the first place assign an empty array 81 | // in case there are no cookies at all. Also prevents odd result when 82 | // calling $.cookie(). 83 | var cookies = document.cookie ? document.cookie.split('; ') : []; 84 | 85 | for (var i = 0, l = cookies.length; i < l; i++) { 86 | var parts = cookies[i].split('='); 87 | var name = decode(parts.shift()); 88 | var cookie = parts.join('='); 89 | 90 | if (key && key === name) { 91 | // If second argument (value) is a function it's a converter... 92 | result = read(cookie, value); 93 | break; 94 | } 95 | 96 | // Prevent storing a cookie that we couldn't decode. 97 | if (!key && (cookie = read(cookie)) !== undefined) { 98 | result[name] = cookie; 99 | } 100 | } 101 | 102 | return result; 103 | }; 104 | 105 | config.defaults = {}; 106 | 107 | $.removeCookie = function (key, options) { 108 | if ($.cookie(key) === undefined) { 109 | return false; 110 | } 111 | 112 | // Must not alter options, thus extending a fresh object... 113 | $.cookie(key, '', $.extend({}, options, { expires: -1 })); 114 | return !$.cookie(key); 115 | }; 116 | 117 | })); 118 | -------------------------------------------------------------------------------- /src/main/webapp/static/js/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | /* 16 | ** Unobtrusive validation support library for jQuery and jQuery Validate 17 | ** Copyright (C) Microsoft Corporation. All rights reserved. 18 | */ 19 | (function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
  • ").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this),c="__jquery_unobtrusive_validation_form_reset";if(b.data(c))return;b.data(c,true);try{b.data("validator").resetForm()}finally{b.removeData(c)}b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(b){var c=a(b),f=c.data(e),i=a.proxy(n,b),g=d.unobtrusive.options||{},h=function(e,d){var c=g[e];c&&a.isFunction(c)&&c.apply(b,d)};if(!f){f={options:{errorClass:g.errorClass||"input-validation-error",errorElement:g.errorElement||"span",errorPlacement:function(){m.apply(b,arguments);h("errorPlacement",arguments)},invalidHandler:function(){l.apply(b,arguments);h("invalidHandler",arguments)},messages:{},rules:{},success:function(){k.apply(b,arguments);h("success",arguments)}},attachValidation:function(){c.off("reset."+e,i).on("reset."+e,i).validate(this.options)},validate:function(){c.validate();return c.valid()}};c.data(e,f)}return f}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(c){var b=a(c),e=b.parents().addBack().filter("form").add(b.find("form")).has("[data-val=true]");b.find("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});e.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){var d=a(b.form).find(":input").filter("[name='"+f(c)+"']");return d.is(":checkbox")?d.filter(":checked").val()||d.filter(":hidden").val()||"":d.is(":radio")?d.filter(":checked").val()||"":d.val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery); -------------------------------------------------------------------------------- /src/main/webapp/static/js/xadmin.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | //加载弹出层 3 | layui.use(['form', 'element'], 4 | function () { 5 | layer = layui.layer; 6 | element = layui.element; 7 | }); 8 | 9 | //触发事件 10 | var tab = { 11 | tabAdd: function (title, url, id) { 12 | //新增一个Tab项 13 | element.tabAdd('xbs_tab', { 14 | title: title 15 | , content: '' 16 | , id: id 17 | }) 18 | } 19 | , tabDelete: function (othis) { 20 | //删除指定Tab项 21 | element.tabDelete('xbs_tab', '44'); //删除:“商品管理” 22 | 23 | 24 | othis.addClass('layui-btn-disabled'); 25 | } 26 | , tabChange: function (id) { 27 | //切换到指定Tab项 28 | element.tabChange('xbs_tab', id); //切换到:用户管理 29 | } 30 | }; 31 | 32 | 33 | tableCheck = { 34 | init: function () { 35 | $(".layui-form-checkbox").click(function (event) { 36 | if ($(this).hasClass('layui-form-checked')) { 37 | $(this).removeClass('layui-form-checked'); 38 | if ($(this).hasClass('header')) { 39 | $(".layui-form-checkbox").removeClass('layui-form-checked'); 40 | } 41 | } else { 42 | $(this).addClass('layui-form-checked'); 43 | if ($(this).hasClass('header')) { 44 | $(".layui-form-checkbox").addClass('layui-form-checked'); 45 | } 46 | } 47 | 48 | }); 49 | }, 50 | getData: function () { 51 | var obj = $(".layui-form-checked").not('.header'); 52 | var arr = []; 53 | obj.each(function (index, el) { 54 | arr.push(obj.eq(index).attr('data-id')); 55 | }); 56 | return arr; 57 | } 58 | } 59 | 60 | //开启表格多选 61 | tableCheck.init(); 62 | 63 | 64 | $('.container .left_open i').click(function (event) { 65 | if ($('.left-nav').css('left') == '0px') { 66 | $('.left-nav').animate({ left: '-221px' }, 100); 67 | $('.page-content').animate({ left: '0px' }, 100); 68 | $('.page-content-bg').hide(); 69 | } else { 70 | $('.left-nav').animate({ left: '0px' }, 100); 71 | $('.page-content').animate({ left: '221px' }, 100); 72 | if ($(window).width() < 768) { 73 | $('.page-content-bg').show(); 74 | } 75 | } 76 | 77 | }); 78 | 79 | $('.page-content-bg').click(function (event) { 80 | $('.left-nav').animate({ left: '-221px' }, 100); 81 | $('.page-content').animate({ left: '0px' }, 100); 82 | $(this).hide(); 83 | }); 84 | 85 | $('.layui-tab-close').click(function (event) { 86 | $('.layui-tab-title li').eq(0).find('i').remove(); 87 | }); 88 | 89 | $("tbody.x-cate tr[fid!='0']").hide(); 90 | // 栏目多级显示效果 91 | $('.x-show').click(function () { 92 | if ($(this).attr('status') == 'true') { 93 | $(this).html(''); 94 | $(this).attr('status', 'false'); 95 | cateId = $(this).parents('tr').attr('cate-id'); 96 | $("tbody tr[fid=" + cateId + "]").show(); 97 | } else { 98 | cateIds = []; 99 | $(this).html(''); 100 | $(this).attr('status', 'true'); 101 | cateId = $(this).parents('tr').attr('cate-id'); 102 | getCateId(cateId); 103 | for (var i in cateIds) { 104 | $("tbody tr[cate-id=" + cateIds[i] + "]").hide().find('.x-show').html('').attr('status', 'true'); 105 | } 106 | } 107 | }) 108 | 109 | //左侧菜单效果 110 | // $('#content').bind("click",function(event){ 111 | $('.left-nav #nav li').click(function (event) { 112 | 113 | if ($(this).children('.sub-menu').length) { 114 | if ($(this).hasClass('open')) { 115 | $(this).removeClass('open'); 116 | $(this).find('.nav_right').html(''); 117 | $(this).children('.sub-menu').stop().slideUp(); 118 | $(this).siblings().children('.sub-menu').slideUp(); 119 | } else { 120 | $(this).addClass('open'); 121 | $(this).children('a').find('.nav_right').html(''); 122 | $(this).children('.sub-menu').stop().slideDown(); 123 | $(this).siblings().children('.sub-menu').stop().slideUp(); 124 | $(this).siblings().find('.nav_right').html(''); 125 | $(this).siblings().removeClass('open'); 126 | } 127 | } else { 128 | 129 | var url = $(this).children('a').attr('_href'); 130 | var title = $(this).find('cite').html(); 131 | var index = $('.left-nav #nav li').index($(this)); 132 | 133 | for (var i = 0; i < $('.x-iframe').length; i++) { 134 | if ($('.x-iframe').eq(i).attr('tab-id') == index + 1) { 135 | tab.tabChange(index + 1); 136 | event.stopPropagation(); 137 | return; 138 | } 139 | }; 140 | 141 | tab.tabAdd(title, url, index + 1); 142 | tab.tabChange(index + 1); 143 | } 144 | 145 | event.stopPropagation(); 146 | 147 | }) 148 | 149 | }) 150 | var cateIds = []; 151 | function getCateId(cateId) { 152 | 153 | $("tbody tr[fid=" + cateId + "]").each(function (index, el) { 154 | id = $(el).attr('cate-id'); 155 | cateIds.push(id); 156 | getCateId(id); 157 | }); 158 | } 159 | 160 | /*弹出层*/ 161 | /* 162 | 参数解释: 163 | title 标题 164 | url 请求的url 165 | id 需要操作的数据id 166 | w 弹出层宽度(缺省调默认值) 167 | h 弹出层高度(缺省调默认值) 168 | */ 169 | function x_admin_show(title, url, w, h) { 170 | if (title == null || title == '') { 171 | title = false; 172 | }; 173 | if (url == null || url == '') { 174 | url = "/Account/NoRole"; 175 | }; 176 | if (w == null || w == '') { 177 | w = ($(window).width() * 0.9); 178 | }; 179 | if (h == null || h == '') { 180 | h = ($(window).height() - 50); 181 | }; 182 | layer.open({ 183 | type: 2, 184 | skin: 'layui-layer-lan', 185 | area: [w + 'px', h + 'px'], 186 | fix: false, //不固定 187 | maxmin: true, 188 | shadeClose: true, 189 | shade: 0.4, 190 | title: title, 191 | content: url 192 | }); 193 | } 194 | 195 | 196 | /*关闭弹出框口*/ 197 | function x_admin_close() { 198 | var index = parent.layer.getFrameIndex(window.name); 199 | parent.layer.close(index); 200 | } 201 | 202 | 203 | -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/laydate/default/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/webapp/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/webapp/static/layui/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/font/iconfont.woff2 -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitccl/sms/e5aa2c6f626ef0dbed8c4c15c71eeab921413a9d/src/main/webapp/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
      ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
    "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
    1. '+o.replace(/[\r\t\n]+/g,"
    2. ")+"
    "),c.find(">.layui-code-h3")[0]||c.prepend('

    '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

    ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
  • "+(i.title||"unnaming")+"
  • ";return s[0]?s.before(r):n.append(r),o.append('
    '+(i.content||"")+"
    "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&f.width()&&(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",u=1;u<=i.length;u++){var r='
    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
    • ":n+=r}n+="
    "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/slider.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
    '+(t.tips?'
    ':"")+'
    '+(t.range?'
    ':"")+"
    ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
    ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
    f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/transfer.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define(["laytpl","form"],function(e){"use strict";var a=layui.$,t=layui.laytpl,n=layui.form,i="transfer",l={config:{},index:layui[i]?layui[i].index+1e4:0,set:function(e){var t=this;return t.config=a.extend({},t.config,e),t},on:function(e,a){return layui.onevent.call(this,i,e,a)}},r=function(){var e=this,a=e.config,t=a.id||e.index;return r.that[t]=e,r.config[t]=a,{config:a,reload:function(a){e.reload.call(e,a)},getData:function(){return e.getData.call(e)}}},c="layui-hide",o="layui-btn-disabled",d="layui-none",s="layui-transfer-box",u="layui-transfer-header",h="layui-transfer-search",f="layui-transfer-active",y="layui-transfer-data",p=function(e){return e=e||{},['
    ','
    ','","
    ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
      ',"
      "].join("")},v=['
      ',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'
      ','",'","
      ",p({index:1,checkAllName:"layTransferRightCheckAll"}),"
      "].join(""),x=function(e){var t=this;t.index=++l.index,t.config=a.extend({},t.config,l.config,e),t.render()};x.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},x.prototype.reload=function(e){var t=this;layui.each(e,function(e,a){a.constructor===Array&&delete t.config[e]}),t.config=a.extend(!0,{},t.config,e),t.render()},x.prototype.render=function(){var e=this,n=e.config,i=e.elem=a(t(v).render({data:n,index:e.index})),l=n.elem=a(n.elem);l[0]&&(n.data=n.data||[],n.value=n.value||[],e.key=n.id||e.index,l.html(e.elem),e.layBox=e.elem.find("."+s),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+h),e.layData=i.find("."+y),e.layBtn=i.find("."+f+" .layui-btn"),e.layBox.css({width:n.width,height:n.height}),e.layData.css({height:function(){return n.height-e.layHeader.outerHeight()-e.laySearch.outerHeight()-2}()}),e.renderData(),e.events())},x.prototype.renderData=function(){var e=this,a=(e.config,[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}]);e.parseData(function(e){var t=e.selected?1:0,n=["
    • ",'',"
    • "].join("");a[t].views.push(n),delete e.selected}),e.layData.eq(0).html(a[0].views.join("")),e.layData.eq(1).html(a[1].views.join("")),e.renderCheckBtn()},x.prototype.renderForm=function(e){n.render(e,"LAY-transfer-"+this.index)},x.prototype.renderCheckBtn=function(e){var t=this,n=t.config;e=e||{},t.layBox.each(function(i){var l=a(this),r=l.find("."+y),d=l.find("."+u).find('input[type="checkbox"]'),s=r.find('input[type="checkbox"]'),h=0,f=!1;if(s.each(function(){var e=a(this).data("hide");(this.checked||this.disabled||e)&&h++,this.checked&&!e&&(f=!0)}),d.prop("checked",f&&h===s.length),t.layBtn.eq(i)[f?"removeClass":"addClass"](o),!e.stopNone){var p=r.children("li:not(."+c+")").length;t.noneView(r,p?"":n.text.none)}}),t.renderForm("checkbox")},x.prototype.noneView=function(e,t){var n=a('

      '+(t||"")+"

      ");e.find("."+d)[0]&&e.find("."+d).remove(),t.replace(/\s/g,"")&&e.append(n)},x.prototype.setValue=function(){var e=this,t=e.config,n=[];return e.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){var e=a(this).data("hide");e||n.push(this.value)}),t.value=n,e},x.prototype.parseData=function(e){var t=this,n=t.config,i=[];return layui.each(n.data,function(t,l){l=("function"==typeof n.parseData?n.parseData(l):l)||l,i.push(l=a.extend({},l)),layui.each(n.value,function(e,a){a==l.value&&(l.selected=!0)}),e&&e(l)}),n.data=i,t},x.prototype.getData=function(e){var a=this,t=a.config,n=[];return a.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&n.push(t)})}),n},x.prototype.events=function(){var e=this,t=e.config;e.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var t=a(this).prev(),n=t[0].checked,i=t.parents("."+s).eq(0).find("."+y);t[0].disabled||("all"===t.attr("lay-type")&&i.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=n)}),e.renderCheckBtn({stopNone:!0}))}),e.layBtn.on("click",function(){var n=a(this),i=n.data("index"),l=e.layBox.eq(i),r=[];if(!n.hasClass(o)){e.layBox.eq(i).each(function(t){var n=a(this),i=n.find("."+y);i.children("li").each(function(){var t=a(this),n=t.find('input[type="checkbox"]'),i=n.data("hide");n[0].checked&&!i&&(n[0].checked=!1,l.siblings("."+s).find("."+y).append(t.clone()),t.remove(),r.push(n[0].value)),e.setValue()})}),e.renderCheckBtn();var c=l.siblings("."+s).find("."+h+" input");""===c.val()||c.trigger("keyup"),t.onchange&&t.onchange(e.getData(r),i)}}),e.laySearch.find("input").on("keyup",function(){var n=this.value,i=a(this).parents("."+h).eq(0).siblings("."+y),l=i.children("li");l.each(function(){var e=a(this),t=e.find('input[type="checkbox"]'),i=t[0].title.indexOf(n)!==-1;e[i?"removeClass":"addClass"](c),t.data("hide",!i)}),e.renderCheckBtn();var r=l.length===i.children("li."+c).length;e.noneView(i,r?t.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,a){var t=r.that[e];return t.reload(a),r.call(t)},l.getData=function(e){var a=r.that[e];return a.getData()},l.render=function(e){var a=new x(e);return r.call(a)},e(i,l)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,n=layui.hint(),o=layui.device(),a={config:{},set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,r,e,t)}},l=function(){var e=this;return{upload:function(t){e.upload.call(e,t)},reload:function(t){e.reload.call(e,t)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var i=this;i.config=t.extend({},i.config,a.config,e),i.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var i=this,e=i.config;e.elem=t(e.elem),e.bindAction=t(e.bindAction),i.file(),i.events()},p.prototype.file=function(){var e=this,i=e.config,n=e.elemFile=t(['"].join("")),a=i.elem.next();(a.hasClass(u)||a.hasClass(c))&&a.remove(),o.ie&&o.ie<10&&i.elem.wrap('
      '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(n),o.ie&&o.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,i=e.config,n=t(''),o=t(['
      ',""].join(""));t("#"+f)[0]||t("body").append(n),i.elem.next().hasClass(c)||(e.elemFile.wrap(o),i.elem.next("."+c).append(function(){var e=[];return layui.each(i.data,function(t,i){i="function"==typeof i?i():i,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var t=this;window.FileReader&&layui.each(t.chooseFiles,function(t,i){var n=new FileReader;n.readAsDataURL(i),n.onload=function(){e&&e(t,i,this.result)}})},p.prototype.upload=function(e,i){var n,a=this,l=a.config,r=a.elemFile[0],u=function(){var i=0,n=0,o=e||a.files||a.chooseFiles||r.files,u=function(){l.multiple&&i+n===a.fileLength&&"function"==typeof l.allDone&&l.allDone({total:a.fileLength,successful:i,aborted:n})};layui.each(o,function(e,o){var r=new FormData;r.append(l.field,o),layui.each(l.data,function(e,t){t="function"==typeof t?t():t,r.append(e,t)});var c={url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(t){i++,d(e,t),u()},error:function(){n++,a.msg("请求上传接口出现异常"),m(e),u()}};"function"==typeof l.progress&&(c.xhr=function(){var e=t.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=Math.floor(e.loaded/e.total*100);l.progress(t,l.item[0],e)}}),e}),t.ajax(c)})},c=function(){var e=t("#"+f);a.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var t,i=e.contents().find("body");try{t=i.text()}catch(n){a.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}t&&(clearInterval(p.timer),i.html(""),d(0,t))},30)},d=function(e,t){if(a.elemFile.next("."+s).remove(),r.value="","object"!=typeof t)try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(t,e||0,function(e){a.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){a.upload(e)})},h=l.exts,v=function(){var t=[];return layui.each(e||a.chooseFiles,function(e,i){t.push(i.name)}),t}(),g={preview:function(e){a.preview(e)},upload:function(e,t){var i={};i[e]=t,a.upload(i)},pushFile:function(){return a.files=a.files||{},layui.each(a.chooseFiles,function(e,t){a.files[e]=t}),a.files},resetFile:function(e,t,i){var n=new File([t],i);a.files=a.files||{},a.files[e]=n}},y=function(){if("choose"!==i&&!l.auto||(l.choose&&l.choose(g),"choose"!==i))return l.before&&l.before(g),o.ie?o.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return a.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return a.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return a.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,t){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(t))||(n=!0)}),n)return a.msg("选择的图片中包含不支持的格式"),r.value=""}if(a.fileLength=function(){var t=0,i=e||a.files||a.chooseFiles||r.files;return layui.each(i,function(){t++}),t}(),l.number&&a.fileLength>l.number)return a.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(o.ie&&o.ie<10)){var F;if(layui.each(a.chooseFiles,function(e,t){if(t.size>1024*l.size){var i=l.size/1024;i=i>=1?i.toFixed(2)+"MB":l.size+"KB",r.value="",F=i}}),F)return a.msg("文件不能超过"+F)}y()}},p.prototype.reload=function(e){e=e||{},delete e.elem,delete e.bindAction;var i=this,e=i.config=t.extend({},i.config,a.config,e),n=e.elem.next();n.attr({name:e.name,accept:e.acceptMime,multiple:e.multiple})},p.prototype.events=function(){var e=this,i=e.config,a=function(t){e.chooseFiles={},layui.each(t,function(t,i){var n=(new Date).getTime();e.chooseFiles[n+"-"+t]=i})},l=function(t,n){var o=e.elemFile,a=t.length>1?t.length+"个文件":(t[0]||{}).name||o[0].value.match(/[^\/\\]+\..+/g)||[]||"";o.next().hasClass(s)&&o.next().remove(),e.upload(null,"choose"),e.isFile()||i.choose||o.after(''+a+"")};i.elem.off("upload.start").on("upload.start",function(){var o=t(this),a=o.attr("lay-data");if(a)try{a=new Function("return "+a)(),e.config=t.extend({},i,a)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+a)}e.config.item=o,e.elemFile[0].click()}),o.ie&&o.ie<10||i.elem.off("upload.over").on("upload.over",function(){var e=t(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=t(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,o){var r=t(this),u=o.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),a(u),i.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var t=this.files||[];a(t),i.auto?e.upload():l(t)}),i.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),i.elem.data("haveEvents")||(e.elemFile.on("change",function(){t(this).trigger("upload.change")}),i.elem.on("click",function(){e.isFile()||t(this).trigger("upload.start")}),i.drag&&i.elem.on("dragover",function(e){e.preventDefault(),t(this).trigger("upload.over")}).on("dragleave",function(e){t(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),t(this).trigger("upload.drop",e)}),i.bindAction.on("click",function(){t(this).trigger("upload.action")}),i.elem.data("haveEvents",!0))},a.render=function(e){var t=new p(e);return l.call(t)},e(r,a)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],u=t(['
        ',e.bar1?'
      • '+c[0]+"
      • ":"",e.bar2?'
      • '+c[1]+"
      • ":"",'
      • '+c[2]+"
      • ","
      "].join("")),g=u.find("."+o),s=function(){var t=r.scrollTop();t>=e.showHeight?i||(g.show(),i=1):i&&(g.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&u.css(e.css),l.append(u),s(),u.find("li").on("click",function(){var i=t(this),n=i.attr("lay-type");"top"===n&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var n=this,a="function"==typeof t,o=new Date(e).getTime(),r=new Date(!t||a?(new Date).getTime():t).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var u=setTimeout(function(){n.countdown(e,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,u),l<=0&&clearTimeout(u),u},timeAgo:function(e,t){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>26784e5?(a=new Date(e),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),t||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=18e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var n=e.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(e,n,a){var o=t("body");return a=a||"click",n=i.event[e]=t.extend(!0,i.event[e],n)||{},i.event.UTIL_EVENT_CALLBACK=i.event.UTIL_EVENT_CALLBACK||{},o.off(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),i.event.UTIL_EVENT_CALLBACK[e]=function(){var i=t(this),a=i.attr(e);"function"==typeof n[a]&&n[a].call(this,i)},o.on(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),n}};!function(e,t,i){"$:nomunge";function n(){a=t[l](function(){o.each(function(){var t=e(this),i=t.width(),n=t.height(),a=e.data(this,u);(i!==a.w||n!==a.h)&&t.trigger(c,[a.w=i,a.h=n])}),n()},r[g])}var a,o=e([]),r=e.resize=e.extend(e.resize,{}),l="setTimeout",c="resize",u=c+"-special-event",g="delay",s="throttleWindow";r[g]=250,r[s]=!0,e.event.special[c]={setup:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.add(t),e.data(this,u,{w:t.width(),h:t.height()}),1===o.length&&n()},teardown:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.not(t),t.removeData(u),o.length||clearTimeout(a)},add:function(t){function n(t,n,o){var r=e(this),l=e.data(this,u)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[s]&&this[l])return!1;var a;return e.isFunction(t)?(a=t,n):(a=t.handler,void(t.handler=n))}}}(t,window),e("util",i)}); -------------------------------------------------------------------------------- /src/main/webapp/static/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.6 MIT License By https://www.layui.com */ 2 | ;!function(e){"use strict";var t=document,n={modules:{},status:{},timeout:10,event:{}},r=function(){this.v="2.5.6"},o=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,r=n.length-1,o=r;o>0;o--)if("interactive"===n[o].readyState){e=n[o].src;break}return e||n[r].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",transfer:"modules/transfer",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};r.prototype.cache=n,r.prototype.define=function(e,t){var r=this,o="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(r,o){e(r,o),n.callback[r]=function(){t(e)}}),this};return o&&(t=e,e=[]),!layui["layui.all"]&&layui["layui.mobile"]?a.call(r):(r.use(e,a),r)},r.prototype.use=function(e,r,l){function c(e,t){var r="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||r.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[d]=t,y.removeChild(h),function o(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void(n.status[d]?s():setTimeout(o,4))}())}function s(){l.push(layui[d]),e.length>1?p.use(e.slice(1),r,l):"function"==typeof r&&r.apply(layui,l)}var p=this,f=n.dir=n.dir?n.dir:o,y=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(p.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var d=e[0],m=0;if(l=l||[],n.host=n.host||(f.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[d]||!layui["layui.all"]&&layui["layui.mobile"]&&u[d])return s(),p;var v=(u[d]?f+"lay/":/^\{\/\}/.test(p.modules[d])?"":n.base||"")+(p.modules[d]||d)+".js";if(v=v.replace(/^\{\/\}/,""),!n.modules[d]&&layui[d]&&(n.modules[d]=v),n.modules[d])!function g(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void("string"==typeof n.modules[d]&&n.status[d]?s():setTimeout(g,4))}();else{var h=t.createElement("script");h.async=!0,h.charset="utf-8",h.src=v+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),y.appendChild(h),!h.attachEvent||h.attachEvent.toString&&h.attachEvent.toString().indexOf("[native code")<0||i?h.addEventListener("load",function(e){c(e,v)},!1):h.attachEvent("onreadystatechange",function(e){c(e,v)}),n.modules[d]=v}return p},r.prototype.getStyle=function(t,n){var r=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return r[r.getPropertyValue?"getPropertyValue":"getAttribute"](n)},r.prototype.link=function(e,r,o){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof r&&(o=r);var c=(o||e).replace(/\.|\//g,""),s=u.id="layuicss-"+c,p=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(s)||l.appendChild(u),"function"!=typeof r?i:(function f(){return++p>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(s),"width"))?function(){r()}():setTimeout(f,100))}(),i)},n.callback={},r.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},r.prototype.addcss=function(e,t,r){return layui.link(n.dir+"css/"+e,t,r)},r.prototype.img=function(e,t,n){var r=new Image;return r.src=e,r.complete?t(r):(r.onload=function(){r.onload=null,"function"==typeof t&&t(r)},void(r.onerror=function(e){r.onerror=null,"function"==typeof n&&n(e)}))},r.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},r.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),r.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},r.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},r.prototype.url=function(e){var t=this,n={pathname:function(){var t=e?function(){var t=(e.match(/\.[^.]+?\/.+/)||[])[0]||"";return t.replace(/^[^\/]+/,"").replace(/\?.+/,"")}():location.pathname;return t.replace(/^\//,"").split("/")}(),search:function(){var n={},r=(e?function(){var t=(e.match(/\?.+/)||[])[0]||"";return t.replace(/\#.+/,"")}():location.search).replace(/^\?+/,"").split("&");return t.each(r,function(e,t){var r=t.indexOf("="),o=function(){return r<0?t.substr(0,t.length):0!==r&&t.substr(0,r)}();o&&(n[o]=r>0?t.substr(r+1):null)}),n}(),hash:t.router(function(){return e?(e.match(/#.+/)||[])[0]||"":location.hash}())};return n},r.prototype.data=function(t,n,r){if(t=t||"layui",r=r||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete r[t];n="object"==typeof n?n:{key:n};try{var o=JSON.parse(r[t])}catch(a){var o={}}return"value"in n&&(o[n.key]=n.value),n.remove&&delete o[n.key],r[t]=JSON.stringify(o),n.key?o[n.key]:o}},r.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},r.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),r=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},o={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:r("micromessenger")};return t&&!o[t]&&(o[t]=r(t)),o.android=/android/.test(n),o.ios="ios"===o.os,o.mobile=!(!o.android&&!o.ios),o},r.prototype.hint=function(){return{error:a}},r.prototype.each=function(e,t){var n,r=this;if("function"!=typeof t)return r;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;na?1:o