假期作业3

主页面:

点击查看代码
<%@ page import="java.util.Objects" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        /* 全局样式 */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f4f7fa;
            color: #333;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }
        /* 标题样式 */
        h1 {
            color: #007BFF;
            font-size: 36px;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }
        /* 分割线样式 */
        hr {
            width: 80%;
            border: 0;
            height: 1px;
            background-color: #ccc;
            margin-bottom: 50px;
        }
        /* 按钮容器样式 */
        .button-container {
            display: flex;
            gap: 20px;
        }
        /* 按钮样式 */
        button {
            background-color: #007BFF;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 18px;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        /* 按钮悬停效果 */
        button:hover {
            background-color: #0056b3;
            transform: translateY(-3px);
        }
        /* 按钮激活效果 */
        button:active {
            transform: translateY(1px);
        }
    </style>
    <script>
        function base() {
            window.location.href = "${pageContext.request.contextPath}/selectAllServlet";
        }
        function ability() {
            window.location.href = "ability.jsp";
        }
    </script>
</head>
<body>
<h1>首页</h1>
<div class="button-container">
    <button onclick="base()">基本信息</button>
    <button onclick="ability()">能力评估</button>
</div>
</body>
</html>

老年人信息界面:

点击查看代码
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>列表</title>
    <style>
        /* 全局样式 */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f4f7fa;
            color: #333;
            margin: 0;
            padding: 20px;
        }

        /* 表单样式 */
        form {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        form label {
            font-weight: 600;
        }

        form input[type="text"] {
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            flex-grow: 1;
        }

        form input[type="submit"] {
            background-color: #007BFF;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        form input[type="submit"]:hover {
            background-color: #0056b3;
        }

        /* 表格样式 */
        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        table th,
        table td {
            padding: 12px;
            text-align: center;
            border-bottom: 1px solid #ddd;
        }

        table th {
            background-color: #007BFF;
            color: white;
        }

        table tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        table tr:hover {
            background-color: #e0e0e0;
        }

        table a {
            color: #007BFF;
            text-decoration: none;
            margin: 0 5px;
        }

        table a:hover {
            text-decoration: underline;
        }

        /* 按钮样式 */
        button {
            background-color: #007BFF;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            margin-right: 10px;
        }

        button:hover {
            background-color: #0056b3;
        }
    </style>
    <script>
        function Back() {
            window.location.href = "main.jsp";
        }
        function addBase() {
            window.location.href = "addBase.jsp";
        }
    </script>
</head>
<body>
<form name="search-form" action="selectOneServlet" method="post">
    <label for="assessmentId"></label>
    <input type="text" id="assessmentId" name="assessmentId">
    <input value="根据编号查询" type="submit" id="search_btn">
</form>

<table border="1" cellspacing="0" width="100%">
    <tr>
        <th>评估编号</th>
        <th>评估日期</th>
        <th>评估原因</th>
        <th>姓名</th>
        <th>身份证号</th>
        <th>联系人</th>
        <th>联系人电话</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${bases}" var="base">
        <tr align="center">
            <td>${base.assessmentId}</td>
            <td>${base.assessmentDate}</td>
            <td>${base.assessmentReason}</td>
            <td>${base.name}</td>
            <td>${base.idCard}</td>
            <td>${base.contactName}</td>
            <td>${base.contactPhone}</td>
            <td>
                <a href="${pageContext.request.contextPath}/update1Servlet?id=${base.assessmentId}">修改</a>
                <a href="${pageContext.request.contextPath}/deleteServlet?id=${base.assessmentId}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>

<button onclick="addBase()">新增基本信息</button>
<button onclick="Back()">返回首页</button>
</body>
</html>

能力测评界面:

点击查看代码
<%@ page import="java.util.Objects" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>能力评估</title>
    <style>
        /* 全局样式 */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f4f9fd;
            color: #333;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }

        h1 {
            color: #007BFF;
            font-size: 32px;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* 按钮容器样式 */
        .button-container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
        }

        /* 按钮样式 */
        .button-container button {
            background-color: #007BFF;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 8px;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        /* 按钮悬停效果 */
        .button-container button:hover {
            background-color: #0056b3;
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        }

        /* 按钮激活效果 */
        .button-container button:active {
            transform: translateY(1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
    </style>
    <script>
        function daily() {
            window.location.href = "addDaily.jsp";
        }

        function mental() {
            window.location.href = "addMental.jsp";
        }

        function perception() {
            window.location.href = "addPerception.jsp";
        }

        function socialParticipation() {
            window.location.href = "addSocialParticipation.jsp";
        }
    </script>
</head>

<body>
<h1>能力评估</h1>
<div class="button-container">
    <button onclick="daily()">日常生活活动评估</button>
    <button onclick="mental()">精神状态评估</button>
    <button onclick="perception()">感知觉与沟通评估</button>
    <button onclick="socialParticipation()">社会参与评估</button>
</div>
</body>

</html>
posted @ 2025-02-16 16:38  vivi_vimi  阅读(4)  评论(0)    收藏  举报