From 3fdf17eb7e5b513de398598bada723b26dfad893 Mon Sep 17 00:00:00 2001 From: Chenx221 Date: Mon, 12 Jun 2023 20:11:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=88=90=E7=BB=A9=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=A1=B5=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Chenx221 --- .../chenx221/controller/ScoreController.class | Bin 1458 -> 2032 bytes .../WEB-INF/views/dashboard.jsp | 2 +- .../WEB-INF/views/scoreopv2.jsp | 446 ++++++++++++++++++ .../resources/js/range-limit.js | 12 + project2/project2.sql | 2 +- .../chenx221/controller/ScoreController.java | 19 + project2/web/WEB-INF/views/dashboard.jsp | 2 +- project2/web/WEB-INF/views/scoreopv2.jsp | 446 ++++++++++++++++++ project2/web/resources/js/range-limit.js | 12 + 9 files changed, 938 insertions(+), 3 deletions(-) create mode 100644 project2/out/artifacts/project2_war_exploded/WEB-INF/views/scoreopv2.jsp create mode 100644 project2/out/artifacts/project2_war_exploded/resources/js/range-limit.js create mode 100644 project2/web/WEB-INF/views/scoreopv2.jsp create mode 100644 project2/web/resources/js/range-limit.js diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/ScoreController.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/ScoreController.class index 1bf41839beb66ec14a0cec5df1c90e65ca9532f2..638701c5e07a18517b3f20956ceae8ed49eeb04d 100644 GIT binary patch delta 719 zcmZuu+int36kUfIg#tn)ijpE$A8fgdw9uPH)Y?|9N@6sj(LRlEN+y9BoeQr#_yZ>M z8NPT+jW+So2S35D=m!|%njxh=_;6;gv-e(W?{(&5;wT;e`RChr08O+$#3PaA80G|0 zj@Ri($7%8CJsCq$ASrFzvL~6cz?9RmY-zn3);=X8Lm?Xe8)a`g*^};$xo@?s?yx4% z_IE`g`pmTrv)Ay2Qm@CW2FrtS`RY^8bd7;*8;=2SUQCYBGCM|>df|aHm4A9 z&O=2OQ@DUCZ&`K#aV%hwF+d3<$*mEeW~?&`EMYlRI#QdXKq*UYV1~VUq;Uy3Tt*SI zq2g>fr7}^hUuOH@fs~dxms7tYt6*2l zbslHAdmd%JRFi*WiY*-~gP40}$dj zy&#?Hs!F|jbu4Yd;BemUftb&AVC~<+ej77NwwYy8@P0#!!Q%nTW3u-eUu~g9GWyG8 zsgS2iM_o+>1a#>sr&UNnyOC;Nxvy*(Fm$G-AOEDLn%rFVk w6VGylw7BL)o>%Q&VNTR@ytzw7&EFN{C1%A$%v6l!!%ZuyX6olD;X5S$2QvK`DgXcg diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/dashboard.jsp b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/dashboard.jsp index 014f011..0cc29af 100644 --- a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/dashboard.jsp +++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/dashboard.jsp @@ -49,7 +49,7 @@
  • 成绩查看
  • -
  • 成绩管理
  • +
  • 成绩管理
  • 学生成绩管理
  • diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/scoreopv2.jsp b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/scoreopv2.jsp new file mode 100644 index 0000000..0107679 --- /dev/null +++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/scoreopv2.jsp @@ -0,0 +1,446 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> + + + + + + + + 成绩信息修改v2 + + + + + + + + + + + +
    + +
    + + + + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    成绩ID学号学生姓名课程ID课程名成绩
    ${score.scoreID}${score.student.id}${score.student.name}${score.course.courseID}${score.course.courseName}${score.score}
    +
    +
    +
    + + + +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    + + + + +
    + + + + +
    +
    + + + + + + + + + \ No newline at end of file diff --git a/project2/out/artifacts/project2_war_exploded/resources/js/range-limit.js b/project2/out/artifacts/project2_war_exploded/resources/js/range-limit.js new file mode 100644 index 0000000..9fef4f2 --- /dev/null +++ b/project2/out/artifacts/project2_war_exploded/resources/js/range-limit.js @@ -0,0 +1,12 @@ +const input_min = document.querySelector("#customRange1") +const input_max = document.querySelector("#customRange2") +const value_min = document.querySelector("#score_min_value") +const value_max = document.querySelector("#score_max_value") +input_min.addEventListener("input", (event) => { + value_min.textContent = event.target.value + input_max.setAttribute("min", event.target.value) +}) +input_max.addEventListener("input", (event) => { + value_max.textContent = event.target.value + input_min.setAttribute("max", event.target.value) +}) \ No newline at end of file diff --git a/project2/project2.sql b/project2/project2.sql index d854a00..8ae3820 100644 --- a/project2/project2.sql +++ b/project2/project2.sql @@ -11,7 +11,7 @@ Target Server Version : 80033 (8.0.33) File Encoding : 65001 - Date: 12/06/2023 10:34:40 + Date: 12/06/2023 19:35:57 */ SET NAMES utf8mb4; diff --git a/project2/src/main/java/cyou/chenx221/controller/ScoreController.java b/project2/src/main/java/cyou/chenx221/controller/ScoreController.java index 30b8e17..7e4bc67 100644 --- a/project2/src/main/java/cyou/chenx221/controller/ScoreController.java +++ b/project2/src/main/java/cyou/chenx221/controller/ScoreController.java @@ -1,12 +1,16 @@ package cyou.chenx221.controller; import cyou.chenx221.helper.UsernameHelper; +import cyou.chenx221.pojo.Course; import cyou.chenx221.service.ScoreService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; @Controller @RequestMapping("/score") @@ -27,4 +31,19 @@ public class ScoreController { model.addAttribute("scores", scoreService.getAllScores()); return "scoreList"; } + + @GetMapping("/infomodv2")//处理学生信息修改页 + public String getInfoModv2(@RequestParam(value = "successMessage", required = false, defaultValue = "null") String successMessage, + @RequestParam(value = "errorMessage", required = false, defaultValue = "null") String errorMessage, + Model model) { + String username = new UsernameHelper().getCurrentUsername(); + if (username != null) { + model.addAttribute("username", username); + } + model.addAttribute("scores", scoreService.getAllScores()); + model.addAttribute("successMessage", successMessage); + model.addAttribute("errorMessage", errorMessage); + + return "scoreopv2"; + } } diff --git a/project2/web/WEB-INF/views/dashboard.jsp b/project2/web/WEB-INF/views/dashboard.jsp index 014f011..0cc29af 100644 --- a/project2/web/WEB-INF/views/dashboard.jsp +++ b/project2/web/WEB-INF/views/dashboard.jsp @@ -49,7 +49,7 @@
  • 成绩查看
  • -
  • 成绩管理
  • +
  • 成绩管理
  • 学生成绩管理
  • diff --git a/project2/web/WEB-INF/views/scoreopv2.jsp b/project2/web/WEB-INF/views/scoreopv2.jsp new file mode 100644 index 0000000..0107679 --- /dev/null +++ b/project2/web/WEB-INF/views/scoreopv2.jsp @@ -0,0 +1,446 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> + + + + + + + + 成绩信息修改v2 + + + + + + + + + + + +
    + +
    + + + + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    成绩ID学号学生姓名课程ID课程名成绩
    ${score.scoreID}${score.student.id}${score.student.name}${score.course.courseID}${score.course.courseName}${score.score}
    +
    +
    +
    + + + +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    + + + + +
    + + + + +
    +
    + + + + + + + + + \ No newline at end of file diff --git a/project2/web/resources/js/range-limit.js b/project2/web/resources/js/range-limit.js new file mode 100644 index 0000000..28b0545 --- /dev/null +++ b/project2/web/resources/js/range-limit.js @@ -0,0 +1,12 @@ +const input_min = document.querySelector("#customRange1") +const input_max = document.querySelector("#customRange2") +const value_min = document.querySelector("#score_min_value") +const value_max = document.querySelector("#score_max_value") +input_min.addEventListener("input", (event) => { + value_min.textContent = event.target.value + input_max.setAttribute("min", event.target.value) +}) +input_max.addEventListener("input", (event) => { + value_max.textContent = event.target.value + input_min.setAttribute("max", event.target.value) +})