diff --git a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml index b94984a..bd4fedb 100644 --- a/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml +++ b/.idea/dataSources/356b1cbb-8e8d-401f-bdfc-b3e917bc8301.xml @@ -1315,11 +1315,844 @@ utf8mb4 0 - - +
+ 管理员 +
+ + 公告 +
+ + 毕业设计 +
+ + 毕设论文 +
+ + 指导老师评定成绩 +
+ + 评阅老师对论文的评审成绩 +
+ + 毕业设计信息 +
+ + 开题报告 +
+ + 开题报告会纪要 +
+ + 答辩 +
+ + 答辩记录表 +
+ + 状态 +
+ + 开题报告秘书组 +
+ + 开题报告老师组 +
+ + 专业信息 +
+ + 答辩秘书小组 +
+ + 答辩教师组 +
+ + 学生用户 +
+ + 老师用户 +
+ 1 + char(20)|0s + 1 + normal + + + 2 + char(255)|0s + 1 + normal + + + 3 + char(30)|0s + normal + + + 4 + char(40)|0s + normal + + + 5 + char(20)|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + text|0s + normal + + + 3 + text|0s + normal + + + 4 + date|0s + normal + + + 5 + varchar(255)|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(20)|0s + normal + + + 3 + char(20)|0s + normal + + + 4 + varchar(255)|0s + normal + + + 5 + float|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + int(11)|0s + normal + + + 3 + date|0s + normal + + + 4 + varchar(255)|0s + normal + + + 5 + text|0s + normal + + + 6 + text|0s + normal + + + 7 + text|0s + normal + + + 8 + text|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + float|0s + normal + + + 3 + float|0s + normal + + + 4 + float|0s + normal + + + 5 + float|0s + normal + + + 6 + float|0s + normal + + + 7 + float|0s + normal + + + 8 + float|0s + normal + + + 9 + float|0s + normal + + + 10 + float|0s + normal + + + 11 + float|0s + normal + + + 12 + float|0s + normal + + + 13 + float|0s + normal + + + 14 + float|0s + normal + + + 15 + float|0s + normal + + + 16 + float|0s + normal + + + 17 + text|0s + normal + + + 18 + date|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + float|0s + normal + + + 3 + text|0s + normal + + + 4 + date|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + varchar(255)|0s + normal + + + 3 + varchar(255)|0s + normal + + + 4 + varchar(255)|0s + normal + + + 5 + varchar(255)|0s + normal + + + 6 + text|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + date|0s + normal + + + 3 + varchar(255)|0s + normal + + + 4 + varchar(255)|0s + normal + + + 5 + char(20)|0s + normal + + + 6 + char(20)|0s + normal + + + 7 int(11)|0s normal + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + text|0s + normal + + + 3 + date|0s + normal + + + 4 + text|0s + normal + + + 5 + date|0s + normal + + + 6 + text|0s + normal + + + 7 + date|0s + normal + + + 8 + text|0s + normal + + + 9 + date|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + date|0s + normal + + + 3 + varchar(255)|0s + normal + + + 4 + char(20)|0s + normal + + + 5 + char(20)|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + text|0s + normal + + + 3 + date|0s + normal + + + 4 + text|0s + normal + + + 5 + date|0s + normal + + + 6 + text|0s + normal + + + 7 + float|0s + normal + + + 8 + date|0s + normal + + + 9 + text|0s + normal + + + 10 + float|0s + normal + + + 11 + date|0s + normal + + + 12 + text|0s + normal + + + 13 + float|0s + normal + + + 14 + date|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(1)|0s + normal + + + 3 + char(1)|0s + normal + + + 4 + char(1)|0s + normal + + + 5 + char(1)|0s + normal + + + 6 + char(1)|0s + normal + + + 7 + char(1)|0s + normal + + + 8 + char(1)|0s + normal + + + 9 + char(1)|0s + normal + + + 10 + char(1)|0s + normal + + + 11 + char(1)|0s + normal + + + 12 + char(1)|0s + normal + + + 13 + char(1)|0s + normal + + + 14 + char(1)|0s + normal + + + 15 + char(1)|0s + normal + + + 16 + char(1)|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(20)|0s + normal + + + 3 + char(20)|0s + normal + + + 1 + leader_student_id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(20)|0s + normal + + + 3 + char(20)|0s + normal + + + 1 + leader_teacher_id + 1 + + + 1 + char(8)|0s + 1 + normal + + + 2 + varchar(255)|0s + normal + + + 3 + varchar(255)|0s + normal + + + 4 + varchar(255)|0s + normal + + + 1 + profession_code + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(20)|0s + normal + + + 3 + char(20)|0s + normal + + + 1 + leader_student_id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(20)|0s + normal + + + 3 + char(20)|0s + normal + + + 1 + leader_teacher_id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(255)|0s + 1 + normal + + + 3 + char(30)|0s + normal + + + 4 + char(40)|0s + normal + + + 5 + char(20)|0s + normal + + + 6 + char(8)|0s + normal + + + 7 + char(4)|0s + normal + + + 1 + id + 1 + + + 1 + char(20)|0s + 1 + normal + + + 2 + char(255)|0s + 1 + normal + + + 3 + char(30)|0s + normal + + + 4 + char(40)|0s + normal + + + 5 + char(20)|0s + normal + + + 6 + char(8)|0s + normal + + + 7 + varchar(255)|0s + normal + + + 8 + varchar(255)|0s + normal + + + 1 + id + 1 + \ No newline at end of file diff --git a/deployment/init.sql b/deployment/init.sql deleted file mode 100644 index e379d84..0000000 --- a/deployment/init.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE DATABASE `GDMS`; \ No newline at end of file diff --git a/documents/bys中期报告5.pptx b/documents/bys中期报告5.pptx index 00e19db..a422911 100644 Binary files a/documents/bys中期报告5.pptx and b/documents/bys中期报告5.pptx differ diff --git a/src/core/operation/Delete.java b/src/core/operation/Delete.java new file mode 100644 index 0000000..c9a78c5 --- /dev/null +++ b/src/core/operation/Delete.java @@ -0,0 +1,15 @@ +package core.operation; + +import core.user.User; +import dao.DBManagement; +import error.GExcptSQL; + +public class Delete extends Operation { + @Override + public void execute(User subject) throws GExcptSQL { + String id = (String)options.get("id"); + String sql = "DELETE FROM graduation_design WHERE id = \'"+ + id+"\'"; + DBManagement.update(sql); + } +} diff --git a/src/core/operation/Delete.json b/src/core/operation/Delete.json new file mode 100644 index 0000000..183384f --- /dev/null +++ b/src/core/operation/Delete.json @@ -0,0 +1,3 @@ +{ + "id": "java.lang.String" +} \ No newline at end of file diff --git a/src/core/operation/DownloadFile.java b/src/core/operation/DownloadFile.java new file mode 100644 index 0000000..1154c74 --- /dev/null +++ b/src/core/operation/DownloadFile.java @@ -0,0 +1,4 @@ +package core.operation; + +public class DownloadFile { +} diff --git a/src/core/operation/FillInformation.java b/src/core/operation/FillInformation.java new file mode 100644 index 0000000..4c954b2 --- /dev/null +++ b/src/core/operation/FillInformation.java @@ -0,0 +1,4 @@ +package core.operation; + +public class FillInformation { +} diff --git a/src/core/operation/Operation.java b/src/core/operation/Operation.java index 195dbfa..7c7971f 100644 --- a/src/core/operation/Operation.java +++ b/src/core/operation/Operation.java @@ -9,8 +9,8 @@ import java.util.Map; public abstract class Operation { - private Map options; - private User subject; + protected Map options; + protected User subject; Operation(){ super(); } @@ -38,6 +38,6 @@ public abstract class Operation { } this.options.put(key,value); } - public abstract void execute(User subject) throws GExcptSQL; + public abstract void execute(User subject) throws Exception; } diff --git a/src/core/operation/Search.java b/src/core/operation/Search.java new file mode 100644 index 0000000..5176b57 --- /dev/null +++ b/src/core/operation/Search.java @@ -0,0 +1,22 @@ +package core.operation; + +import core.user.User; +import dao.DBManagement; + +import java.sql.ResultSet; + +public class Search extends Operation { + @Override + public void execute(User subject) throws Exception { + String table = (String)options.get("table"); + String field = (String)options.get("field"); + String value = (String)options.get("value"); + int start = (int)options.get("start"); + int end = (int)options.get("end"); + String sql = "SELECT * FROM "+table+ + " WHERE "+field+" = \'"+value+"\'"+ + " limit "+start+", "+end; + ResultSet rs = DBManagement.query(sql); + //todo + } +} diff --git a/src/core/operation/Search.json b/src/core/operation/Search.json new file mode 100644 index 0000000..38d8115 --- /dev/null +++ b/src/core/operation/Search.json @@ -0,0 +1,8 @@ +{ + "table": "java.lang.String", + "field": "java.lang.String", + "value": "java.lang.String", + "start": "int", + "end": "int", + "return": "java.lang.String[][]" +} \ No newline at end of file diff --git a/src/core/operation/Select.java b/src/core/operation/Select.java index 3ea81dd..f58ea03 100644 --- a/src/core/operation/Select.java +++ b/src/core/operation/Select.java @@ -8,11 +8,15 @@ import java.util.Map; public class Select extends Operation { - private Map options; - private User subject; @Override public void execute(User subject) throws GExcptSQL { - this.setSubject(subject); - DBManagement.update("update stu "); + String student_id = (String)options.get("student_id"); + String teacher_id = (String)options.get("teacher_id"); + String id = student_id; + String sql = "INSERT INTO graduation_design VALUES (\'"+ + id+"\', "+ + student_id+"\', "+ + teacher_id+"\', \'m\', \'m\')"; + DBManagement.update(sql); } } diff --git a/src/core/operation/Select.json b/src/core/operation/Select.json new file mode 100644 index 0000000..6b2332b --- /dev/null +++ b/src/core/operation/Select.json @@ -0,0 +1,4 @@ +{ + "student_id": "java.lang.String", + "teacher_id": "java.lang.String" +} \ No newline at end of file diff --git a/src/core/process/Process.java b/src/core/process/Process.java index b4a597b..bcdf14f 100644 --- a/src/core/process/Process.java +++ b/src/core/process/Process.java @@ -5,14 +5,19 @@ import core.user.User; import error.GExcptFactory; import error.GExcptSQL; -public abstract class Process { - - private String permission;//权限 - private Operation operation;//操作 - private String buttonName;//按键 - private String info;//信息 - private String processOptions;//进程操作 +public abstract class Process implements Cloneable{ + private String permission; + private Operation operation; + private String buttonName; + private String info; + private String processOptions; + private String UserOptions; + @Override + public Process clone(){ + //todo + return null; + } public Process(String permission, String operationName, String processOptions, String info) throws Exception { super(); this.setPermission(permission); diff --git a/src/core/process/ProcessManagement.java b/src/core/process/ProcessManagement.java index 7223a47..aafefa0 100644 --- a/src/core/process/ProcessManagement.java +++ b/src/core/process/ProcessManagement.java @@ -12,7 +12,7 @@ public class ProcessManagement { //todo } public Process getTemporaryProcess(int index){ - return temporaryProcesses.get(index); + return temporaryProcesses.get(index).clone(); } public Condition getCondition(String userType, List index){ Condition condition = new Condition(this.lastProcesses.get(userType)); diff --git a/src/core/user/Administrator.java b/src/core/user/Administrator.java index 3901895..49af1c0 100644 --- a/src/core/user/Administrator.java +++ b/src/core/user/Administrator.java @@ -1,4 +1,4 @@ package core.user; -public class Administrator { +public class Administrator extends User { } diff --git a/src/core/user/User.java b/src/core/user/User.java index 8048293..5c34eb0 100644 --- a/src/core/user/User.java +++ b/src/core/user/User.java @@ -10,8 +10,60 @@ public abstract class User implements AccountManageable, ProcessConfigurable{ private String id; private String password; - private List permissions = null; + private String name; + private String e_mail_location; + private String phone_number; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getE_mail_location() { + return e_mail_location; + } + + public void setE_mail_location(String e_mail_location) { + this.e_mail_location = e_mail_location; + } + + public String getPhone_number() { + return phone_number; + } + + public void setPhone_number(String phone_number) { + this.phone_number = phone_number; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + private String phonenumber; + private List permissions = null; public Condition getCondition() { return condition; } diff --git a/src/core/user/utils/AccountManagement.java b/src/core/user/utils/AccountManagement.java index 8c8df7a..7246b15 100644 --- a/src/core/user/utils/AccountManagement.java +++ b/src/core/user/utils/AccountManagement.java @@ -1,17 +1,65 @@ package core.user.utils; import core.user.User; +import dao.DBManagement; +import error.GExcptAccount; +import error.GExcptSQL; +import utils.Utils; +import java.lang.reflect.InvocationTargetException; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; import java.util.List; public interface AccountManagement { - static User login(String id, String password){ - //todo + static String[] userTables = { + "administrator", + "student", + "teacher" + }; + static User login(String id, String password) throws GExcptSQL, GExcptAccount, SQLException { + ResultSet rs = null; + String sql = null; + String userType = null; + for(String userTable:userTables){ + sql = "SELECT * FROM "+userTable+" WHERE id=\'"+id+"\'"; + try { + rs = DBManagement.query(sql); + } catch (Exception e) { + throw new GExcptSQL("QUERY\n\t"+sql+"\nfailure"); + } + if(rs!=null){ + userType = userTable; + break; + } + } + if(rs==null){ + throw new GExcptAccount("id "+id+"don't exists"); + } + rs.next(); + try { + if(!rs.getString(2).equals(password)) + throw new GExcptAccount("password wrong"); + List necessaryInfo = new ArrayList<>(); + for(int i=0;i<4;i++){ + necessaryInfo.add(rs.getString(i)); + } + return createUser(userType,necessaryInfo); + } catch (SQLException e) { + e.printStackTrace(); + } return null; } - static User register(List necessaryInfo, String User){ - //todo - return null; + static User register(String userType, List necessaryInfo) throws GExcptSQL { + necessaryInfo = Utils.formatUserInfo(userType,necessaryInfo); + String sql = "INSERT INTO "+userType+" VALUES(\'"; + for(String info:necessaryInfo){ + sql+=info+"\', \'"; + } + sql =sql.substring(0,sql.length()-3)+")"; + DBManagement.update(sql); + return createUser(userType, necessaryInfo); } static void logout(User user){ //todo @@ -19,4 +67,28 @@ public interface AccountManagement { static void destroy(User user){ //todo } + static User getUser(String userType){ + try { + return (User) Class.forName("core.user."+ Utils.toUpperFirstChar(userType)).getDeclaredConstructor().newInstance(); + } catch (InstantiationException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + return null; + } + static User createUser(String userType, List necessaryInfo) { + User user = getUser(userType); + user.setId(necessaryInfo.get(0)); + user.setName(necessaryInfo.get(1)); + user.setE_mail_location(necessaryInfo.get(2)); + user.setPhone_number(necessaryInfo.get(3)); + return user; + } } diff --git a/src/dao/DBManagement.java b/src/dao/DBManagement.java index 685c654..c31829e 100644 --- a/src/dao/DBManagement.java +++ b/src/dao/DBManagement.java @@ -50,6 +50,7 @@ public class DBManagement { con = DBManagement.getConnection(); Statement stmt = con.createStatement(); rs = stmt.executeQuery(sql); + System.out.println(rs); } catch (SQLException e) { throw new GExcptSQL("Connect Failure"); }finally { diff --git a/src/error/GExcptAccount.java b/src/error/GExcptAccount.java new file mode 100644 index 0000000..bef9348 --- /dev/null +++ b/src/error/GExcptAccount.java @@ -0,0 +1,8 @@ +package error; + +public class GExcptAccount extends GExcpt{ + + public GExcptAccount(String info) { + super(info); + } +} diff --git a/src/gdms/test.java b/src/gdms/test.java deleted file mode 100644 index 615ee8d..0000000 --- a/src/gdms/test.java +++ /dev/null @@ -1,49 +0,0 @@ -package gdms; -import core.user.Student; -import core.user.User; -import dao.DBManagement; -import org.apache.tomcat.jdbc.pool.DataSource; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import java.lang.reflect.InvocationTargetException; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class test { - public test(){ - Connection con = null; - try{ - con = DBManagement.getConnection(); - Statement stmt = con.createStatement(); //创建Statement对象 - System.out.print("成功连接到数据库!"); - String sql = "select * from test"; - ResultSet rs = stmt.executeQuery(sql); - rs.next(); - System.out.println(rs.getString("name")); - rs.close(); - stmt.close(); - con.close(); - }catch (Exception e){ - e.printStackTrace(); - }finally { - if(con!=null) { - try { - con.close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - - } - public static void main(String argc[]) throws NamingException, SQLException { - new test(); - } -} diff --git a/src/init/Init.java b/src/init/Init.java index 3d42bad..8654112 100644 --- a/src/init/Init.java +++ b/src/init/Init.java @@ -1,7 +1,8 @@ package init; +import core.user.utils.AccountManagement; import dao.DBManagement; -import gdms.test; +import error.GExcptSQL; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; @@ -9,12 +10,13 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; @WebServlet(name = "Init") public class Init extends HttpServlet { public void init(){ DBManagement.init(); - new test(); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/src/servlet/account/login.java b/src/servlet/account/login.java new file mode 100644 index 0000000..ef1e238 --- /dev/null +++ b/src/servlet/account/login.java @@ -0,0 +1,40 @@ +package servlet.account; + +import java.io.IOException; +import java.sql.SQLException; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import core.user.Student; +import core.user.User; +import core.user.utils.AccountManagement; +import error.GExcptAccount; +import error.GExcptSQL; + +@WebServlet("/login") +public class login extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String id=request.getParameter("id"); + String password=request.getParameter("password"); + User user = null; + try { + user = AccountManagement.login(id,password); + } catch (GExcptSQL | SQLException gExcptSQL) { + gExcptSQL.printStackTrace(); + } catch (GExcptAccount gExcptAccount) { + gExcptAccount.printStackTrace(); + } + request.getSession().setAttribute("User",user); + request.getRequestDispatcher("/home.jsp").forward(request,response); + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } +} diff --git a/src/servlet/account/service.java b/src/servlet/account/service.java new file mode 100644 index 0000000..0f6cadf --- /dev/null +++ b/src/servlet/account/service.java @@ -0,0 +1,23 @@ +package servlet.account; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@WebServlet( "/service") +public class service extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + System.out.print(request.getParameter("id")); + + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + } +} diff --git a/src/utils/Utils.java b/src/utils/Utils.java new file mode 100644 index 0000000..a1c7c56 --- /dev/null +++ b/src/utils/Utils.java @@ -0,0 +1,28 @@ +package utils; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public interface Utils { + public static Map userAttrNum =new HashMap<>() + + { + { + userAttrNum.put("administrator",5); + userAttrNum.put("student",7); + userAttrNum.put("teacher",8); + } + }; + public static String toUpperFirstChar(String string) { + char[] charArray = string.toCharArray(); + charArray[0] -= 32; + return String.valueOf(charArray); + } + public static List formatUserInfo(String userType, List userInfo){ + for(int i=0;idefault *.js + + default + *.png + \ No newline at end of file diff --git a/web/cssFile/home.css b/web/cssFile/home.css new file mode 100644 index 0000000..83c988e --- /dev/null +++ b/web/cssFile/home.css @@ -0,0 +1,234 @@ +body{ + margin: 0px; + padding: 0px; + background-color: #efefef; + width: 100%; + height: 100%; +} +a{ + text-decoration: none; +} +ul{ + margin: 0; + padding: 0; +} +.main{ + position: relative; + height: 100%; +} +.top-bar{ + width: 100%; + height: 55px; + position: relative; + background-color: #c13139; + z-index: 100; + box-shadow: 5px 0px 10px rgba(0,0,0,0.47); +} +.top-center-bar{ + position: relative; + height: 100%; + width: 1100px; + background-color: #c6333e; + box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.42); + margin: 0px auto; +} +.back-home{ + background-color: white; + height:60px; + border-radius: 0px 0px 5px 5px; + width: 60px; + position: absolute; + left: 200px; + color: #c6333e; + font-size: 20px; + text-align: center; + font-weight: normal; + line-height: 60px; + top: 0px; + box-shadow: 5px 0px 8px rgba(0, 0, 0, 0.3); + cursor: pointer; + transition: all 0.3s; +} +.back-home:hover{ + line-height: 70px; + height:70px; +} +.opt-options{ + visibility: hidden; + width: 100px; + height: 65px; + background-color: white; + position: absolute; + top: 55px; + right: -20px; + border: 1px solid rgba(0, 0, 0, 0.07); + border-radius: 0px 0px 5px 5px; + box-shadow: 5px 2px 8px rgba(0, 0, 0, 0.29); +} +.top-center-bar .logo{ + position: absolute; + margin: auto 20px; + top: 15px; + color: white; + font-weight: bolder; + font-size: 20px; + +} +.back-home a{ + color: #c6333e; +} +.opt:hover .opt-options{ + visibility: visible; + padding: 20px 0px 0px 0px; +} +.personal-opt{ + height: 100%; + width: 120px; + position: absolute; + right: 0px; +} + +.personal-opt .head-img{ + float: left; + margin: 2px; + width: 45px; + height: 45px; +border-radius: 50%; + border: 3px solid white; +} +.opt .img{ + display: block; + width: 35px; + height: 35px; + margin: 10px 10px 10px 10px; +} +.opt-options div{ + + width: 100%; + height: 30px; + text-align: center; + line-height: 20px; +} +.opt-options div a{ + color: rgba(0, 0, 0, 0.88); +} +.opt-options div:hover{ + background-color: rgba(0, 0, 0, 0.21); +} +.personal-opt .opt{ +width: 35px; + height: 100%; + width: 55px; + cursor: pointer; + float: left; + border-radius: 5px; +} +.personal-opt .opt:hover{ + background-color: rgba(255, 255, 255, 0.18); +} +.nav-bar{ + top: 20px; + border-radius: 10px; + position: absolute; + left: 5px; + width: 100px; + height: 800px; + background-color: #251d20; +} +.nav-bar .a-process{ + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 10px; + width:80px; + height: 80px; + margin: 10px 8px; + float: top; + background-color: rgba(255, 255, 255, 0.09); + transition: all 0.5s; +} +.nav-bar .a-process:hover{ + background-color: rgba(255, 255, 255, 0.3); +} +.point-bar{ + width: 10px; + position: absolute; + left: 100px; + height: 60px; + top: 21px; + border-radius: 0px 5px 5px 0px; + background-color: #cf4240; + transition: all 0.4s; + visibility: hidden; +} +.main2{ + z-index: 2; + position: relative; + width: 1100px; + height: 1100px; + margin: 0px auto; + background-color: white; +} +.link-point{ + display: block; + width: 100%; + height: 100%; + +} +.a-process .link-point .a-process-decoration +{ + width: 60px; + height: 60px; + margin: 0px 10px; +} +.link-point div img{ + display: block; + width: 100%; + height: 100%; +} +.nav-info{ + color: white; + text-align: center; + font-size: 12px; +} +.update-frame{ + width: 990px; + height: 1100px; + position: relative; + left: 110px; +} +.scroll-ads{ + height: 300px; + width: 900px; + background-color: black; + position: absolute; + margin: 20px 45px; + border-radius: 10px; + overflow: hidden; +} +.scroll-ads .scroll-ads-imgs .scroll-child{ + display: inline-block; + width: 100%; + height: 100%; + transition: all 0.4s; +} +.scroll-ads .scroll-ads-imgs{ + width: 100%; + height: 100%; + transition: all 0.4s; + white-space: nowrap; + font-size: 0; +} +.scroll-ads .scroll-ads-imgs .scroll-child a img{ + width: 100%; + height: 100%; + position: relative; +} +.ads-text{ + position: relative; + width: 100px; + height: 20px; + left: 50px; + bottom: 50px; + z-index: 10; + font-size: 20px; + color: white; +} \ No newline at end of file diff --git a/web/cssFile/images/change.jpg b/web/cssFile/images/change.jpg new file mode 100644 index 0000000..d742ed5 Binary files /dev/null and b/web/cssFile/images/change.jpg differ diff --git a/web/cssFile/images/change2.jpg b/web/cssFile/images/change2.jpg new file mode 100644 index 0000000..d01126e Binary files /dev/null and b/web/cssFile/images/change2.jpg differ diff --git a/web/cssFile/images/change3.jpg b/web/cssFile/images/change3.jpg new file mode 100644 index 0000000..396f5a0 Binary files /dev/null and b/web/cssFile/images/change3.jpg differ diff --git a/web/cssFile/images/download.png b/web/cssFile/images/download.png new file mode 100644 index 0000000..de178ef Binary files /dev/null and b/web/cssFile/images/download.png differ diff --git a/web/webPage/cssFile/images/login-img1.jpg b/web/cssFile/images/login-img1.jpg similarity index 100% rename from web/webPage/cssFile/images/login-img1.jpg rename to web/cssFile/images/login-img1.jpg diff --git a/web/webPage/cssFile/images/login-img2.jpg b/web/cssFile/images/login-img2.jpg similarity index 100% rename from web/webPage/cssFile/images/login-img2.jpg rename to web/cssFile/images/login-img2.jpg diff --git a/web/cssFile/images/man.png b/web/cssFile/images/man.png new file mode 100644 index 0000000..70d5b21 Binary files /dev/null and b/web/cssFile/images/man.png differ diff --git a/web/cssFile/images/opt.jpg b/web/cssFile/images/opt.jpg new file mode 100644 index 0000000..34d6c03 Binary files /dev/null and b/web/cssFile/images/opt.jpg differ diff --git a/web/cssFile/images/opt.png b/web/cssFile/images/opt.png new file mode 100644 index 0000000..ee92156 Binary files /dev/null and b/web/cssFile/images/opt.png differ diff --git a/web/cssFile/images/opt.sai2 b/web/cssFile/images/opt.sai2 new file mode 100644 index 0000000..1367657 Binary files /dev/null and b/web/cssFile/images/opt.sai2 differ diff --git a/web/webPage/cssFile/login-style.css b/web/cssFile/login-style.css similarity index 84% rename from web/webPage/cssFile/login-style.css rename to web/cssFile/login-style.css index 880ff00..bdf4ad7 100644 --- a/web/webPage/cssFile/login-style.css +++ b/web/cssFile/login-style.css @@ -46,7 +46,7 @@ body{ height: 40px; border-radius: 5px; left: 29px; - border:1px solid rgba(0, 0, 0, 0.37);; + border:1px solid rgba(0, 0, 0, 0.37); } .login-cont .input-text:hover{ background-color: #e3e3e3; @@ -94,7 +94,6 @@ body{ } .register-submit-style{ position: absolute; - top: 280px; width: 300px; height: 40px; border-radius: 5px; @@ -114,14 +113,17 @@ body{ .register-input-text.e-mail-text{ top:190px; } +.register-input-text.phone-number{ + top:255px; +} .register-input-text.password-text{ - top: 255px; + top: 320px; } .register-input-text.check-password-text{ - top:320px; + top:385px; } .register-submit-style{ - top: 395px; + top: 440px; } .register-input-text:hover{ background-color: #e7e0ea; @@ -161,4 +163,27 @@ body{ } .to-login{ display: none; +} +.logo2{ + position: absolute; + left: 140px; + top: 20px; + width: 120px; + height: 40px; + color: white; + background-color: #dc514a; + border-radius: 12px; + border: 1px solid rgba(0, 0, 0, 0.1); + font-size: 20px; + font-weight: bolder; + line-height: 40px; + text-align: center; +} +.main{ +} +.bottom-bar{ + background-color: #f7edda; + border: 1px solid rgba(0, 0, 0, 0.16); + height: 40px; + width: 100%; } \ No newline at end of file diff --git a/web/cssFile/personal.css b/web/cssFile/personal.css new file mode 100644 index 0000000..3ded13e --- /dev/null +++ b/web/cssFile/personal.css @@ -0,0 +1,96 @@ +.updated{ + width: 100%; + height: 100%; +} +.personal-choose{ + position: absolute; + top: 50px; + left: 15px; +} +.personal-choose .nav-personal-choose{ + margin: 0px; +} +.nav-personal-choose .choose-child{ + transition: all 0.3s; + list-style: none; + border-radius: 5px 5px 0px 0px; + margin: 10px 0px; + color: rgba(0, 0, 0, 0.93); + width: 120px; + height: 30px; + border-bottom: 1px solid rgb(198, 68, 66); + font-size: 15px; + text-align: center; + line-height: 30px; + cursor: pointer; +} +.nav-personal-choose .choose-child:hover{ + background-color: #e24f46; + border-radius: 5px; + border-bottom: 1px solid rgba(198, 68, 66, 0); + color: white; + +} +.personal-msg-frame{ + position: absolute; + top: 70px; + left: 250px; + width: 600px; +} +.personal-msg-frame .personal-msg-part{ + width: 550px; + height: 50px; + margin: 30px 0px; + border-bottom: 1px solid rgba(0, 0, 0, 0.54); +} +.personal-msg-frame .personal-msg-part .part-name{ + width: 80px; + text-align: left; + line-height: 35px; + color: rgba(0, 0, 0, 0.78); + float: left; + height: 100%; + font-size: 20px; +} +.personal-msg-frame .personal-msg-part .part-cont{ + width: 450px; + height: 100%; + float: left; + text-align: left; + line-height: 35px; + font-size: 15px; +} +.updated .change-pw-frame{ + display: none; + position: absolute; + top: 70px; + left: 250px; + width: 600px; +} +.change-pw-frame .pw-input-style{ + padding: 0px 0px 0px 20px; + margin: 20px 100px; + width:340px; + height: 40px; + border-radius: 5px; + left: 29px; + border:1px solid rgba(0, 0, 0, 0.37); +} +.change-pw-frame .pw-input-style:hover{ + background-color: #f0f0f0; +} +.change-pw-frame .sm-input-style{ + margin: 20px 120px; + top: 280px; + width: 300px; + height: 40px; + border-radius: 5px; + left: 49px; + border: 1px solid rgba(0, 0, 0, 0.2); + background-color: #65b0ff; + color: white; + font-size: 20px; +} +.change-pw-frame .sm-input-style:hover{ + background-color: #517fff; +} \ No newline at end of file diff --git a/web/home.jsp b/web/home.jsp new file mode 100644 index 0000000..61bec0b --- /dev/null +++ b/web/home.jsp @@ -0,0 +1,100 @@ +<%-- + Created by IntelliJ IDEA. + User: lenovo + Date: 2019/1/9 + Time: 20:32 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 毕业设计管理系统 + + + + + + + + +
+
+
+ + +
+
+ +
+ +
+
+ +
+ +
+ + + diff --git a/web/jsFile/home-update.js b/web/jsFile/home-update.js new file mode 100644 index 0000000..4484f60 --- /dev/null +++ b/web/jsFile/home-update.js @@ -0,0 +1,9 @@ +$(document).ready(function () { + $('.link-point').on('click',upadateFrame); +}) +function upadateFrame(e) { + e.preventDefault(); + var updateUrl=$(this).attr('href'); + $('.update-frame').load(updateUrl+' .updated'); + history.pushState(null,null,updateUrl); +} diff --git a/web/jsFile/homeActive.js b/web/jsFile/homeActive.js new file mode 100644 index 0000000..d64f4fa --- /dev/null +++ b/web/jsFile/homeActive.js @@ -0,0 +1,34 @@ +$(document).ready(function () { + $('.a-process').on('click',moveBar); + $('.update-to-perm').on('click',upadateFrame); +}) +function moveBar() { + var distanse=21+($(this).index()-1)*91; + $('.point-bar').css({'top':distanse.toString()+'px','visibility':'visible'}); +} +function scrollAds() { + var scrolling=document.getElementsByClassName('scroll-ads-imgs').item(0); + if(scrolling.style.transform=="translateX(0%)") + { + $('.scroll-ads-imgs').css('transition','0.4s'); + scrolling.style.transform='translateX(-100%)'; + + } + else if(scrolling.style.transform=="translateX(-100%)") + { + scrolling.style.transform='translateX(-200%)'; + + + } + else if(scrolling.style.transform=="translateX(-200%)") + { + scrolling.style.transform='translateX(-300%)'; + } + else if(scrolling.style.transform=="translateX(-300%)") + { + $('.scroll-ads-imgs').css('transition','none'); + scrolling.style.transform='translateX(0%)'; + window.setTimeout('scrollAds()',200); + } +} +window.setInterval('scrollAds()',3000); diff --git a/web/webPage/jsFile/jquery-3.3.1.js b/web/jsFile/jquery-3.3.1.js similarity index 100% rename from web/webPage/jsFile/jquery-3.3.1.js rename to web/jsFile/jquery-3.3.1.js diff --git a/web/jsFile/login.js b/web/jsFile/login.js new file mode 100644 index 0000000..38bf8f2 --- /dev/null +++ b/web/jsFile/login.js @@ -0,0 +1,55 @@ + +function showRegister() { + $('.register-cont').css('display','block'); + $('.login-cont').css('display','none'); + $('.to-register').css( 'display','none'); + $('.to-login').css( 'display','block'); +} +function showlogin() { + $('.register-cont').css('display','none'); + $('.login-cont').css('display','block'); + $('.to-register').css( 'display','block'); + $('.to-login').css( 'display','none'); +} +function isEmpty(e) +{ + + $('.input-text').each(function () { + if($(this).val().length<=0) + { + e.preventDefault(); + alert($(this).attr('name')+'不能为空'); + return false; + } + }) + +} +function isEmpty2(e) +{ + var isem=false; + $('.register-input-text').each(function () { + if($(this).val().length<=0) + { + e.preventDefault(); + alert($(this).attr('name')+'不能为空'); + isem=true; + return false; + } + } + ) + if($('.register-input-text').eq(4).val()!=$('.register-input-text').eq(5) + .val()&&!isem) + { + e.preventDefault(); + alert('两次密码不同'); + return false; + } +} +$(document).ready( + function () { + $('.to-register').on('click', showRegister); + $('.to-login').on('click', showlogin); + $('.submit-style').on('click',isEmpty); + $('.register-submit-style').on('click',isEmpty2); + }) + diff --git a/web/jsFile/personal.js b/web/jsFile/personal.js new file mode 100644 index 0000000..bc6e2e8 --- /dev/null +++ b/web/jsFile/personal.js @@ -0,0 +1,43 @@ +$(document).ready(function () { + $(document).off('click').on('click','.choose-child',pChange); + $(document).off('click',showpm).on('click','.pm',showpm); + $(document).off('click',showpw).on('click','.pw',showpw); + $('.sm-input-style').off('click').on('click',isEmpty); +}) +function pChange(){ + $('.choose-child').each(function () { + $(this).css({'background-color':'','color':'','border-radius': + ''}); + }) + $(this).css({'background-color':' #e24f46','color':'white','border-radius': + '5px'}); +} +function showpm() { + $('.personal-msg-frame').css('display','block'); + $('.change-pw-frame').css('display','none'); +} +function showpw() { + $('.personal-msg-frame').css('display','none'); + $('.change-pw-frame').css('display','block'); +} +function isEmpty(e) +{ + var isem=false; + $('.pw-input-style').each(function () { + if($(this).val().length<=0) + { + e.preventDefault(); + alert($(this).attr('name')+'不能为空'); + isem=true; + return false; + } + } + ) + if($('.pw-input-style').eq(1).val()!=$('.pw-input-style').eq(2) + .val()&&!isem) + { + e.preventDefault(); + alert('两次密码不同'); + return false; + } +} \ No newline at end of file diff --git a/web/webPage/Login.jsp b/web/login.jsp similarity index 84% rename from web/webPage/Login.jsp rename to web/login.jsp index bd5e5cb..232ca95 100644 --- a/web/webPage/Login.jsp +++ b/web/login.jsp @@ -24,8 +24,9 @@ + + @@ -38,20 +39,24 @@
+ - + - +
+
diff --git a/web/personal-setting.jsp b/web/personal-setting.jsp new file mode 100644 index 0000000..fc07a3a --- /dev/null +++ b/web/personal-setting.jsp @@ -0,0 +1,56 @@ +<%-- + Created by IntelliJ IDEA. + User: lenovo + Date: 2019/1/9 + Time: 23:33 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + + + 个人信息 + + +
+ +
+
+ +
+
+
+
姓名
+
+
+
id
+
+
+
邮箱
+
+
+
电话号码
+
+
+
+
+ + + + +
+
+ +
+
+ + + diff --git a/web/server.jsp b/web/server.jsp deleted file mode 100644 index 361f85e..0000000 --- a/web/server.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%-- - Created by IntelliJ IDEA. - User: lenovo - Date: 2019/1/9 - Time: 12:11 - To change this template use File | Settings | File Templates. ---%> -<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.Date" %> - - - Title - - -<%!Date date =new Date();%> -
时间是:<%=date%>
- - diff --git a/web/test5.js b/web/test5.js deleted file mode 100644 index 49b728b..0000000 --- a/web/test5.js +++ /dev/null @@ -1,7 +0,0 @@ -function test6() { - $('.tes').load('server.jsp .testp'); - -} -$(document).ready(function () { - window.setInterval('test6()',1000); -}); \ No newline at end of file diff --git a/web/updateT.js b/web/updateT.js deleted file mode 100644 index b118fde..0000000 --- a/web/updateT.js +++ /dev/null @@ -1,7 +0,0 @@ -function showtime() { - var tim=new Date(); - $('.tes2').html(tim); -} -$(document).ready(function () { - window.setInterval('showtime()',1000); -}) \ No newline at end of file