修复已知问题

Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
Chenx221 2023-06-19 21:45:39 +08:00
parent 1285fcfaab
commit 4ca8cb1de9
73 changed files with 1514 additions and 628 deletions

View File

@ -85,8 +85,8 @@
- 学生信息修改页(过时) [Get]
- admin,teacher
- studentMod|studentMod_t
- ~/modinfo [Post]
- 学生信息修改
- ~/modinfo
- 学生信息修改 [Post]
- admin,teacher
- *Redirect*.infomodv2|*Redirect*.infomodv2_t
- ~/infomodv2

View File

@ -69,7 +69,8 @@
FROM score s
JOIN student st ON s.StudentID = st.id
JOIN course c ON s.CourseID = c.CourseID
WHERE invalid = 0 AND ScoreID = #{id};
WHERE invalid = 0
AND ScoreID = #{id};
</select>
<update id="deleteScore" parameterType="int">
UPDATE score
@ -80,4 +81,21 @@
INSERT INTO score (Score, StudentID, CourseID)
VALUES (#{score}, #{student.id}, #{course.courseID});
</insert>
<!-- 乱入-->
<select id="getStudentIdByUsername" parameterType="String" resultType="int">
select detail
from user
where username = #{username};
</select>
<select id="getQueryScore" parameterType="int" resultMap="ScoreResultMap">
SELECT ScoreID, Score, st.id as student_id, st.name as name, c.CourseID, c.CourseName
FROM score s
JOIN student st ON s.StudentID = st.id
JOIN course c ON s.CourseID = c.CourseID
WHERE invalid = 0
AND StudentID = #{id};
</select>
</mapper>

View File

@ -73,6 +73,19 @@
<select id="getAllStudentsT" parameterType="String" resultType="cyou.chenx221.pojo.Student">
SELECT *
FROM student
WHERE removed = 0 AND classes = #{classes}
WHERE removed = 0
AND classes = #{classes}
</select>
<select id="getIdByUsername" parameterType="String" resultType="int">
SELECT id
FROM user
WHERE username = #{username}
</select>
<select id="getDetailByUsername" parameterType="String" resultType="int">
select detail
from user
where username = #{username}
</select>
</mapper>

View File

@ -20,16 +20,36 @@
<security:http auto-config="true">
<security:csrf disabled="true"/>
<!-- 限制访问↓-->
<security:intercept-url pattern="/dashboard" access="hasRole('admin')"/>
<security:intercept-url pattern="/dashboard-t" access="hasRole('teacher')"/>
<security:intercept-url pattern="/dashboard-s" access="hasRole('student')"/>
<security:intercept-url pattern="/student/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/course/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/score/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/output/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/course/all" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/course/infomodv2" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/course/delinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/course/addinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/course/modinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/course/query" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/output/export-csv" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/output/get-csv" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/person/settings" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/person/uploadAvatar" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/person/image" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/score/all" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/score/infomodv2" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/score/query" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/score/modinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/score/delinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/score/addinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/all" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/student/queryinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/query" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/modstep1" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/modinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/infomodv2" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/delinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/addinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/system/**" access="hasRole('admin')"/>
<security:intercept-url pattern="/user/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/person/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/teacher/**" access="hasRole('admin')"/>
<security:intercept-url pattern="/user/**" access="hasRole('admin')"/>
<security:intercept-url pattern="/dashboard" access="hasAnyRole('admin','teacher','student')"/>
<!-- 未登录状态下会自动跳转到/login登录页-->
<security:form-login login-page="/login"
default-target-url="/dashboard"

View File

@ -0,0 +1,173 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>课程信息查看</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
<style>
.table-container {
min-width: 80vw; /* 设置最小宽度为视窗宽度的80% */
min-height: 80vh; /* 设置最小高度为视窗高度的80% */
/*display: flex;*/
align-items: center;
justify-content: center;
}
.table-container table {
width: 100%;
/*height: 100%;*/
}
</style>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="z-index: 1;min-height: 58.59px">
<div class="container">
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse"
data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<a class="navbar-brand mt-2 mt-lg-0" href="#">
<i class="fas fa-chalkboard-user me-2"></i>
教务管理系统
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown4" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#"
id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-circle-user fa-lg me-1"></i>
${username}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
<li>
<a class="dropdown-item" href="${pageContext.request.contextPath}/logout">登出</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--Main Navigation-->
<!--Main layout-->
<main>
<div class="bg-image shadow-2-strong vh-100"
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="exportCSV()">导出</button>
</div>
</div>
</div>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
<table class="table table-striped table-hover border-primary">
<thead>
<tr>
<th scope="col">课程ID</th>
<th scope="col">课程名</th>
<th scope="col">课程描述</th>
</tr>
</thead>
<tbody>
<c:forEach var="course" items="${courses}">
<tr>
<td>${course.courseID}</td>
<td>${course.courseName}</td>
<td>${course.description}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!-- Footer -->
<footer class="bg-link text-center text-lg-start ">
</footer>
<!-- Footer -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
function exportCSV() {
// 构造请求 URL根据需要导出的类型传递参数
var exportUrl = '/output/export-csv?type=course'; // 示例:导出学生数据
var link = document.createElement('a');
link.href = exportUrl;
link.style.display = 'none';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
</script>
</body>
</html>

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,31 +55,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +71,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,10 +81,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -133,7 +113,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,21 +55,15 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -78,8 +72,7 @@
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +81,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,9 +91,10 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>

View File

@ -0,0 +1,150 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>课程信息查询结果页</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
<style>
.table-container {
min-width: 80vw; /* 设置最小宽度为视窗宽度的80% */
min-height: 80vh; /* 设置最小高度为视窗高度的80% */
/*display: flex;*/
align-items: center;
justify-content: center;
}
.table-container table {
width: 100%;
/*height: 100%;*/
}
</style>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="z-index: 1;min-height: 58.59px">
<div class="container">
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse"
data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<a class="navbar-brand mt-2 mt-lg-0" href="#">
<i class="fas fa-chalkboard-user me-2"></i>
教务管理系统
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown4" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#"
id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-circle-user fa-lg me-1"></i>
${username}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
<li>
<a class="dropdown-item" href="${pageContext.request.contextPath}/logout">登出</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--Main Navigation-->
<!--Main layout-->
<main>
<div class="bg-image shadow-2-strong vh-100"
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
<table class="table table-striped table-hover border-primary">
<thead>
<tr>
<th scope="col">课程ID</th>
<th scope="col">课程名</th>
<th scope="col">课程描述</th>
</tr>
</thead>
<tbody>
<c:forEach var="course" items="${courses}">
<tr>
<td>${course.courseID}</td>
<td>${course.courseName}</td>
<td>${course.description}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!-- Footer -->
<footer class="bg-link text-center text-lg-start ">
</footer>
<!-- Footer -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
</body>
</html>

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,31 +55,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +71,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,10 +81,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>

View File

@ -50,7 +50,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -58,21 +58,15 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -81,8 +75,7 @@
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -91,8 +84,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -101,9 +94,10 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>

View File

@ -0,0 +1,262 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>课程信息修改v2</title>
<script src="${pageContext.request.contextPath}/resources/js/jquery-3.7.0.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
<style>
.table-container {
min-width: 60vw;
/* 设置最小宽度为视窗宽度的80% */
min-height: 80vh;
/* 设置最小高度为视窗高度的80% */
/*display: flex;*/
align-items: center;
justify-content: center;
}
.table-container table {
width: 100%;
/*height: 100%;*/
}
</style>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="z-index: 1;min-height: 58.59px">
<div class="container">
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse"
data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<a class="navbar-brand mt-2 mt-lg-0" href="#">
<i class="fas fa-chalkboard-user me-2"></i>
教务管理系统
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown4" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#"
id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-circle-user fa-lg me-1"></i>
${username}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
<li>
<a class="dropdown-item" href="${pageContext.request.contextPath}/logout">登出</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--Main Navigation-->
<!--Main layout-->
<main>
<div class="bg-image shadow-2-strong vh-100"
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px">
<table class="table table-striped table-hover border-primary">
<thead>
<tr>
<th scope="col">课程ID</th>
<th scope="col">课程名</th>
<th scope="col">课程描述</th>
</tr>
</thead>
<tbody>
<c:forEach var="course" items="${courses}">
<tr>
<td>${course.courseID}</td>
<td>${course.courseName}</td>
<td>${course.description}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="container">
<div class="card rounded-4 shadow-3-strong" style="min-width: 244px">
<ul class="nav nav-tabs" id="ex1" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active fs-6" id="ex1-tab-1" data-mdb-toggle="tab" href="#ex1-tabs-1"
role="tab" aria-controls="ex1-tabs-1" aria-selected="true">信息查询</a>
</li>
</ul>
<hr class="hr" style="margin: 1px"/>
<div class="tab-content" id="ex1-content">
<div class="tab-pane fade show active" id="ex1-tabs-1" role="tabpanel"
aria-labelledby="ex1-tab-1">
<div class="card-body" style="min-width: 175px">
<form action="query" method="post">
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="number" id="typeText1" class="form-control"
name="id"/>
<label class="form-label" for="typeText1">课程ID</label>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText2" class="form-control"
name="name"/>
<label class="form-label" for="typeText2">课程名(支持部分)</label>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText3" class="form-control"
name="description"/>
<label class="form-label" for="typeText3">描述(支持部分)</label>
</div>
</div>
</div>
<div class="row mb-2 mt-4">
<div class="col-lg-6 text-center">
<button type="submit" class="btn btn-primary">查询
</button>
</div>
<div class="col-lg-6 text-center">
<button type="reset" class="btn btn-secondary">重置</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">
<i class="fas fa-circle-exclamation me-2"></i>错误
</h5>
<button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<c:if test="${not empty errorMessage}">
${errorMessage}
</c:if>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-mdb-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModalLabel2"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel2">
<i class="fas fa-circle-check me-2"></i>成功
</h5>
<button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<c:if test="${not empty successMessage}">
${successMessage}
</c:if>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-mdb-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!-- Footer -->
<footer class="bg-link text-center text-lg-start ">
</footer>
<!-- Footer -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
$(document).ready(function () {
// 判断模型中是否存在错误信息
<c:if test="${not empty errorMessage && errorMessage ne 'null'}">
$('#exampleModal').modal('show');
</c:if>
<c:if test="${not empty successMessage && successMessage ne 'null'}">
$('#exampleModal2').modal('show');
</c:if>
});
</script>
</body>
</html>

View File

@ -50,7 +50,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -58,31 +58,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -91,8 +74,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -101,10 +84,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -157,28 +137,13 @@
</div>
<div class="container">
<div class="card rounded-4 shadow-3-strong" style="min-width: 244px">
<!-- Tabs navs -->
<ul class="nav nav-tabs" id="ex1" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active fs-6" id="ex1-tab-1" data-mdb-toggle="tab" href="#ex1-tabs-1"
role="tab" aria-controls="ex1-tabs-1" aria-selected="true">信息查询</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link fs-6" id="ex1-tab-2" data-mdb-toggle="tab" href="#ex1-tabs-2"
role="tab" aria-controls="ex1-tabs-2" aria-selected="true">信息修改</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link fs-6" id="ex1-tab-3" data-mdb-toggle="tab" href="#ex1-tabs-3"
role="tab" aria-controls="ex1-tabs-3" aria-selected="false">信息删除</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link fs-6" id="ex1-tab-4" data-mdb-toggle="tab" href="#ex1-tabs-4"
role="tab" aria-controls="ex1-tabs-4" aria-selected="false">信息添加</a>
</li>
</ul>
<!-- Tabs navs -->
<hr class="hr" style="margin: 1px"/>
<!-- Tabs content -->
<div class="tab-content" id="ex1-content">
<div class="tab-pane fade show active" id="ex1-tabs-1" role="tabpanel"
aria-labelledby="ex1-tab-1">
@ -223,115 +188,9 @@
</form>
</div>
</div>
<div class="tab-pane fade" id="ex1-tabs-2" role="tabpanel"
aria-labelledby="ex1-tab-2">
<div class="card-body" style="min-width: 175px">
<form action="modinfo" method="post">
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="number" id="typeText7" class="form-control"
required name="id"/>
<label class="form-label" for="typeText7">课程ID (必填)</label>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText8" class="form-control"
name="name"/>
<label class="form-label" for="typeText8">课程名</label>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText9" class="form-control"
name="description"/>
<label class="form-label" for="typeText9">课程描述</label>
</div>
</div>
</div>
<div class="row mb-2 mt-4">
<div class="col-lg-6 text-center">
<button type="submit" class="btn btn-primary"
data-mdb-toggle="tooltip" data-mdb-placement="top"
title="留空为不做修改">更改
</button>
</div>
<div class="col-lg-6 text-center">
<button type="reset" class="btn btn-secondary">重置</button>
</div>
</div>
</form>
</div>
</div>
<div class="tab-pane fade" id="ex1-tabs-3" role="tabpanel" aria-labelledby="ex1-tab-3">
<div class="card-body" style="min-width: 175px">
<form action="delinfo" method="post">
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="number" id="typeText13" class="form-control"
required name="id"/>
<label class="form-label" for="typeText13">课程ID (必填)</label>
</div>
</div>
</div>
<div class="row mb-2 mt-4">
<div class="col-lg-6 text-center">
<button type="submit" class="btn btn-primary">删除</button>
</div>
<div class="col-lg-6 text-center">
<button type="reset" class="btn btn-secondary">重置</button>
</div>
</div>
</form>
</div>
</div>
<div class="tab-pane fade" id="ex1-tabs-4" role="tabpanel" aria-labelledby="ex1-tab-4">
<!-- <h5 class="card-header">信息添加</h5> -->
<div class="card-body" style="min-width: 175px">
<form action="addinfo" method="post">
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText14" class="form-control" required
name="name"/>
<label class="form-label" for="typeText14">课程名 (必填)</label>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText15" class="form-control" required
name="description"/>
<label class="form-label" for="typeText15">课程描述 (必填)</label>
</div>
</div>
</div>
<div class="row mb-2 mt-4">
<div class="col-lg-6 text-center">
<button type="submit" class="btn btn-primary">添加
</button>
</div>
<div class="col-lg-6 text-center">
<button type="reset" class="btn btn-secondary">重置</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Tabs content -->
</div>
</div>
</div>
</div>
</div>

View File

@ -41,7 +41,6 @@
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
@ -55,6 +54,7 @@
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -63,8 +63,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>

View File

@ -40,14 +40,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all_t">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo_t">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2_t">学生信息修改</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all_t">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2_t">成绩管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -56,7 +56,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all_t">课程查看</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -65,8 +66,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>

View File

@ -1,4 +1,4 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>

View File

@ -15,14 +15,10 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<%
if (new UsernameHelper().getCurrentUsername() != null) {
//redirect /dashboard
//note: 登陆了的就别乱访问了
response.sendRedirect("dashboard");
}
@ -239,9 +235,11 @@
$('#exampleModal2').modal('show');
</c:if>
});
function showNote() {
alert("功能尚未实现,请联系管理员重置密码");
}
function showReg() {
document.getElementById("tab-register").click();
}

View File

@ -39,7 +39,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -47,21 +47,15 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -70,8 +64,7 @@
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -80,8 +73,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -90,9 +83,10 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>
@ -152,7 +146,7 @@
<div class="col-lg-2">
<i class="far fa-circle-user fa-8x" id="default_avatar"
style="display: none"></i>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
</div>
@ -249,7 +243,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#custom_avatar').show(); // 显示自定义头像
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
error: function (xhr, status, error) {

View File

@ -0,0 +1,244 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>个人设置</title>
<script src="${pageContext.request.contextPath}/resources/js/jquery-3.7.0.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
<style>
.tab-pane {
min-height: 500px;
}
</style>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="z-index: 1;min-height: 58.59px">
<div class="container">
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse"
data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<a class="navbar-brand mt-2 mt-lg-0" href="#">
<i class="fas fa-chalkboard-user me-2"></i>
教务管理系统
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown4" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#"
id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-circle-user fa-lg me-1"></i>
${username}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
<li>
<a class="dropdown-item" href="${pageContext.request.contextPath}/logout">登出</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--Main Navigation-->
<!--Main layout-->
<main>
<div class="bg-image shadow-2-strong vh-100"
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<button type="button" class="btn btn-primary" onclick="function goBack() {
window.history.back(); //返回上一页
}
goBack()">返回
</button>
<div class="container">
<div class="card rounded-4 shadow-3-strong" style="min-width: 244px">
<ul class="nav nav-tabs" id="ex1" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active fs-6" id="ex1-tab-1" data-mdb-toggle="tab" href="#ex1-tabs-1"
role="tab" aria-controls="ex1-tabs-1" aria-selected="true">设置</a>
</li>
</ul>
<hr class="hr" style="margin: 1px"/>
<div class="tab-content" id="ex1-content">
<div class="tab-pane fade show active" id="ex1-tabs-1" role="tabpanel"
aria-labelledby="ex1-tab-1">
<div class="card-body" style="min-width: 175px">
<div class="note note-primary mb-3" id="note" style="display: none">
<strong>提示:</strong> 用户头像更新成功
</div>
<div class="row">
<div class="col-lg-2 text-center">
<p>
头像设置:
</p>
</div>
<div class="col-lg-2">
<i class="far fa-circle-user fa-8x" id="default_avatar"
style="display: none"></i>
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
</div>
<div class="col-lg-4">
<label class="form-label"
for="customFile">请选择要上传的图片(大小<15MB)</label>
<input type="file" class="form-control" id="customFile" name="avatar"/>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center mt-lg-5">
<%-- Todo: 换成消息框--%>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">
<i class="fas fa-circle-info me-2"></i>提示
</h5>
<button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<c:if test="${not empty message}">
${message}
</c:if>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-mdb-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!-- Footer -->
<footer class="bg-link text-center text-lg-start ">
</footer>
<!-- Footer -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
$(document).ready(function () {
<c:if test="${not empty message && message ne 'null'}">
$('#exampleModal').modal('show');
</c:if>
fetch("/person/image")
.then(function (response) {
if (response.ok) {
// 图像存在,显示自定义头像
$('#custom_avatar').show();
} else {
// 图像不存在,显示默认头像
$('#default_avatar').show();
}
})
.catch(function (error) {
console.log("请求失败:", error);
});
$('#customFile').on('change', function () {
var file = this.files[0]; // 获取选择的文件
// 检查是否选择了文件
if (!file) {
// 如果没有选择文件,执行相应的操作
return;
}
// 创建FormData对象将文件数据附加到其中
var formData = new FormData();
formData.append('avatar', file);
// 发送AJAX请求到后端的uploadAvatar方法
$.ajax({
url: 'uploadAvatar',
type: 'POST',
data: formData,
processData: false, // 告诉jQuery不要处理FormData对象
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
error: function (xhr, status, error) {
console.log('上传失败:', error);
alert('上传失败,请重试');
}
});
});
});
</script>
</body>
</html>

View File

@ -39,7 +39,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -47,31 +47,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -80,8 +63,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -90,10 +73,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -152,7 +132,7 @@
<div class="col-lg-2">
<i class="far fa-circle-user fa-8x" id="default_avatar"
style="display: none"></i>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
</div>
@ -249,7 +229,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#custom_avatar').show(); // 显示自定义头像
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
error: function (xhr, status, error) {

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,21 +55,15 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -78,8 +72,7 @@
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +81,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,9 +91,10 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>

View File

@ -0,0 +1,180 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>成绩信息查看</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
<style>
.table-container {
min-width: 80vw; /* 设置最小宽度为视窗宽度的80% */
min-height: 80vh; /* 设置最小高度为视窗高度的80% */
/*display: flex;*/
align-items: center;
justify-content: center;
}
.table-container table {
width: 100%;
/*height: 100%;*/
}
</style>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="z-index: 1;min-height: 58.59px">
<div class="container">
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse"
data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<a class="navbar-brand mt-2 mt-lg-0" href="#">
<i class="fas fa-chalkboard-user me-2"></i>
教务管理系统
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown4" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#"
id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-circle-user fa-lg me-1"></i>
${username}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
<li>
<a class="dropdown-item" href="${pageContext.request.contextPath}/logout">登出</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--Main Navigation-->
<!--Main layout-->
<main>
<div class="bg-image shadow-2-strong vh-100"
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="exportCSV()">导出</button>
</div>
</div>
</div>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
<table class="table table-striped table-hover border-primary">
<thead>
<tr>
<th scope="col">成绩ID</th>
<th scope="col">学号</th>
<th scope="col">学生姓名</th>
<th scope="col">课程ID</th>
<th scope="col">课程名</th>
<th scope="col">成绩</th>
</tr>
</thead>
<tbody>
<c:forEach var="score" items="${scores}">
<tr>
<td>${score.scoreID}</td>
<td>${score.student.id}</td>
<td>${score.student.name}</td>
<td>${score.course.courseID}</td>
<td>${score.course.courseName}</td>
<td>${score.score}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!-- Footer -->
<footer class="bg-link text-center text-lg-start ">
</footer>
<!-- Footer -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
function exportCSV() {
// 构造请求 URL根据需要导出的类型传递参数
var exportUrl = '/output/export-csv?type=score'; // 示例:导出学生数据
var link = document.createElement('a');
link.href = exportUrl;
link.style.display = 'none';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
</script>
</body>
</html>

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,31 +55,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +71,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,10 +81,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -133,7 +113,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -57,7 +57,6 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
@ -66,15 +65,6 @@
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
@ -92,10 +82,6 @@
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>
</ul>

View File

@ -50,7 +50,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -58,21 +58,15 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -81,8 +75,7 @@
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -91,8 +84,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -101,9 +94,10 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>

View File

@ -50,7 +50,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -58,31 +58,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -91,8 +74,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -101,10 +84,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -133,7 +113,7 @@
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回</button>
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px">
<table class="table table-striped table-hover border-primary">

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,31 +55,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +71,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,10 +81,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>

View File

@ -0,0 +1,178 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<title>学生信息查看</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
<style>
.table-container {
min-width: 80vw; /* 设置最小宽度为视窗宽度的80% */
min-height: 80vh; /* 设置最小高度为视窗高度的80% */
/*display: flex;*/
align-items: center;
justify-content: center;
}
.table-container table {
width: 100%;
/*height: 100%;*/
}
</style>
</head>
<body style="font-family: 'Noto Sans SC Regular',serif">
<!--Main Navigation-->
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light" style="z-index: 1;min-height: 58.59px">
<div class="container">
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse"
data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<a class="navbar-brand mt-2 mt-lg-0" href="#">
<i class="fas fa-chalkboard-user me-2"></i>
教务管理系统
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown4" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
</div>
<div class="dropdown">
<a class="dropdown-toggle d-flex align-items-center hidden-arrow" href="#"
id="navbarDropdownMenuAvatar" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-circle-user fa-lg me-1"></i>
${username}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownMenuAvatar">
<li>
<a class="dropdown-item" href="${pageContext.request.contextPath}/logout">登出</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--Main Navigation-->
<!--Main layout-->
<main>
<div class="bg-image shadow-2-strong vh-100"
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="exportCSV('${classes}')">导出
</button>
</div>
</div>
</div>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
<table class="table table-striped table-hover border-primary">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">姓名</th>
<th scope="col">性别</th>
<th scope="col">出生日期</th>
<th scope="col">联系方式</th>
<th scope="col">班级</th>
</tr>
</thead>
<tbody>
<tr>
<td>${student.id}</td>
<td>${student.name}</td>
<td>${student.sex}</td>
<td>${student.birthday}</td>
<td>${student.phone}</td>
<td>${student.classes}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!-- Footer -->
<footer class="bg-link text-center text-lg-start ">
</footer>
<!-- Footer -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
<script>
function exportCSV(classes) {
// 构造请求 URL根据需要导出的类型传递参数
var exportUrl = '/output/export-csv?type=student&classes=' + classes; // 示例:导出学生数据
var link = document.createElement('a');
link.href = exportUrl;
link.style.display = 'none';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
</script>
</body>
</html>

View File

@ -47,7 +47,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -55,31 +55,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -88,8 +71,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -98,10 +81,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -133,7 +113,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -58,7 +58,6 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
@ -67,15 +66,6 @@
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
@ -93,10 +83,6 @@
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>
</ul>
@ -206,7 +192,7 @@
<div class="col-12">
<div class="form-outline">
<input type="text" id="typeText6" class="form-control"
name="classes"/>
name="classes" value="${classes}"/>
<label class="form-label" for="typeText6">班级</label>
</div>
</div>

View File

@ -57,7 +57,6 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
@ -66,15 +65,6 @@
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="/teacher/manage">教师信息管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
@ -92,10 +82,6 @@
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
<li><a class="dropdown-item" href="/system/settings">系统设定</a></li>
<li><a class="dropdown-item" href="/user/usermanage">用户管理</a></li>
<%-- <li><a class="dropdown-item" href="#">日志管理</a></li>--%>
<li><a class="dropdown-item" href="#">版本信息</a></li>
</ul>
</li>
</ul>

View File

@ -50,7 +50,7 @@
</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">首页</a>
<a class="nav-link active" aria-current="page" href="/dashboard">首页</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1" role="button"
@ -58,31 +58,14 @@
学生管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
<li><a class="dropdown-item" href="#">学生信息查询</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="#">学生信息管理</a></li>
<li><a class="dropdown-item" href="/student/all">学生信息显示</a></li>
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider"/>
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button"
data-mdb-toggle="dropdown" aria-expanded="false">
教师管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
<li><a class="dropdown-item" href="#">教师信息管理</a></li>
<li><a class="dropdown-item" href="#">教师课程管理</a></li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -91,8 +74,8 @@
课程管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
<li><a class="dropdown-item" href="#">课程信息管理</a></li>
<li><a class="dropdown-item" href="#">课程安排管理</a></li>
<li><a class="dropdown-item" href="/course/all">课程查看</a></li>
<li><a class="dropdown-item" href="/course/infomodv2">课程管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">
@ -101,10 +84,7 @@
系统管理
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown4">
<li><a class="dropdown-item" href="#">个人设定</a></li>
<li><a class="dropdown-item" href="#">用户管理</a></li>
<li><a class="dropdown-item" href="#">日志管理</a></li>
<li><a class="dropdown-item" href="#">版本信息</a></li>
<li><a class="dropdown-item" href="/person/settings">个人设定</a></li>
</ul>
</li>
</ul>
@ -256,7 +236,7 @@
</div>
<div class="tab-pane fade" id="ex1-tabs-2" role="tabpanel" aria-labelledby="ex1-tab-2">
<div class="card-body" style="min-width: 175px">
<form action="delinfoT" method="post">
<form action="delinfo" method="post">
<div class="row mb-2">
<div class="col-12">
<div class="form-outline">

View File

@ -1,4 +1,4 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>

View File

@ -430,8 +430,7 @@
$('#de_button').on('click', function () {
reloadka("reload");
});
$('#exampleModal3').modal('show');
$('#exampleModal3').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理
$('#exampleModal3').modal('show').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理
reloadka("reload");
});
} else {
@ -463,8 +462,7 @@
$('#de_button').on('click', function () {
reloadka("reload");
});
$('#exampleModal3').modal('show');
$('#exampleModal3').on('hidden.bs.modal', function () {
$('#exampleModal3').modal('show').on('hidden.bs.modal', function () {
reloadka("reload");
});
} else {

View File

@ -19,19 +19,19 @@ public class CustomAuthenticationSuccessHandler extends SimpleUrlAuthenticationS
// 移除 errorMessage 属性
request.getSession().removeAttribute("errorMessage");
Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
for (GrantedAuthority authority : authorities) {
if (authority.getAuthority().equals("ROLE_admin")) {
response.sendRedirect("/dashboard");
return;
} else if (authority.getAuthority().equals("ROLE_teacher")) {
response.sendRedirect("/dashboard-t");
return;
} else if (authority.getAuthority().equals("ROLE_student")) {
response.sendRedirect("/dashboard-s");
return;
}
}
// Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
// for (GrantedAuthority authority : authorities) {
// if (authority.getAuthority().equals("ROLE_admin")) {
// response.sendRedirect("/dashboard");
// return;
// } else if (authority.getAuthority().equals("ROLE_teacher")) {
// response.sendRedirect("/dashboard-t");
// return;
// } else if (authority.getAuthority().equals("ROLE_student")) {
// response.sendRedirect("/dashboard-s");
// return;
// }
// }
// 如果没有匹配的角色或者无法确定跳转的目标页面则默认跳转到 "/dashboard"
super.onAuthenticationSuccess(request, response, authentication);
}

View File

@ -3,6 +3,7 @@ package cyou.chenx221.service;
import cyou.chenx221.mapper.UserMapper;
import cyou.chenx221.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.DisabledException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
@ -24,6 +25,9 @@ public class CustomUserDetailsService implements UserDetailsService {
if (user == null) {
throw new UsernameNotFoundException("X User not found with username: " + username);
}
if(user.getDisabled()==1){
throw new DisabledException("User is disabled");
}
System.out.println(user.getId()+" "+user.getUsername()+" "+user.getPassword()+" "+user.getRoles());
// 创建并返回自定义的UserDetails对象
return org.springframework.security.core.userdetails.User.builder()

View File

@ -85,14 +85,16 @@
<!-- 乱入-->
<select id="getStudentIdByUsername" parameterType="String" resultType="int">
select id
select detail
from user
where username = #{username};
</select>
<select id="getQueryScore" parameterType="int" resultType="cyou.chenx221.pojo.Score">
SELECT ScoreID, Score, StudentID, CourseID
FROM score
<select id="getQueryScore" parameterType="int" resultMap="ScoreResultMap">
SELECT ScoreID, Score, st.id as student_id, st.name as name, c.CourseID, c.CourseName
FROM score s
JOIN student st ON s.StudentID = st.id
JOIN course c ON s.CourseID = c.CourseID
WHERE invalid = 0
AND StudentID = #{id};
</select>

View File

@ -20,16 +20,36 @@
<security:http auto-config="true">
<security:csrf disabled="true"/>
<!-- 限制访问↓-->
<security:intercept-url pattern="/dashboard" access="hasRole('admin')"/>
<security:intercept-url pattern="/dashboard-t" access="hasRole('teacher')"/>
<security:intercept-url pattern="/dashboard-s" access="hasRole('student')"/>
<security:intercept-url pattern="/student/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/course/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/score/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/output/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/course/all" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/course/infomodv2" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/course/delinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/course/addinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/course/modinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/course/query" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/output/export-csv" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/output/get-csv" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/person/settings" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/person/uploadAvatar" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/person/image" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/score/all" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/score/infomodv2" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/score/query" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/score/modinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/score/delinfo" access="hasAnyRole('admin')"/>
<security:intercept-url pattern="/score/addinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/all" access="hasAnyRole('admin','teacher','student')"/>
<security:intercept-url pattern="/student/queryinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/query" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/modstep1" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/modinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/infomodv2" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/delinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/student/addinfo" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/system/**" access="hasRole('admin')"/>
<security:intercept-url pattern="/user/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/person/**" access="hasAnyRole('admin','teacher')"/>
<security:intercept-url pattern="/teacher/**" access="hasRole('admin')"/>
<security:intercept-url pattern="/user/**" access="hasRole('admin')"/>
<security:intercept-url pattern="/dashboard" access="hasAnyRole('admin','teacher','student')"/>
<!-- 未登录状态下会自动跳转到/login登录页-->
<security:form-login login-page="/login"
default-target-url="/dashboard"

View File

@ -110,7 +110,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -113,7 +113,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -146,7 +146,7 @@
<div class="col-lg-2">
<i class="far fa-circle-user fa-8x" id="default_avatar"
style="display: none"></i>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
</div>
@ -243,7 +243,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#custom_avatar').show(); // 显示自定义头像
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
error: function (xhr, status, error) {

View File

@ -129,7 +129,7 @@
<div class="col-lg-2">
<i class="far fa-circle-user fa-8x" id="default_avatar"
style="display: none"></i>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
</div>
@ -226,7 +226,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#custom_avatar').show(); // 显示自定义头像
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
error: function (xhr, status, error) {

View File

@ -132,7 +132,7 @@
<div class="col-lg-2">
<i class="far fa-circle-user fa-8x" id="default_avatar"
style="display: none"></i>
<img src="/person/image" class="img-fluid rounded-circle" alt="avatar"
<img src="#" class="img-fluid rounded-circle" alt="avatar"
style="height: 128px;width: 128px;display: none"
id="custom_avatar"/>
</div>
@ -229,7 +229,7 @@
contentType: false, // 告诉jQuery不要设置Content-Type请求头
success: function () {
$('#default_avatar').hide(); // 隐藏默认头像
$('#custom_avatar').show(); // 显示自定义头像
$('#custom_avatar').attr('src', "/person/image").show();
$('#note').show(); // 显示提示消息
},
error: function (xhr, status, error) {

View File

@ -110,7 +110,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -113,7 +113,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -113,7 +113,7 @@
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
<div class="container d-flex justify-content-center">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回</button>
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
<div class="table-container rounded-4 shadow-3-strong"
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px">
<table class="table table-striped table-hover border-primary">

View File

@ -110,7 +110,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>

View File

@ -113,7 +113,7 @@
<div>
<div class="row">
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard-t'">返回
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回
</button>
</div>
</div>